diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000000..4f3b76b096 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000000..aa045f6555 --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,9 @@ +{ + "changelog": ["@changesets/changelog-github", { "repo": "mobxjs/mobx" }], + "commit": false, + "access": "public", + "baseBranch": "main", + "___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": { + "onlyUpdatePeerDependentsWhenOutOfRange": true + } +} diff --git a/.editorconfig b/.editorconfig index 7419bd422e..8ef6aaa7be 100644 --- a/.editorconfig +++ b/.editorconfig @@ -6,6 +6,6 @@ charset = utf-8 indent_style = space tab_width = 4 -[{package.json,.travis.yml}] +[{package.json}] indent_style = space -indent_size = 2 \ No newline at end of file +indent_size = 2 diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 0000000000..b0e009e162 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,36 @@ +module.exports = { + parser: "@typescript-eslint/parser", + plugins: ["@typescript-eslint"], + extends: "eslint:recommended", + ignorePatterns: ["**/__tests__/**/*"], + env: { + browser: true, + es6: true, + node: true + }, + parserOptions: { + ecmaVersion: 6, + sourceType: "module" + }, + rules: { + "no-fallthrough": "off", + "no-constant-condition": "off", + curly: "error", + "getter-return": "off", + "no-console": "off", + "no-var": "error", + "no-undef": "off", + "no-extra-semi": "off", // doesn't get along well with prettier + "no-unused-vars": "off", // got typescript for that, + "no-redeclare": "off", // No idea what it does, but it dies + "require-yield": "off" // Doesn't work with TS + }, + globals: { + process: "readable", + global: "readable", + console: "readable", + setTimeout: "readable", + clearTimeout: "readable", + module: "writable" + } +} diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000000..95d7eb2031 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1 @@ +open_collective: mobx diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 0000000000..51c8ea614e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,45 @@ +--- +name: 🐛 Reporting a Bug +about: Open a new issue if something isn't working as expected. +labels: 🐛 bug +--- + + + +**Intended outcome:** + + + +**Actual outcome:** + + + +**How to reproduce the issue:** + + + +**Versions** + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000000..f16ede9fe8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,14 @@ +blank_issues_enabled: false +contact_links: + - name: ✨ Feature Request / idea + url: https://github.com/mobxjs/mobx/discussions/new + about: Missing something in MobX? Let us know. + - name: 💬 Question / Discussion + about: Feel free to ask anything + url: https://github.com/mobxjs/mobx/discussions/new + - name: 📖 View documentation + url: https://mobx.js.org + about: Official Mobx documentation + - name: ❓ StackOverflow + url: https://stackoverflow.com/questions/tagged/mobx + about: Ask question or find answers on Stack overflow \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/documentation.md b/.github/ISSUE_TEMPLATE/documentation.md new file mode 100644 index 0000000000..d8a6c9a754 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/documentation.md @@ -0,0 +1,9 @@ +--- +name: ✏ Documentation improvement +about: Please open the PR instead! +labels: 📖 documentation +--- + +Documentation lives in the `/docs` folder. Please, send in PR directly with a change instead of describing what you want to change. + +Ask here only if your change is bigger and there is a chance for rejecting it. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000000..01d242671e --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,21 @@ + + +### Code change checklist + +- [ ] Added/updated unit tests +- [ ] Updated `/docs`. For new functionality, at least `API.md` should be updated +- [ ] Verified that there is no significant performance drop (`yarn mobx test:performance`) + + diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..5ace4600a1 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,6 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" diff --git a/.github/lock.yml b/.github/lock.yml new file mode 100644 index 0000000000..23ddfcbe92 --- /dev/null +++ b/.github/lock.yml @@ -0,0 +1,26 @@ +# Configuration for Lock Threads - https://github.com/dessant/lock-threads + +# Number of days of inactivity before a closed issue or pull request is locked +daysUntilLock: 60 + +# Skip issues and pull requests created before a given timestamp. Timestamp must +# follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable +skipCreatedBefore: 2019-01-01 + +# Issues and pull requests with these labels will be ignored. Set to `[]` to disable +exemptLabels: [] + +# Label to add before locking, such as `outdated`. Set to `false` to disable +lockLabel: false + +# Comment to post before locking. Set to `false` to disable +lockComment: > + This thread has been automatically locked since there has not been + any recent activity after it was closed. Please open a new issue for + related bugs or questions. + +# Assign `resolved` as the reason for locking. Set to `false` to disable +setLockReason: true + +# Limit to only `issues` or `pulls` +only: issues diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000000..480b2a213f --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,30 @@ +# Number of days of inactivity before an issue becomes stale +daysUntilStale: 14 +# Number of days of inactivity before a stale issue is closed +daysUntilClose: 4 +# Issues with these labels will never be considered stale +exemptLabels: + - 📌 pinned + - 💬 discuss + - 🍗 enhancement + - 📖 documentation + - 🔨 breaking-change + - 🚧 experimental + - 🙏 help wanted + - 👓 needs investigation + - ✋ on hold + +# Label to use when marking an issue as stale +staleLabel: 🚶 stale +# Comment to post when marking an issue as stale. Set to `false` to disable +markComment: > + This issue has been automatically marked as stale because it has not had + recent activity. It will be closed if no further activity occurs. Thank you + for your contributions. +# Comment to post when closing a stale issue. Set to `false` to disable +closeComment: false +# Limit to only `issues` or `pulls` +only: issues +# Comment to post when removing the stale label. +unmarkComment: > + This issue has been automatically unmarked as stale. Please disregard previous warnings. diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000000..1be48508eb --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,45 @@ +name: Build and test + +on: + push: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: {} + +jobs: + build: + name: Build and test + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + + - name: Setup Node.js 22.x + uses: actions/setup-node@master + with: + node-version: 22.x + + - name: Install Dependencies + run: yarn --frozen-lockfile --ignore-scripts + + - name: Lint + run: yarn lint + + - name: Build check + run: yarn lerna run build:check + + - name: Build packages + run: yarn lerna run build:test + + - name: Test + run: yarn test -i + + - name: Test size + run: yarn lerna run test:size + + - name: Test flow + run: yarn mobx test:flow + + - name: Test performance + run: yarn mobx test:performance diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml new file mode 100644 index 0000000000..ec1f27100f --- /dev/null +++ b/.github/workflows/coveralls.yml @@ -0,0 +1,33 @@ +name: Coveralls + +on: ["push"] + +jobs: + mobx: + name: Packages coverage + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@master + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 + + - name: Setup Node.js 22.x + uses: actions/setup-node@master + with: + node-version: 22.x + + - name: Install Dependencies + run: yarn --frozen-lockfile --ignore-scripts + + - name: Build packages + run: yarn lerna run build:test + + # - name: Run Coverage + # run: yarn coverage + + # - name: Upload to coveralls + # uses: coverallsapp/github-action@v2.3.6 + # with: + # github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000000..4336bf7e61 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,40 @@ +name: Release + +on: + push: + branches: + - main + +jobs: + release: + name: Release + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses: actions/checkout@main + with: + # This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits + fetch-depth: 0 + + - name: Setup Node.js 22.x + uses: actions/setup-node@master + with: + node-version: 22.x + + - name: Install Dependencies + run: yarn + + - name: Build packages + run: yarn lerna run build + + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + # This expects you to have a script called release which does a build for your packages and calls changeset publish + publish: yarn release + commit: Version release + title: Next release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 4c811618c0..0880b4500c 100644 --- a/.gitignore +++ b/.gitignore @@ -3,16 +3,16 @@ node_modules npm-debug.log coverage -notes.md -lib test/babel-tests.js test/typescript/typescript-tests.js -test/perf/perf.txt dist/ -.build*/ -.idea +**/.idea/* +!/.idea/icon.png +!/.idea/vcs.xml .wp-build*/ *.iml *.ipr *.iws yarn-error.log +build/ +.DS_Store diff --git a/.idea/icon.png b/.idea/icon.png new file mode 100644 index 0000000000..a2af3a5933 Binary files /dev/null and b/.idea/icon.png differ diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..d5bf7140c3 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,16 @@ + + + + + + + + + \ No newline at end of file diff --git a/.prettierignore b/.prettierignore index bd3dc91687..7957417edb 100644 --- a/.prettierignore +++ b/.prettierignore @@ -1 +1,6 @@ -/**/package.json \ No newline at end of file +/**/package.json +website/**/* +dist/ +docs/assets/ +*.yml +coverage \ No newline at end of file diff --git a/.prettierrc b/.prettierrc index baa8b38f80..1f85f3d765 100644 --- a/.prettierrc +++ b/.prettierrc @@ -3,5 +3,7 @@ "semi": false, "tabWidth": 4, "singleQuote": false, + "trailingComma": "none", + "arrowParens": "avoid", "useTabs": false } diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 3e971df616..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,12 +0,0 @@ -language: node_js -install: - - yarn install -script: CI=true yarn test:travis -after_success: - - cat ./coverage/lcov.info|./node_modules/coveralls/bin/coveralls.js -node_js: - - 9.3 -addons: - apt: - packages: - - xvfb diff --git a/.vscode/settings.json b/.vscode/settings.json index 3297ba797f..618db460de 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,18 +1,17 @@ { - "[typescript]": { - "editor.formatOnSave": true, - "editor.formatOnPaste": false - }, - "[javascript]": { - "editor.formatOnSave": true, - "editor.formatOnPaste": false - }, - // Note, these settings should match lint-staged settings! - "prettier.semi": false, - "prettier.tabWidth": 4, - "prettier.useTabs": false, - "prettier.printWidth": 100, - "prettier.singleQuote": false, - "typescript.tsdk": "node_modules/typescript/lib" - // "javascript.validate.enable": false // enable for flow -} \ No newline at end of file + "[typescript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "editor.formatOnPaste": false + }, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "editor.formatOnPaste": false + }, + "typescript.tsdk": "node_modules/typescript/lib", + // "javascript.validate.enable": false // enable for flow + "eslint.validate": ["javascript", "javascriptreact", "typescript", "typescriptreact"], + "fb.doctor.disabled-tests": ["CorporateNetworkDoctor"], + "cSpell.enabled": true +} diff --git a/.watchmanconfig b/.watchmanconfig new file mode 100644 index 0000000000..4da29c3841 --- /dev/null +++ b/.watchmanconfig @@ -0,0 +1,3 @@ +{ + "ignore_dirs": ["node_modules", "_site", "dist", "coverage"] +} diff --git a/CHANGELOG.md b/CHANGELOG.md deleted file mode 100644 index 12258884bb..0000000000 --- a/CHANGELOG.md +++ /dev/null @@ -1,1423 +0,0 @@ -# 5.8.0 / 4.8.0 - -* MobX now requires TypeScript 3 (this was already the case in 5.7.0, but in this version the difference is actually noticeable in the typings). -* Fixed array dehancer sometimes skipping. Fixes [#1839](https://github.com/mobxjs/mobx/issues/1839) through [#1841](https://github.com/mobxjs/mobx/pull/1841) by [k-g-a](https://github.com/k-g-a) -* Fixed issue where webpack 4 wouldn't use the ESM module [#1834](https://github.com/mobxjs/mobx/pull/1834) by [mrtnbroder](https://github.com/mrtnbroder) -* Improved type inference for `flow` in TypeScript 3. Fixes [#1816](https://github.com/mobxjs/mobx/issue/1816) through [#1825](https://github.com/mobxjs/mobx/pull/1825) by [ismailhabib](https://github.com/ismailhabib) -* Introduced support for global environment variable `IGNORE_MOBX_MINIFIY_WARNING=true` to skip the built-in minification warning. See [#1835](https://github.com/mobxjs/mobx/pull/1835) by [fi3ework](https://github.com/fi3ework) -* Fixed onBecome(Un)Observed dispoer cleanup. Fixes [#1537](https://github.com/mobxjs/mobx/issues/1537) through [#1833](https://github.com/mobxjs/mobx/pull/1833) by [fi3ework](https://github.com/fi3ework) - -# 5.7.1 / 4.7.1 -* Fixed [#1839](https://github.com/mobxjs/mobx/issues/1839), ObservableArrayAdministration.dehanceValues does not dehance last value. - -# 5.7.0 / 4.7.0 - -* Upgraded typings to TypeScript 3 -* Fixed [#1742](https://github.com/mobxjs/mobx/issues/1742), change detection fails when multiple mobx instances were active. -* Fixed [#1624](https://github.com/mobxjs/mobx/issues/1624), use built-in flow types for iterators -* Fixed [#1777](https://github.com/mobxjs/mobx/issues/1777) through [#1826](https://github.com/mobxjs/mobx/pull/1826), stack overflow exception, in development mode, when using `@computed` on a React component. The MobX 5 behavior here has been reverted to the MobX 4 behavior. - - -# 5.6.0 / 4.6.0 - -* `keepAlive` has become smarter and won't recomputed computed values that are kept alive, as long as they aren't read. Implements [#1534](https://github.com/mobxjs/mobx/issues/1534) -* Fixed [#1796](https://github.com/mobxjs/mobx/issues/1796), undeleting a property that had an initial value of `undefined` was undetected -* Improved Flow typings, see [#1794](https://github.com/mobxjs/mobx/pull/1794) and [#1786](https://github.com/mobxjs/mobx/pull/1786) - -# 5.5.2 / 4.5.2 - -* Fixed bug in `toJS` not handling `null` values correctly. Fixes [#1557](https://github.com/mobxjs/mobx/issues/1557) through [#1783](https://github.com/mobxjs/mobx/pull/1783) by [@wangyiz4262](https://github.com/wangyiz4262) - -# 5.5.1 / 4.5.1 - -* `toJS` now has a `recurseEverything` everything option, that even detects and converts observable objects that are "behind" non-observable objects. See [#1699](https://github.com/mobxjs/mobx/pull/1699) by [wangyiz4262](https://github.com/wangyiz4262) -* Added flow typings form `comparer`, see [#1751](https://github.com/mobxjs/mobx/pull/1752) by [pdong](https://github.com/pdong) -* Update flow typings for configuration options, [#1772](https://github.com/mobxjs/mobx/pull/1772) by [alexandersorokin](https://github.com/alexandersorokin) - -# 5.5.0 / 4.5.0 - -(Minor version of `5` was bumped significantly to make the number better correlate together :-)) - -* Fixed [#1740](https://github.com/mobxjs/mobx/issues/1740): combining decorators and `extendObservable` in a class constructor caused errors to be thrown -* Fixed [#1739](https://github.com/mobxjs/mobx/issues/1740): - * Proxies: `delete`-ing a property was not always picked up by the reactivity system - * Non-proxies: `remove()`-ing a property was not always picked up by the `has()` and `get()` utilities - * `has` now returns `true` for computed fields - * `get` now returns a value for computed fields -* Introduced `_allowStateChangeInsideComputed`. Don't use it :-). -* MobX is now transpiled using babel 7 - -# 5.1.2 / 4.4.2 - -* Fixed [#1650](https://github.com/mobxjs/mobx/issues/1650), decorating fields with the name `toString` does not behave correctly. - -# 5.1.1 / 4.4.1 - -* Improved typings of `decorate`, see [#1711](https://github.com/mobxjs/mobx/pull/1711) by [makepost](https://github.com/makepost) - -# 5.1.0 / 4.4.0 - -* Improved handling of multiple MobX instances. MobX will no longer complain about being loaded multiple times (one should still prevent it though, to prevent blowing up bundle size!), but merge internal state by default. If multiple MobX versions need to be loaded, call `configure({ isolateGlobalState: true })`. Note that this means that observables from the different MobX instances won't cooperate. Fixes [#1681](https://github.com/mobxjs/mobx/issues/1681), [#1082](https://github.com/mobxjs/mobx/issues/1082) -* `enforceActions` options now supports the values: `"never"`, `"observed"` and `"always"` to make the behavior more clear. Fixes [#1680](https://github.com/mobxjs/mobx/issues/1680), [#1473](https://github.com/mobxjs/mobx/issues/1473) - -# 5.0.5 - -* Fixed [#1667](https://github.com/mobxjs/mobx/issues/1667): creating a large array could result in undefined items (MobX 4.* was not affected) - -# 4.3.2 / 5.0.4 - -* Fixed [#1685](https://github.com/mobxjs/mobx/issues/1685): expose `IAutorunOptions` -* `decorate` now can apply multiple decorators, by accepting an array and applying them right to left: `decorate(Todo, { title: [serializable(primitive), persist('object'), observable] })`. By [@ramybenaroya](https://github.com/ramybenaroya) through [#1691](https://github.com/mobxjs/mobx/pull/1691) and [#1686](https://github.com/mobxjs/mobx/pull/1686) -* Improved typings of `flow` so that it accepts async generators. By [@dannsam](https://github.com/dannsam) through [#1656](https://github.com/mobxjs/mobx/pull/1656) and [#1655](https://github.com/mobxjs/mobx/pull/1655) -* `keys()` now also supports arrays. Fixes [#1600](https://github.com/mobxjs/mobx/pull/1600) through [#1601](https://github.com/mobxjs/mobx/pull/1601) by [@nunocastromartins](https://github.com/nunocastromartins) - -# 5.0.3 - -* Fixed issue where it was no longer possible to define custom properties on observable arrays - -# 5.0.2 - -* Fixed issue where iterators where not compiled to ES5, breaking the ES5 based builds. - -# 5.0.1 (Unpublished) - -* Fixed regression bug: `ObservableMap.size` was no longer observable. Fixes [#1583](https://github.com/mobxjs/mobx/issues/1583) -* Downgraded lib export from ES6 to ES5. To many build tools still trip over ES6. Fixes [#1584](https://github.com/mobxjs/mobx/issues/1584). A modern build is available through `import ... from "mobx/lib/mobx.es6"` (or setup an alias in your build system) -* Added support for mobx-react-devtools - -# 5.0.0 - -[Release blogpost](https://medium.com/p/4852bce05572/) - -### Proxy support! - -MobX 5 is the first MobX version fully leveraging Proxies. This has two big advantages - -1. MobX can now detect the addition of properties on plain observable objects, so it is now possible to use plain observable objects as dynamic collections. -2. Observable arrays are now recognized as arrays by all third party libraries, which will avoid the need to slice them. - -### The system requirements to run MobX has been upped - -* MobX 5 can only be used on environments that support `Proxies`. In practice this means, no Internet Explorer (Edge is fine). No nodejs < 6. React Native on Android only when JavaScript core is [upgraded](https://github.com/react-community/jsc-android-buildscripts#how-to-use-it-with-my-react-native-app). All modern browsers are supported. -* Since MobX no longer runs on older browsers, the compilation target has been upgraded to ES2015 syntax supporting browsers. This means that MobX is not loadable on older browsers without down compilation to ES5. -* If for whatever reason your project cannot meet this requirements, please stick to MobX 4. It will be actively maintained. All current features of MobX 5 are expressable in MobX 4 as well, but it means that for example to use dynamic objects some [additional APIs](https://mobx.js.org/refguide/object-api.html) are needed. -* The performance footprint of MobX 5 should be pretty similar to MobX 4. In our performance tests we saw some minor improvements in memory footprint, but overall it should be pretty comparable. - -### Breaking changes - -* The required runtime needs to support the non-polyfillable `Proxy` API. -* The minimum runtime target is now ES2015, not ES5 -* `spy` has become a no-op in production builds -* All earlier deprecated APIs are dropped. Make sure to not have any deprecation warnings before upgrading. -* `array.move` and `array.peek` are removed from the API -* Dropped the third argument to `array.find` and `array.findIndex` since they were not standardized in ES. -* `.$mobx` property has been dropped from all observables and replaced by a Symbol. Instead of using `x.$mobx.name`, use `import { $mobx } from "mobx"; x[$mobx].name` etc. -* In some cases, the order in which autoruns are fired could have changed due to some internal optimizations (note that MobX never had a guarantee about the order in which autoruns fired!) - -### New features - -* It is possible to pass the `proxy: false` argument to `observable.object` to disable proxying (theoretically slightly faster, but removes no dynamic key addition) - -### Known Issues - -* Observable objects can no longer be frozen (otherwise they would become un-observable😎). If you are actually trying to do so MobX will now throw an exception like: `[mobx] Dynamic observable objects cannot be frozen]`. A place where that might happen unexpectedly is when passing an observable object as `style` property to a React component. Like ``, since React will freeze all style objects. The work-around is to simply pass a fresh, non-observable object for styling like: ``. -* ~~If you are using `mobx` with `mobx-react`, and you are upgrading `mobx-react` to the MobX 5 compatible version (`mobx-react@5.2.0`) you will notice that `this.props` or `this.state` are not yet observable in the `constructor` or `componentWillMount`. This is for forward compatibility with React 16.3 where `componentWillMount` has been deprecated. In most cases using `componentDidMount` instead will suffice, especially when the goal is to setup reactions. For more info see [#478](https://github.com/mobxjs/mobx-react/issues/478).~~ Fixed in mobx-react 5.2.1. But note that you should still migrate away from `componentWillMount`😎. -* Jest `toEqual` might throw an error `allKeys[x].match is not a function` when trying to equal observable arrays. This is a bug in Jest [report](https://github.com/facebook/jest/issues/6398). The simple work around for now is to slice (or `toJS` if the problem is recursive) the array first. -* Jest `toEqual` matcher might no longer correctly equal your class instances, complaining about differences in the MobX adminstration. This is due to a bug with the processing of symbols: [report](https://github.com/facebook/jest/issues/6392). For now you might want to use a custom matcher if you are directly equalling observable objects. As a work around `toJS(object)` could be used before diffing. - -_Note June 7th, 2018:_ Both issues are already in Jest master and should be released soon. - -### Migration guide - -* Make sure to not use any API that produces deprecation warnings in MobX 4. Beyond that MobX 5 should pretty well as drop-in replacement of MobX 4. -* You _could_ perform the following clean ups: - * Don't `slice()` arrays when passing them to external libraries. (Note you still shouldn't pass observable data structures to non-`observer` React components, which is an orthogonal concept) - * You could replace observable maps with observable objects if you are only using string-based keys. -* Don't call the `reverse` or `sort` operations directly on observableArray's anymore, as it's behavior slightly differed from the built-in implementations of those methods. Instead use `observableArray.slice().sort()` to perform the sort on a copy. This gives no additional performance overhead compared to MobX 4. (The reason behind this is that built-in `sort` updates the array in place, but the observable array implementation always performed the sort on a defensive copy, and this change makes that explicit). - - -### API's that have been dropped - -* The `arrayBuffer` setting is no longer supported by `configure` (it has become irrelevant) -* `observable.shallowBox`, `observable.shallowArray`, `observable.shallowMap`, `observable.shallowObject`, `extendShallowObservable` api's have been removed. Instead, pass `{ deep: false }` to their non-shallow counter parts. -* `observableArray.peek`, `observableArray.move` - -# 4.3.1 - -* Fixed [#1534](Fixes https://github.com/mobxjs/mobx/issues/1534): @computed({keepAlive: true}) no long calculates before being accessed. -* Added the `$mobx` export symbol for MobX 5 forward compatibity - -# 4.3.0 - -* Introduced the `entries(observable)` API, by @samjacobclift through [#1536](https://github.com/mobxjs/mobx/pull/1536) -* Fixed [#1535](https://github.com/mobxjs/mobx/issues/1535): Change in nested computed value was not propagated if read outside action context when there is a pending reaction. For more details see the exact test case. -* Illegal property access through prototypes is now a warning instead of an error. Fixes [#1506](https://github.com/mobxjs/mobx/issues/1506). By @AmazingTurtle through [#1529](https://github.com/mobxjs/mobx/pull/1529) -* Fixed issue where providing a custom setter to `@computed({ set: ... })` wasn't picked up -* Fixed #1545: Actions properties where not re-assignable when using TypeScript -* Illegal Access checks are now a warning instead of an error. Fix - -# 4.2.1 - -* Fixed flow typings for `mobx.configure` [#1521](https://github.com/mobxjs/mobx/pull/1521) by @andrew--r -* Improved typings for `mobx.flow`, fixes [#1527](https://github.com/mobxjs/mobx/issues/1527) -* Throw error when using `@observable` in combination with a getter. [#1511](https://github.com/mobxjs/mobx/pull/1511) by @quanganhtran -* `toJS` now uses Map internally, for faster detection of cycles. [#1517](https://github.com/mobxjs/mobx/pull/1517) by @loatheb -* Fixed [#1512](https://github.com/mobxjs/mobx/issues/1512): `observe` hooks not being triggered when using `mobx.set`, Fixed in [#1514](https://github.com/mobxjs/mobx/pull/1514) by @quanganhtran -* Several minor improvements, additional tests and doc improvements. - -# 4.2.0 - -* Introduced `configure({ enforceActions: "strict" })`, which is more strict then `enforceActions: true`, as it will also throw on non-observed changes to observables. See also [#1473](https://github.com/mobxjs/mobx/issues/1473) -* Fixed [#1480](https://github.com/mobxjs/mobx/issues/1480): Exceptions in the effect handler of `reaction` where not properly picked up by the global reaction system -* Fixed a bug where computed values updated their cached value, even when the comparer considered the new value equal to the previous one. Thanks @kuitos for finding this and fixing it! [#1499](https://github.com/mobxjs/mobx/pull/1499) -* Undeprecated `ObservableMap`, fixes [#1496](https://github.com/mobxjs/mobx/issues/1496) -* Observable arrays now support `Symbol.toStringTag` (if available / polyfilled). This allows libraries like Ramda to detect automatically that observable arrays are arrays. Fixes [#1490](https://github.com/mobxjs/mobx/issues/1490). Note that `Array.isArray` will keep returning false for the entire MobX 4 range. -* Actions are now always `configurable` and `writable`, like in MobX 3. Fixes [#1477](https://github.com/mobxjs/mobx/issues/1477) -* Merged several improvements to the flow typings. [#1501](https://github.com/mobxjs/mobx/pull/1501) by @quanganhtran -* Fixed several accidental usages of the global `fail`, by @mtaran-google through [#1483](https://github.com/mobxjs/mobx/pull/1483) and [#1482](https://github.com/mobxjs/mobx/pull/1482) - -# 4.1.1 - -* Import `default` from MobX will no longer throw, but only warn instead. This fixes some issues with tools that reflect on the `default` export of a module -* Disposing a spy listener inside a spy handler no longer causes an exception. Fixes [#1459](https://github.com/mobxjs/mobx/issues/1459) through [#1460](https://github.com/mobxjs/mobx/pull/1460) by [farwayer](https://github.com/farwayer) -* Added a missing `runInAction` overload in the flow typings. [#1451](https://github.com/mobxjs/mobx/pull/1451) by [AMilassin](https://github.com/mobxjs/mobx/issues?q=is%3Apr+author%3AAMilassin) -* Improved the typings of `decorate`. See [#1450](https://github.com/mobxjs/mobx/pull/1450) by [makepost](https://github.com/mobxjs/mobx/issues?q=is%3Apr+author%3Amakepost) - -# 4.1.0 - -* Introduced `keepAlive` as option to `computed` -* All observable api's now default to `any` for their generic arguments -* Improved `flow` cancellation -* The effect of `when` is now automatically an action. -* `@computed` properties are now declared on their owner rather then the protoptype. Fixes an issue where `@computed` fields didn't work in React Native on proxied objects. See [#1396](https://github.com/mobxjs/mobx/issues/1396) -* `action` and `action.bound` decorated fields are now reassignable, so that they can be stubbed - -# 4.0.2 - -* Fixed issue where exceptions like `TypeError: Cannot define property:__mobxDidRunLazyInitializers, object is not extensible.` were thrown. Fixes [#1404](https://github.com/mobxjs/mobx/issues/1404) -* Improved flow typings for `flow`, [#1399](https://github.com/mobxjs/mobx/pull/1399) by @ismailhabib - -# 4.0.1 - -* Updated flow typings, see [#1393](https://github.com/mobxjs/mobx/pull/1393) by [andrew--r](https://github.com/andrew--r) - -# 4.0.0 - -* For the highlights of this release, read the [blog](https://medium.com/p/c1fbc08008da/): -* For migration notes: see the [wiki page](https://github.com/mobxjs/mobx/wiki/Migrating-from-mobx-3-to-mobx-4) -* Note; many things that were removed to make the api surface smaller. If you think some feature shouldn't have been removed, feel free to open an issue! - -This is the extensive list of all changes. - -### New features - -The changes mentioned here are discussed in detail in the [release highlights](https://medium.com/p/c1fbc08008da/), or were simply updated in the docs. - -* MobX 4 introduces separation between the production and non production build. The production build strips most typechecks, resulting in a faster and smaller build. Make sure to substitute process.env.NODE_ENV = "production" in your build process! If you are using MobX in a react project, you most probably already have set this up. Otherwise, the idea is explained [here](https://reactjs.org/docs/add-react-to-an-existing-app.html). -* Introduced `flow` to create a chain of async actions. This is the same function as [`asyncActions`](https://github.com/mobxjs/mobx-utils#asyncaction) of the mobx-utils package -* These `flow`'s are now cancellable, by calling `.cancel()` on the returned promise, which will throw a cancellation exception into the generator function. -* `flow` also has experimental support for async iterators (`async * function`) -* Introduced `decorate(thing, decorators)` to decorate classes or object without needing decorator syntax. -* Introduced `onBecomeObserved` and `onBecomeUnobserved`. These API's enable hooking into the observability system and get notified about when an observable starts / stops becoming used. This is great to automaticaly fetch data from external resources, or stop doing so. -* `computed` / `@computed` now accepts a `requiresReaction` option. If it set, the computed value will throw an exception if it is being read while not being tracked by some reaction. -* To make `requiresReaction` the default, use `mobx.configure({ computedRequiresReaction: true })` -* Introduced `mobx.configure({ disableErrorBoundaries })`, for easier debugging of exceptoins. By [NaridaL](https://github.com/NaridaL) through [#1262](https://github.com/mobxjs/mobx/pull/1262) -* `toJS` now accepts the options: `{ detectCycles?: boolean, exportMapsAsObjects?: boolean }`, both `true` by default -* Observable maps are now backed by real ES6 Maps. This means that any value can be used as key now, not just strings and numbers. -* The flow typings have been updated. Since this is a manual effort, there can be mistakes, so feel free to PR! - -* `computed(fn, options?)` / `@computed(options) get fn()` now accept the following options: - * `set: (value) => void` to set a custom setter on the computed property - * `name: "debug name"` - * `equals: fn` the equality value to use for the computed to determine whether its output has changed. The default is `comparer.default`. Alternatives are `comparer.structural`, `comparer.identity` or just your own comparison function. - * `requiresReaction: boolean` see above. - -* `autorun(fn, options?)` now accepts the following options: - * `delay: number` debounce the autorun with the given amount of milliseconds. This replaces the MobX 3 api `autorunAsync` - * `name: "debug name"` - * `scheduler: function` a custom scheduler to run the autorun. For example to connect running the autorun to `requestAnimationFrame`. See the docs for more details - * `onError`. A custom error handler to be notified when an autorun throws an exception. - -* `reaction(expr, effect, options?)` now accepts the following options: - * `delay: number` debounce the autorun with the given amount of milliseconds. This replaces the MobX 3 api `autorunAsync` - * `fireImmediately`. Immediately fire the effect function after the first evaluation of `expr` - * `equals`. Custom equality function to determine whether the `expr` function differed from its previous result, and hence should fire `effect`. Accepts the same options as the `equals` option of computed. - * All the options `autorun` accepts - -* `when(predicate, effect?, options?)` now accepts the following options: - * `name: "debug name"` - * `onError`. A custom error handler to be notified when an autorun throws an exception. - * `timeout: number` a timeout in milliseconds, after which the `onError` handler will be triggered to signal the condition not being met within a certain time -* The `effect` parameter of `when` has become optional. If it is omitted, `when` will return a promise. This makes it easy to `await` a condition, for example: `await when(() => user.profile.loaded)`. The returned promise can be cancelled using `promise.cancel()` - -* There is now an utility API that enables manipulating observable maps, objects and arrays with the same api. These api's are fully reactive, which means that even new property declarations can be detected by mobx if `set` is used to add them, and `values` or `keys` to iterate them. - * `values(thing)` returns all values in the collection as array - * `keys(thing)` returns all keys in the collection as array - * `set(thing, key, value)` or `set(thing, { key: value })` Updates the given collection with the provided key / value pair(s). - * `remove(thing, key)` removes the specified child from the collection. For arrays splicing is used. - * `has(thing, key)` returns true if the collection has the specified _observable_ property. - * `get(thing, key)` returns the chlid under the specified key. - -* `observable`, `observable.array`, `observable.object`, `observable.map` and `extendObservable` now accept an additional options object, which can specify the following attributes: - * `name: "debug name"` - * `deep: boolean`. `true` by default, indicates whether the children of this collection are automatically converted into observables as well. - * `defaultDecorator: ` specifies the default decorator used for new children / properties, by default: `observable.deep`, but could be changed to `observable.ref`, `observable.struct` etc. (The `deep` property is just a short-hand for switching between `observable.deep` or `observable.ref` as default decorator for new properties) - - -### Breaking changes - -The changes mentioned here are discussed in detail in the [migration notes](https://github.com/mobxjs/mobx/wiki/Migrating-from-mobx-3-to-mobx-4) - -* MobX 4 requires `Map` to be globally available. Polyfill it if targeting IE < 11 or other older browsers. -* For typescript users, MobX now requires `Map` and several `Symbol`s to exist for its typings. So make sure that the `lib` configuration of your project is set to `"es6"`. (The compilation target can still be `"es5"`) -* `observable.shallowArray(values)` has been removed, instead use `observable.array(values, { deep: false })` -* `observable.shallowMap(values)` has been removed, instead use `observable.map(values, { deep: false })` -* `observable.shallowObject(values)` has been removed, instead use `observable.object(values, {}, { deep: false })` -* `extendShallowObservable(target, props)`, instead use `extendObservable(target, props, {}, { deep: false })` -* The decorators `observable.ref`, `observable.shallow`, `observable.deep`, `observable.struct` can no longer be used as functions. Instead, they should be passed as part of the `decorators` param to resp. `observable.object` and `extendObservable` -* The new signature of `extendObservable` is `extendObservable(target, props, decorators?, options?)`. This also means it is no longer possible to pass multiple bags of properties to `extendObservable`. `extendObservable` can no longer be used to re-declare properties. Use `set` instead to update existing properties (or introduce new ones). -* Iterating maps now follows the spec, that is, `map.values()`, `map.entries()`, `map.keys()`, `map[@@iterator]()` and `array[@@iterator]()` no longer return an array, but an iterator. Use `mobx.values(map)` or `Array.from(map)` to convert the iterators to arrays. -* dropped `@computed.equals`, instead, you can now use `@computed({ equals: ... })` -* `useStrict(boolean)` was dropped, use `configure({ enforceActions: boolean })` instead -* `isolateGlobalState` was dropped, use `configure({ isolateGlobalState: true})` instead -* If there are multiple mobx instances active in a single project, an exception will be thrown. Previously only a warning was printed. Fixes #1098. For details, see [#1082](https://github.com/mobxjs/mobx/issues/1082). -* Dropped the `shareGlobalState` feature. Instead, projects should be setup properly and it is up to the hosting package to make sure that there is only one MobX instance -* `expr` has been moved to mobx-utils. Remember, `expr(fn)` is just `computed(fn).get()` -* `createTransformer` has been moved to mobx-utils -* Passing `context` explicitly to `autorun`, `reaction` etc is no longer supported. Use arrow functions or function.bind instead. -* Removed `autorunAsync`. Use the `delay` option of `autorun` instead. -* `autorun`, `when`, `reaction` don't support name as first argument anymore, instead pass the `name` option. -* The `extras.` namespace has been dropped to enable tree-shaking non-used MobX features. All methods that where there originally are now exported at top level. If they are part of the official public API (you are encouraged to use them) they are exported as is. If they are experimental or somehow internal (you are discouraged to use them), they are prefixed with `_`. -* Dropped bower support. Fixes #1263 -* The `spyReportStart`, `spyReportEnd`, `spyReport` and `isSpyEnabled` are no longer public. It is no longer possible to emit custom spy events as to avoid confusing in listeners what the possible set of events is. -* Dropped `isStrictModeEnabled` -* `observable(value)` will only succeed if it can turn the value into an observable data structure (a Map, Array or observable object). But it will no longer create an observable box for other values to avoid confusion. Call `observable.box(value)` explictly in such cases. -* `isComputed` and `isObservable` no longer accept a property as second argument. Instead use `isComputedProp` and `isObservableProp`. -* Removed `whyRun`, use `trace` instead -* The spy event signature has slightly changed -* The `Atom` class is no longer exposed. Use `createAtom` instead (same signature). -* Calling reportObserved() on a self made atom will no longer trigger the hooks if reportObserved is triggered outside a reactive context. -* The options `struct` and `compareStructural` for computed values are deprecated, use `@computed.struct` or `computed({ equals: comparer.structural})` instead. -* `isModifierDescriptor` is no longer exposed. -* `deepEqual` is no longer exposed, use `comparer.structural` instead. -* `setReactionScheduler` -> `configure({ reactionScheduler: fn })` -* `reserveArrayBuffer` -> `configure({ reactionErrorHandler: fn })` -* `ObservableMap` is no longer exposed as constructor, use `observable.map` or `isObservableMap` instead -* `map` -> `observable.map` -* `runInAction` no longer accepts a custom scope -* Dropped the already deprecated and broken `default` export that made it harder to tree-shake mobx. Make sure to always use `import { x } from "mobx"` and not `import mobx from "mobx"`. -* Killed the already deprecated modifiers `asFlat` etc. If you war still using this, see the MobX 2 -> 3 migration notes. -* Observable maps now fully implement the map interface. See [#1361](https://github.com/mobxjs/mobx/pull/1361) by [Marc Fallows](https://github.com/marcfallows) -* Observable arrays will no longer expose the `.move` method -* Dropped the `observable.deep.struct` modifier -* Dropped the `observable.ref.struct` modifier -* `observable.struct` now behaves like `observable.ref.struct` (this used to be `observable.deep.struct`). That is; values in an `observable.struct` field will be stored as is, but structural comparison will be used when assigning a new value -* IReactionDisposer.onError has been removed, use the `onError` option of reactions instead - -### Issues fixed in this release: - -The issues are incoprorated in the above notes. - -* [#1316](https://github.com/mobxjs/mobx/issues/1316) - Improve `observable` api -* [#992](https://github.com/mobxjs/mobx/issues/992) - `onBecomeObserved` & `onBecomeUnobserved` -* [#1301](https://github.com/mobxjs/mobx/issues/1301) - Set `onError` handler when creating reactions -* [#817](https://github.com/mobxjs/mobx/issues/817) - Improve typings of `observe` -* [#800](https://github.com/mobxjs/mobx/issues/800) - Use `Map` as backend implementation of observable maps -* [#1361](https://github.com/mobxjs/mobx/issues/1361) - Make observableMaps structurally correct maps -* [#813](https://github.com/mobxjs/mobx/issues/813) - Create separate dev and production builds -* [#961](https://github.com/mobxjs/mobx/issues/961), [#1197](https://github.com/mobxjs/mobx/issues/1197) - Make it possible to forbid reading an untracked computed value -* [#1098](https://github.com/mobxjs/mobx/issues/1098) - Throw instead of warn if multiple MobX instances are active -* [#1122](https://github.com/mobxjs/mobx/issues/1122) - Atom hooks fired to often for observable maps -* [#1148](https://github.com/mobxjs/mobx/issues/1148) - Disposer of reactions should also cancel all scheduled effects -* [#1241](https://github.com/mobxjs/mobx/issues/1241) - Make it possible to disable error boundaries, to make it easier to find exceptions -* [#1263](https://github.com/mobxjs/mobx/issues/1263) - Remove bower.json - -# 3.6.2 - -* Fixed accidental dependency on the `node` typings. Fixes [#1387](https://github.com/mobxjs/mobx/issues/1387) / [#1362](https://github.com/mobxjs/mobx/issues/1387) - -# 3.6.1 - -* Fixed [#1358](https://github.com/mobxjs/mobx/pull/1359): Deep comparison failing on IE11. By [le0nik](https://github.com/le0nik) through [#1359](https://github.com/mobxjs/mobx/pull/1359) - -# 3.6.0 - -* Fixed [#1118](https://github.com/mobxjs/mobx/issues/1118), the deepEquals operator build into mobx gave wrong results for non-primitive objects. This affected for example `computed.struct`, or the `compareStructural` of `reaction` - -# 3.5.0/1 - -* Introduced `trace` for easier debugging of reactions / computed values. See the [docs](https://mobx.js.org/best/trace.html) for details. -* Improved typings of `observableArray.find`, see [#1324](https://github.com/mobxjs/mobx/pull/1324) for details. - -# 3.4.1 - -* Republished 3.4.0, because the package update doesn't seem to distibute consistently through yarn / npm - -# 3.4.0 - -* Improve Flow support by exposing typings regularly. Flow will automatically include them now. In your `.flowconfig` will have to remove the import in the `[libs]` section (as it's done [here](https://github.com/mobxjs/mobx/pull/1254#issuecomment-348926416)). Fixes [#1232](https://github.com/mobxjs/mobx/issues/1232). - -# 3.3.3 - -* Fixed regression bug where observable map contents could not be replaced using another observable map [#1258](https://github.com/mobxjs/mobx/issues/1258) -* Fixed weird exception abot not being able to read `length` property of a function, see[#1238](https://github.com/mobxjs/mobx/issues/1238) through [#1257](https://github.com/mobxjs/mobx/issues/1238) by @dannsam - -# 3.3.2 - -* Fix bug where custom comparers could be invoked with `undefined` values. Fixes [#1208](https://github.com/mobxjs/mobx/issues/1208) -* Make typings for observable stricter when using flow [#1194](https://github.com/mobxjs/mobx/issues/1194), [#1231](https://github.com/mobxjs/mobx/issues/1231) -* Fix a bug where `map.replace` would trigger reactions for unchanged values, fixes [#1243](https://github.com/mobxjs/mobx/issues/1243) -* Fixed issue where `NaN` was considered unequal to `NaN` when a deep compare was made [#1249](https://github.com/mobxjs/mobx/issues/1249) - -# 3.3.1 - -* Fix bug allowing maps to be modified outside actions when using strict mode, fixes [#940](https://github.com/mobxjs/mobx/issues/940) -* Fixed [#1139](https://github.com/mobxjs/mobx/issues/1139) properly: `transaction` is no longer deprecated and doesn't disable tracking properties anymore -* Fixed [#1120](https://github.com/mobxjs/mobx/issues/1139): `isComputed` should return false for non-existing properties - -# 3.3.0 - -* Undeprecated `transaction`, see [#1139](https://github.com/mobxjs/mobx/issues/1139) -* Fixed typings of reaction [#1136](https://github.com/mobxjs/mobx/issues/1136) -* It is now possible to re-define a computed property [#1121](https://github.com/mobxjs/mobx/issues/1121) -* Print an helpful error message when using `@action` on a getter [#971](https://github.com/mobxjs/mobx/issues/971) -* Improved typings of intercept [#1119](https://github.com/mobxjs/mobx/issues/1119) -* Made code base Prettier [#1103](https://github.com/mobxjs/mobx/issues/1103) -* react-native will now by default use the es module build as well. -* Added support for Weex, see [#1163](https://github.com/mobxjs/mobx/pull/1163/) -* Added workaround for Firefox issue causing MobX to crash, see [#614](https://github.com/mobxjs/mobx/issues/614) - -# 3.2.2 - -* Fixes a bug (or a known limitation) described in [#1092](https://github.com/mobxjs/mobx/issue/1092/). It is now possible to have different observable administration on different levels of the prototype chain. By @guillaumeleclerc -* Fixed a build issue when using mobx in a project that was using rollup, fixes [#1099](https://github.com/mobxjs/mobx/issue/1099/) by @rossipedia -* Fixed typings of `useStrict`, by @rickbeerendonk - -# 3.2.1 - -* Introduced customizable value comperators to reactions and computed values. `reaction` and `computed` now support an additional option, `equals`, which takes a comparision function. See [#951](https://github.com/mobxjs/mobx/pull/951/) by @jamiewinder. Fixes #802 and #943. See the updated [`computed` docs](https://mobx.js.org/refguide/computed-decorator.html) for more details. - -# 3.2.0 - -* MobX will warn again when there are multiple instances of MobX loaded, as this lead to often to confusing bugs if the project setup was not properly. The signal mobx that multiple instances are loaded on purpose, use `mobx.extras.runInSandbox`. See [#1082](https://github.com/mobxjs/mobx/issues/1082) for details. - -# 3.1.17 - -* Improved typings of `IObservableArray.intercept`: use more restrictive types for `change` parameter of `handler`, by @bvanreeven -* Fixed [#1072](https://github.com/mobxjs/mobx/issues/1072), fields without a default value could not be observed yet when using TypeScript - -# 3.1.16 - -* Restored `default` export (and added warning), which broke code that was importing mobx like `import mobx from "mobx"`. Use `import * as mobx from "mobx"` or use named importes instead. By @andykog, see #1043, #1050 -* Fixed several typos in exceptions and documentation - -# 3.1.15 - -* Fixed issue where `array.remove` did not work correctly in combination with `extras.interceptReads` - -# 3.1.14 - -* Fixed 3.1.12 / 3.1.13 module packing. See #1039; `module` target is now transpiled to ES5 as well - -# 3.1.13 (Unpublished: Uglify chokes on it in CRA) - -* Fixed build issue with webpack 2, see #1040 - -# 3.1.12 (Unpublished: wasn't being bundled correctly by all bundlers) - -* Added support for ES modules. See #1027 by @rossipedia -* Improved flow typings. See #1019 by @fb55 -* Introduced experimental feature `extras.interceptReads(observable: ObservableMap | ObservableArray | ObservableObject | ObservableBox, property?: string, handler: value => value): Disposer` that can be used to intercept _reads_ from observable objects, to transform values on the fly when a value is read. One can achieve similar things with this as with proxying reads. See #1036 - -# 3.1.11 - -* Using rollup as bundler, instead of custom hacked build scripts, by @rossipedia, see #1023 - -# 3.1.10 - -* Fixed flow typings for `when`, by @jamsea -* Add flow typings for `map.replace`, by @leader22 -* Added `observableArray.findIndex`, by @leader22 -* Improved typings of `autorun` / `autorunAsync` to better support async / await, by @capaj -* Fixed typings of `action.bound`, see #803 - -# 3.1.9 - -* Introduced explicit `.get(index)` and `.set(index, value)` methods on observable arrays, for issues that have trouble handling many property descriptors on objects. See also #734 -* Made sure it is safe to call `onBecomeObserved` twice in row, fixes #874, #898 -* Fixed typings of `IReactionDisposer` - -# 3.1.8 - -* Fixed edge case where `autorun` was not triggered again if a computed value was invalidated by the reaction itself, see [#916](https://github.com/mobxjs/mobx/issues/916), by @andykog -* Added support for primtive keys in `createTransformer`, See #920 by @dnakov -* Improved typings of `isArrayLike`, see #904, by @mohsen1 - -# 3.1.7 - -* Reverted ES2015 module changes, as they broke with webpack 2 (will be re-released later) - -# 3.1.6 (Unpublished) - -* Expose ES2015 modules to be used with advanced bundlers, by @mohsen1, fixes #868 -* Improved typings of `IObservableArray.intercept`: remove superflous type parameter, by @bvanreeven -* Improved typings of map changes, by @hediet - -# 3.1.5 - -* Improved typings of map changes, see #847, by @hediet -* Fixed issue with `reaction` if `fireImmediately` was combined with `delay` option, see #837, by @SaboteurSpk - -# 3.1.4 - -* Observable maps initialized from ES6 didn't deeply convert their values to observables. (fixes #869,by @ggarek) - -# 3.1.3 - -* Make sure that `ObservableArray.replace` can handle large arrays by not using splats internally. (See e.g. #859) -* Exposed `ObservableArray.spliceWithArray`, that unlike a normal splice, doesn't use a variadic argument list so that it is possible to splice in new arrays that are larger then allowed by the callstack. - -# 3.1.2 - -* Fixed incompatiblity issue with `mobx-react@4.1.0` - -# 3.1.1 (unpublished) - -* Introduced `isBoxedObservable(value)`, fixes #804 - -# 3.1.0 - -### Improved strict mode - -Strict mode has been relaxed a bit in this release. Also computed values can now better handle creating new observables (in an action if needed). The semantics are now as follows: - -* In strict mode, it is not allowed to modify state that is already being _observed_ by some reaction. -* It is allowed to create and modify observable values in computed blocks, as long as they are not _observed_ yet. - -In order words: Observables that are not in use anywhere yet, are not protected by MobX strict mode. -This is fine as the main goal of strict mode is to avoid kicking of reactions at undesired places. -Also strict mode enforces batched mutations of observables (through action). -However, for unobserved observables this is not relevant; they won't kick of reactions at all. - -This fixes some uses cases where one now have to jump through hoops like: -* Creating observables in computed properties was fine already, but threw if this was done with the aid of an action. See issue [#798](https://github.com/mobxjs/mobx/issues/798). -* In strict mode, it was not possible to _update_ observable values without wrapping the code in `runInAction` or `action`. See issue [#563](https://github.com/mobxjs/mobx/issues/563) - -Note that the following constructions are still anti patterns, although MobX won't throw anymore on them: -* Changing unobserved, but not just created observables in a computed value -* Invoke actions in computed values. Use reactions like `autorun` or `reaction` instead. - -Note that observables that are not in use by a reaction, but that have `.observe` listeners attached, do *not* count towards being observed. -Observe and intercept callbacks are concepts that do not relate to strict mode, actions or transactions. - -### Other changes - -* Reactions and observable values now consider `NaN === NaN`, See #805 by @andykog -* Merged #783: extract error messages to seperate file, so that they can be optimized in production builds (not yet done), by @reisel, #GoodnessSquad -* Improved typings of actions, see #796 by @mattiamanzati - -# 3.0.2 - -* Fixed issue where MobX failed on environments where `Map` is not defined, #779 by @dirtyrolf -* MobX can now be compiled on windows as well! #772 by @madarauchiha #GoodnessSquad -* Added documentation on how Flow typings can be used, #766 by @wietsevenema -* Added support for `Symbol.toPrimitive()` and `valueOf()`, see #773 by @eladnava #GoodnessSquad -* Supressed an exception that was thrown when using the Chrome Developer tools to inspect arrays, see #752 - -Re-introduced _structural comparison_. Seems we couldn't part from it yet :). So the following things have been added: - -* `struct` option to `reaction` (alias for `compareStructural`, to get more consistency in naming) -* `observable.struct`, as alias for `observable.deep.struct` -* `observable.deep.struct`: Only stores a new value and notify observers if the new value is not structurally the same as the previous value. Beware of cycles! Converts new values automatically to observables (like `observable.deep`) -* `observable.ref.struct`: Only stores a new value and notify observers if the new value is not structurally the same as the previous value. Beware of cycles! Doesn't convert the new value into observables. -* `extras.deepEquals`: Check if two data structures are deeply equal. supports observable and non observable data structures. - -# 3.0.1 - -* `toString()` of observable arrays now behaves like normal arrays (by @capaj, see #759) -* Improved flow types of `toJS`by @jamsea (#758) - -# 3.0.0 - -The changelog of MobX 3 might look quite overwhelming, but migrating to MobX 3 should be pretty straight forward nonetheless. -The api has now become more layered, and the api is more uniform and modifiers are cleaned up. -In practice, you should check your usage of modifiers (`asFlat`, `asMap` etc.). Besides that the migration should be pretty painless. -Please report if this isn't the case! -Note that no changes to the runtime algorithm where made, almost all changes evolve in making the creation of observables more uniform, and removing deprecated stuff. - -## `observable` api has been redesigned - -The api to create observables has been redesigned. -By default, it keeps the automatic conversion behavior from MobX 2. -However, one can now have more fine grained control on how / which observables are constructed. -Modifiers still exists, but they are more regular, and there should be less need for them. - -### `observable(plainObject)` will no longer enhance objects, but clone instead - -When passing a plain object to `observable`, MobX used to modify that object inplace and give it observable capabilities. -This also happened when assigning a plain object to an observable array etc. -However, this behavior has changed for a few reasons - -1. Both arrays and maps create new data structure, however, `observable(object)` didn't -2. It resulted in unnecessary and confusing side effects. If you passed an object you received from some api to a function that added it, for example, to an observable collection. Suddenly your object would be modified as side effect of passing it down to that function. This was often confusing for beginners and could lead to subtle bugs. -3. If MobX in the future uses Proxies behind the scenes, this would need to change as well - -If you want, you can still enhance existing plainObjects, but simply using `extendObservable(data, data)`. This was actually the old implementation, which has now changed to `extendObservable({}, data)`. - -As always, it is best practice not to have transportation objects etc lingering around; there should be only one source of truth, and that is the data that is in your observable state. -If you already adhered to this rule, this change won't impact you. - -See [#649](https://github.com/mobxjs/mobx/issues/649) - -### Factories per observable type - -There are now explicit methods to create an observable of a specific type. - -* `observable.object(props, name?)` creates a new observable object, by cloning the give props and making them observable -* `observable.array(initialValues, name?)`. Take a guess.. -* `observable.map(initialValues, name?)` -* `observable.box(initialValue, name?)`. Creates a [boxed](http://mobxjs.github.io/mobx/refguide/boxed.html) value, which can be read from / written to using `.get()` and `.set(newValue)` -* `observable(value)`, as-is, based on the type of `value`, uses any of the above four functions to create a new observable. - -### Shallow factories per type - -The standard observable factories create observable structures that will try to turn any plain javascript value (arrays, objects or Maps) into observables. -Allthough this is fine in most cases, in some cases you might want to disable this autoconversion. -For example when storing objects from external libraries. -In MobX 2 you needed to use `asFlat` or `asReference` modifiers for this. -In MobX 3, there are factories to directly create non-converting data structures: - -* `observable.shallowObject(props, name?)` -* `observable.shallowArray(initialValues, name?)` -* `observable.shallowMap(initialValues, name?)` -* `observable.shallowBox(initialValue, name?)` - -So for example, `observable.shallowArray([todo1, todo2])` will create an observable array, but it won't try to convert the todos inside the array into observables as well. - -### Shallow properties - -The `@observable` decorator can still be used to introduce observable properties. And like in MobX 2, it will automatically convert its values. - -However, sometimes you want to create an observable property that does not convert its _value_ into an observable automatically. -Previously that could be written as `@observable x = asReference(value)`. - -### Structurally comparison of observables have been removed - -This was not for a technical reason, but they just seemed hardly used. -Structural comparision for computed properties and reactions is still possible. -Feel free to file an issue, including use case, to re-introduce this feature if you think you really need it. -However, we noticed that in practice people rarely use it. And in cases where it is used `reference` / `shallow` is often a better fit (when using immutable data for example). - -### Modifiers - -Modifiers can be used in combination `@observable`, `extendObservable` and `observable.object` to change the autoconversion rules of specific properties. - -The following modifiers are available: - -* `observable.deep`: This is the default modifier, used by any observable. It converts any assigned, non-primitive value into an observable value if it isn't one yet. -* `observable.ref`: Disables automatic observable conversion, just creates an observable reference instead. -* `observable.shallow`: Can only used in combination with collections. Turns any assigned collection into an collection, which is shallowly observable (instead of deep) - -Modifiers can be used as decorator: - -```javascript -class TaskStore { - @observable.shallow tasks = [] -} -``` - -Or as property modifier in combination with `observable.object` / `observable.extendObservable`. -Note that modifiers always 'stick' to the property. So they will remain in effect even if a new value is assigned. - -```javascript -const taskStore = observable({ - tasks: observable.shallow([]) -}) -``` - -See [modifiers](http://mobxjs.github.io/mobx/refguide/modifiers.html) - -### `computed` api has been simplified - -Using `computed` to create boxed observables has been simplified, and `computed` can now be invoked as follows: -* `computed(expr)` -* `computed(expr, setter)` -* `computed(expr, options)`, where options is an object that can specify one or more of the following fields: `name`, `setter`, `compareStructural` or `context` (the "this"). - -Computed can also be used as a decorator: - -* `@computed` -* `@computed.struct` when you want to compareStructural (previously was `@computed({asStructure: true})`) - -### `reaction` api has been simplified - -The signature of `reaction` is now `reaction(dataFunc, effectFunc, options?)`, where the following options are accepted: - -* `context`: The `this` to be used in the functions -* `fireImmediately` -* `delay`: Number in milliseconds that can be used to debounce the effect function. -* `compareStructural`: `false` by default. If `true`, the return value of the *data* function is structurally compared to its previous return value, and the *effect* function will only be invoked if there is a structural change in the output. -* `name`: String - -### Bound actions - -It is now possible to create actions and bind them in one go using `action.bound`. See [#699](https://github.com/mobxjs/mobx/issues/699). -This means that now the following is possible: - -```javascript -class Ticker { - @observable tick = 0 - - @action.bound - increment() { - this.tick++ // 'this' will always be correct - } -} - -const ticker = new Ticker() -setInterval(ticker.increment, 1000) -``` - -### Improve error handling - -Error handling in MobX has been made more consistent. In MobX 2 there was a best-effort recovery attempt if a derivation throws, but MobX 3 introduced -more consistent behavior: - -* Computed values that throw, store the exception and throw it to the next consumer(s). They keep tracking their data, so they are able to recover from exceptions in next re-runs. -* Reactions (like `autorun`, `when`, `reaction`, `render()` of `observer` components) will always catch their exceptions, and just log the error. They will keep tracking their data, so they are able to recover in next re-runs. -* The disposer of a reaction exposes an `onError(handler)` method, which makes it possible to attach custom error handling logic to an reaction (that overrides the default logging behavior). -* `extras.onReactionError(handler)` can be used to register a global onError handler for reactions (will fire after spy "error" event). This can be useful in tests etc. - -See [#731](https://github.com/mobxjs/mobx/issues/731) - -### Removed error handling, improved error recovery - -MobX always printed a warning when an exception was thrown from a computed value, reaction or react component: `[mobx] An uncaught exception occurred while calculating....`. -This warning was often confusing for people because they either had the impression that this was a mobx exception, while it actually is just informing about an exception that happened in userland code. -And sometimes, the actual exception was silently caught somewhere else. -MobX now does not print any warnings anymore, and just makes sure its internal state is still stable. -Not throwing or handling an exception is now entirely the responsibility of the user. - -Throwing an exception doesn't revert the causing mutation, but it does reset tracking information, which makes it possible to recover from exceptions by changing the state in such a way that a next run of the derivation doesn't throw. - -### Flow-Types Support 🎉🎉🎉 - -Flow typings have been added by [A-gambit](https://github.com/A-gambit). -Add flow types for methods and interfaces of observable variables: - -```js -const observableValue: IObservableValue = observable(1) -const observableArray: IObservableArray = observable([1,2,3]) - -const sum: IComputedValue = computed(() => { - return observableArray.reduce((a: number, b: number): number => a + b, 0) -}) -``` - -See [#640](https://github.com/mobxjs/mobx/issues/640) - -### MobX will no longer share global state by default - -For historical reasons (at Mendix), MobX had a feature that it would warn if different versions of the MobX package are being loaded into the same javascript runtime multiple times. -This is because multiple instances by default try to share their state. -This allows reactions from one package to react to observables created by another package, -even when both packages where shipped with their own (embedded) version of MobX (!). - -Obviously this is a nasty default as it breaks package isolation and might actually start to throw errors unintentionally when MobX is loaded multiple times in the same runtime by completely unrelated packages. -So this sharing behavior is now by default turned off. -Sharing MobX should be achieved by means of proper bundling, de-duplication of packages or using peer dependencies / externals if needed. -This is similar to packages like React, which will also bail out if you try to load it multiple times. - -If you still want to use the old behavior, this can be achieved by running `mobx.extras.shareGlobalState()` on _all_ packages that want to share state with each other. -Since this behavior is probably not used outside Mendix, it has been deprecated immediately, so if you rely on this feature, please report in #621, so that it can be undeprecated if there is no more elegant solution. - -See [#621](https://github.com/mobxjs/mobx/issues/621) - -### Using the @action decorator inside individual objects - -Don't use the `@action` decorator on an individual object that you pass to `observable()` or `extendObservable()`. If you have code that looks like `observable({ @action f: () => {})`, you should change it to `observable({ f: action(() => {})`. - -Whether or not this was ever a good idea is debatable, but it stopped working in this version. If you're using classes, it's a non-issue. - -### Other changes - -* **Breaking change:** The arguments to `observe` listeners for computed and boxed observables have changed and are now consistent with the other apis. Instead of invoking the callback with `(newValue: T, oldValue: T)` they are now invoked with a single change object: `(change: {newValue: T, oldValue: T, object, type: "update"})` -* Using transaction is now deprecated, use `action` or `runInAction` instead. Transactions now will enter an `untracked` block as well, just as actions, which removes the conceptual difference. -* Upgraded to typescript 2 -* It is now possible to pass ES6 Maps to `observable` / observable maps. The map will be converted to an observable map (if keys are string like) -* Made `action` more debug friendly, it should now be easier to step through -* ObservableMap now has an additional method, `.replace(data)`, which is a combination of `clear()` and `merge(data)`. -* Passing a function to `observable` will now create a boxed observable refering to that function -* Fixed #603: exceptions in transaction breaks future reactions -* Fixed #698: createTransformer should support default arguments -* Transactions are no longer reported grouped in spy events. If you want to group events, use actions instead. -* Normalized `spy` events further. Computed values and actions now report `object` instead of `target` for the scope they have been applied to. -* The following deprecated methods have been removed: - * `transaction` - * `autorunUntil` - * `trackTransitions` - * `fastArray` - * `SimpleEventEmitter` - * `ObservableMap.toJs` (use `toJS`) - * `toJSlegacy` - * `toJSON` (use `toJS`) - * invoking `observe` and `inject` with plain javascript objects - ---- - -# 2.7.0 - -### Automatic inference of computed properties has been deprecated. - -A deprecation message will now be printed if creating computed properties while relying on automatical inferrence of argumentless functions as computed values. In other words, when using `observable` or `extendObservable` in the following manner: - -```javascript -const x = observable({ - computedProp: function() { - return someComputation - } -}) - -// Due to automatic inferrence now available as computed property: -x.computedProp -// And not ! -x.computedProp() -``` - -Instead, to create a computed property, use: - -```javascript -observable({ - get computedProp() { - return someComputation - } -}) -``` - -or alternatively: - -```javascript -observable({ - computedProp: computed(function() { - return someComputation - }) -}) -``` - -This change should avoid confusing experiences when trying to create methods that don't take arguments. -The current behavior will be kept as-is in the MobX 2.* range, -but from MobX 3 onward the argumentless functions will no longer be turned -automatically into computed values; they will be treated the same as function with arguments. -An observable _reference_ to the function will be made and the function itself will be preserved. -See for more details [#532](https://github.com/mobxjs/mobx/issues/532) - -N.B. If you want to introduce actions on an observable that modify its state, using `action` is still the recommended approach: - -```javascript -observable({ - counter: 0, - increment: action(function() { - this.counter++ - }) -}) -``` - -By the way, if you have code such as: - -``` -observable({ - @computed get someProp() { ... } -}); -``` - -That code will no longer work. Rather, reactions will fail silently. Remove `@computed`. -Note, this only applies when using observable in this way; it doesn't apply when using -`@observable` on a property within a class declaration. - -### Misc - -* Fixed #701: `toJS` sometimes failing to convert objects decorated with `@observable` (cause: `isObservable` sometimes returned false on these object) -* Fixed typings for `when` / `autorun` / `reaction`; they all return a disposer function. - - -# 2.6.5 - -* Added `move` operation to observable array, see [#697](https://github.com/mobxjs/mobx/pull/697) - -# 2.6.4 - -* Fixed potential clean up issue if an exception was thrown from an intercept handler -* Improved typings of `asStructure` (by @nidu, see #687) -* Added support for `computed(asStructure(() => expr))` (by @yotambarzilay, see #685) - -# 2.6.3 - -* Fixed #603: exceptions in transaction breaks future reactions -* Improved typings of `toJS` -* Introduced `setReactionScheduler`. Internal api used by mobx-react@4 to be notified when reactions will be run - -# 2.6.2 - -* Changes related to `toJS` as mentioned in version `2.6.0` where not actually shipped. This has been fixed, so see release notes below. - -# 2.6.1 - -* Introduced convenience `isArrayLike`: returns whether the argument is either a JS- or observable array. By @dslmeinte -* Improved readme. By @DavidLGoldberg -* Improved assertion message, by @ncammarate (See [#618](https://github.com/mobxjs/mobx/pull/618)) -* Added HashNode badge, by @sandeeppanda92 - -# 2.6.0 - -_Marked as minor release as the behavior of `toJS` has been changed, which might be interpreted both as bug-fix or as breaking change, depending of how you interpreted the docs_ - -* Fixed [#566](https://github.com/mobxjs/mobx/pull/566): Fixed incorrect behavior of `toJS`: `toJS` will now only recurse into observable object, not all objects. The new behavior is now aligned with what is suggested in the docs, but as a result the semantics changed a bit. `toJSlegacy` will be around for a while implementing the old behavior. See [#589](See https://github.com/mobxjs/mobx/pull/589) for more details. -* Fixed [#571](https://github.com/mobxjs/mobx/pull/571): Don't use `instanceof` operator. Should fix issues if MobX is included multiple times in the same bundle. -* Fixed [#576](https://github.com/mobxjs/mobx/pull/576): disallow passing actions directly to `autorun`; as they won't be tracked by @jeffijoe -* Extending observable objects with other observable (objects) is now explicitly forbidden, fixes [#540](https://github.com/mobxjs/mobx/pull/540). - -# 2.5.2 - -* Introduced `isComputed` -* Observable objects can now have a type: `IObservableObject`, see [#484](https://github.com/mobxjs/mobx/pull/484) by @spiffytech -* Restored 2.4 behavior of boxed observables inside observable objects, see [#558](https://github.com/mobxjs/mobx/issues/558) - -# 2.5.1 - -* Computed properties can now be created by using getter / setter functions. This is the idiomatic way to introduce computed properties from now on: - -```javascript -const box = observable({ - length: 2, - get squared() { - return this.length * this.length - }, - set squared(value) { - this.length = Math.sqrt(value) - } -}) -``` - -# 2.5.0 - -* Core derivation algorithm has received some majore improvements by @asterius1! See below. Pr #452, 489 -* Introduced setters for computed properties, use `computed(expr, setter)` or `@computed get name() { return expr } set name (value) { action }`. `computed` can now be used as modifier in `observable` / `extendObservable`, #421, #463 (see below for example) -* Introduced `isStrictModeEnabled()`, deprecated `useStrict()` without arguments, see #464 -* Fixed #505, accessing an observable property throws before it is initialized - -MobX is now able track and memoize computed values while an (trans)action is running. -Before 2.5, accessing a computed value during a transaction always resulted in a recomputation each time the computed value was accessed, because one of the upstream observables (might) have changed. -In 2.5, MobX actively tracks whether one of the observables has changed and won't recompute computed values unnecessary. -This means that computed values are now always memoized for the duration of the current action. -In specific cases, this might signficantly speed up actions that extensively make decisions based on computed values. - -Example: -```javascript -class Square { - @observable length = 2 - @computed get squared() { - return this.length * this.length - } - // mobx now supports setters for computed values - set squared(surfaceSize) { - this.length = Math.sqrt(surfaceSize) - } - - // core changes make actions more efficient if extensively using computed values: - @action stuff() { - this.length = 3 - console.log(this.squared) // recomputes in both 2.5 and before - console.log(this.squared) // no longer recomputes - this.length = 4 - console.log(this.squared) // recomputes in both 2.5 and before - // after the action, before 2.5 squared would compute another time (if in use by a reaction), that is no longer the case - } -} -``` - -ES5 example for setters: -```javascript -function Square() { - extendObservable(this, { - length: 2, - squared: computed( - function() { - return this.squared * this.squared - }, - function(surfaceSize) { - this.length = Math.sqrt(surfaceSize) - } - ) - }) -} -``` - -# 2.4.4 - -* Fixed #503: map.delete returns boolean -* Fix return type of `runInAction`, #499 by @Strate -* Fixed enumerability of observable array methods, see #496. -* Use TypeScript typeguards, #487 by @Strate -* Added overloads to `action` for better type inference, #500 by @Strate -* Fixed #502: `extendObservable` fails on objects created with `Object.create(null)` -* Implemented #480 / #488: better typings for `asMap`, by @Strate - -# 2.4.3 - -* Objects with a `null` prototype are now considered plain objects as well -* Improved error message for non-converging cyclic reactions -* Fixed potential HMR issue - -# 2.4.2 - -* Improved error message when wrongly using `@computed`, by @bb (#450) -* `observableArray.slice` now automatically converts observable arrays to plain arrays, fixes #460 -* Improved error message when an uncaught exception is thrown by a MobX tracked function - -# 2.4.1 - -* `@action` decorated methods are now configurable. Fixes #441 -* The `onBecomeObserved` event handler is now triggered when an atom is observed, instead of when it is bound as dependency. Fixes #427 and makes atoms easier to extend. -* if `useStrict()` is invoked without arguments, it now returns the current value of strict mode. -* the current reaction is now always passed as first argument to the callbacks of `autorun`, `autorunAsync`, `when` and `reaction`. This allows reactions to be immediately disposed during the first run. See #438, by @andykog - -# 2.4.0 - -* _Note: the internal version of MobX has been bumped. This version has no breaking api changes, but if you have MobX loaded multiple times in your project, they all have to be upgraded to `2.4.0`. MobX will report this when starting._ -* Made dependency tracking and binding significant faster. Should result in huge performance improvements when working with large collections. -* Fixed typescript decorator issue, #423, #425? (by @bb) - -# 2.3.7 - -* Fixed issue where computed values were tracked and accidentally kept alive during actions - -# 2.3.6 -* Fixed #406: Observable maps doesn't work with empty initial value in Safari -* Implemented #357, #348: ObservableMap and ObservableArray now support iterators. Use [`@@iterator()` or iterall](https://github.com/leebyron/iterall) in ES5 environments. - -# 2.3.5 - -* Fixed #364: Observable arrays not reacting properly to index assignments under iOS safari (mobile) 9.1.1 By @andykog -* Fixed #387: Typings of boxed values -* Added warning when reading array entries out of bounds. See #381 - -# 2.3.4 - -* Fixed #360: Removed expensive cycle detection (cycles are still detected, but a bit later) -* Fixed #377: `toJS` serialization of Dates and Regexes preserves the original values -* Fixed #379: `@action` decorated methods can now be inherited / overriden - -# 2.3.3 - -* Fixed #186: Log a warning instead of an error if an exception is thrown in a derivation. Fixes issue where React Native would produce unusable error screens (because it shows the first logged error) -* Fixed #333: Fixed some interoperability issues in combination with `Reflect` / `InversifyJS` decorators. @andykog -* Fixed #333: `@observable` class properties are now _owned_ by their instance again, meaning they will show up in `Object.keys()` and `.hasOwnProperty` @andykog - -# 2.3.2 - -* Fixed #328: Fixed exception when inspecting observable in `onBecomeObserved` -* Fixed #341: `array.find` now returns `undefined` instead of `null` when nothing was found, behavior now matches the docs. (By @hellectronic) - -# 2.3.1 - -* Fixed #327: spy not working with runInAction - -# 2.3.0 - -### Introduced `whyRun`: -Usage: -* `whyRun()` -* `whyRun(Reaction object / ComputedValue object / disposer function)` -* `whyRun(object, "computed property name")` - -`whyRun` is a small utility that can be used inside computed value or reaction (`autorun`, `reaction` or the `render` method of an `observer` React component) -and prints why the derivation is currently running, and under which circumstances it will run again. -This should help to get a deeper understanding when and why MobX runs stuff, and prevent some beginner mistakes. - -This feature can probably be improved based on your feedback, so feel free to file issues with suggestions! - -### Semantic changes: -* `@observable` is now always defined on the class prototypes and not in the instances. This means that `@observable` properties are enumerable, but won't appear if `Object.keys` or `hasOwnProperty` is used on a class _instance_. -* Updated semantics of `reaction` as discussed in `#278`. The expression now needs to return a value and the side effect won't be triggered if the result didn't change. `asStructure` is supported in these cases. In contrast to MobX 2.2, effects will no longer be run if the output of the expression didn't change. - -### Enhancements - -* Introduces `isAction(fn)` #290 -* If an (argumentless) action is passed to `observable` / `extendObservable`, it will not be converted into a computed property. -* Fixed #285: class instances are now also supported by `toJS`. Also members defined on prototypes which are enumerable are converted. -* Map keys are now always coerced to strings. Fixes #308 -* `when`, `autorun` and `autorunAsync` now accept custom debug names (see #293, by @jamiewinder) -* Fixed #286: autoruns no longer stop working if an action throws an exception -* Implemented `runInAction`, can be used to create on the fly actions (especially useful in combination with `async/await`, see #299 -* Improved performance and reduced mem usage of decorators signficantly (by defining the properties on the prototype if possible), and removed subtle differences between the implementation and behavior in babel and typescript. -* Updated logo as per #244. Tnx @osenvosem! - -# 2.2.2: - -* Fixed issue #267: exception when `useStrict(true)` was invoked in combination with `@observable` attributes when using Babel -* Fixed issue #269: @action in combination with typescript targeting ES6 and reflect.ts -* Improved compatibility with `JSON.stringify`, removed incorrect deprecation message -* Improved some error messages - -# 2.2.1 - -* Fixed issue where typescript threw a compile error when using `@action` without params on a field -* Fixed issue where context was accidentally shared between class instances when using `@action` on a field - -# 2.2.0 - -See the [release announcement](https://medium.com/@mweststrate/45cdc73c7c8d) for the full details of this release: - -Introduced: -* `action` / `@action` -* `intercept` -* `spy` -* `reaction` -* `useStrict` -* improved debug names -* `toJSON` was renamed to `toJS` -* `observable(asMap())` is the new idiomatic way to create maps -* the effect of `when` is now untracked, similar to `reaction. -* `extras.trackTransations` is deprecated, use `spy` instead -* `untracked` has been undeprecated -* introduced / documented: `getAtom`, `getDebugName`, `isSpyEnabled`, `spyReport`, `spyReportStart`, `spyReportEnd` -* deprecated `extras.SimpleEventEmitter` -* array splice events now also report the `added` collection and `removedCount` - -# 2.1.7 - -* Fixed a false negative in cycle detection, as reported in #236 - -# 2.1.6 - -* Fixed #236, #237 call stack issues when working with large arrays - -# 2.1.5 - -* Fix #222 (by @andykog) run `observe` callback of computed properties in untracked mode. - -# 2.1.4 - -* Fixed #201 (see also #160), another iOS enumerability issue... By @luosong - -# 2.1.3 - -* Fixed #191, when using babel, complex field initializers where shared. By @andykog -* Added `lib/mobx.umd.min.js` for minified cdn builds, see #85 - -# 2.1.2 - -* Improved debug names of objects created using a constructor -* Fixed(?) some issues with iOS7 as reported in #60 by @bstst - -# 2.1.1 - -* Fixed issue where `autorun`s created inside `autorun`s were not always kicked off. (`mobx-react`'s `observer` was not affected). Please upgrade if you often use autorun. -* Fixed typings of `mobx.map`, a list of entries is also acceptable. -* (Experimental) Improved error recovery a bit further - -# 2.1.0 - -* MobX is now chatty again when an exception occurs inside a autorun / computed value / React.render. Previously this was considered to be the responsibility of the surrounding code. But if exceptions were eaten this would be really tricky to debug. -* (Experimental) MobX will now do a poor attempt to recover from exceptions that occured in autorun / computed value / React.render. - -# 2.0.6 - -* `resetGlobalState` is now part of the `mobx.extras` namespace, as it is useful for test setup, to restore inconsistent state after test failures. -* `resetGlobalState` now also resets the caches of `createTransformer`, see #163. - -# 2.0.5 - -* WIP on bower support - -# 2.0.4 - -* `$transformId` property on transformed objects should be non-enumerable. Fixes #170. - -# 2.0.3 - -* Always peek if inspecting a stale, computed value. Fixes #165. - -# 2.0.2 - -* Fixed issue where changing an object property was tracked, which could lead to unending loops in `autorunAsync`. - -# 2.0.1 - -* Undeprecated `observable(scalar)` (see 143) -* `expr` no longer prints incorrect deprecated messages (see 143) -* Requires `mobx` twice no longer fails. - -# 2.0.0 - -## A new name... -Welcome to ~Mobservable~ MobX 2! First of all, there is the name change. -The new name is shorter and funnier and it has the right emphasis: MobX is about reactive programming. -Not about observability of data structures, which is just a technical necessity. -MobX now has its own [mobxjs](https://github.com/mobxjs) organization on GitHub. Just report an issue if you want to join. - -All MobX 2.0 two compatible packages and repos have been renamed. So `mobx-react`, `mobx-react-devtools` etc. -For the 1.0 versions, use the old `mobservable` based names. - -## Migrating from Mobservable 1.x to MobX 2.0 - -Migrating from Mobservable should be pretty straight-forward as the public api is largely the same. -However there are some conceptual changes which justifies a Major version bump as it might alter the behavior of MobX in edge cases. -Besides that, MobX is just a large collection of minor improvements over Mobservable. -Make sure to remove your old `mobservable` dependencies when installing the new `mobx` dependencies! - -## `autorun`s are now allowed to cause cycles! -`autorun` is now allowed to have cycles. In Mobservable 1 an exception was thrown as soon as an autorun modified a variable which it was reading as well. -In MobX 2 these situations are now allowed and the autorun will trigger itself to be fired again immediately after the current execution. -This is fine as long as the autorun terminates within a reasonable amount of iterations (100). -This should avoid the need for work-arounds involving `setTimeout` etc. -Note that computed values (created using `observable(func)` are still not allowed to have cycles. - -## [Breaking] `observable(scalar)` returns an object instead of a function and has been deprecated. - -Creating an observable from a primitive or a reference no longer returns a getter/setter function, but a method with a `.get` and `.set` method. -This is less confusing, easier to debug and more efficient. - -So to read or write from an observable scalar use: -```javascript -const temperature = observable(27); -temperature.set(15); // previously: temperature(15) -temperature.get(); // previously: temperature() -``` - -`observable(scalar)` has been deprecated to make the api smaller and the syntax more uniform. In practice having observable objects, arrays and decorators seems to suffice in 99% of the cases. Deprecating this functionality means that people have simply less concepts to learn. Probably creating observable scalars will continue to work for a long time, as it is important to the internals of MobX and very convenient for testing. - -## Introduced `@computed` - -MobX introduced the `@computed` decorator for ES6 class properties with getter functions. -It does technically the same as `@observable` for getter properties. But having a separate decorator makes it easier to communicate about the code. -`@observable` is for mutable state properties, `@computed` is for derived values. - -`@computed` can now also be parameterized. `@computed({asStructure: true})` makes sure that the result of a derivation is compared structurally instead of referentially with its preview value. This makes sure that observers of the computation don't re-evaluate if new structures are returned that are structurally equal to the original ones. This is very useful when working with point, vector or color structures for example. It behaves the same as the `asStructure` modifier for observable values. - -`@computed` properties are no longer enumerable. - -## MobX is now extensible! - -The core algorithm of MobX has been largely rewritten to improve the clarity, extensibility, performance and stability of the source code. -It is now possible to define your own custom observable data sources by using the `Atom` class. -It is also possible to create your own reactive functions using the `Reaction` class. `autorun`, `autorunAsync` and `@observer` have now all been implemented using the concept of Reactions. -So feel free to write your own reactive [constructions](http://mobxjs.github.io/mobx/refguide/extending.html)! - -## Mobservable now fails fast - -In Mobservable 1 exceptions would be caught and sometimes re-thrown after logging them. -This was confusing and not all derivations were able to recover from these exceptions. -In MobX 2 it is no longer allowed for a computed function or `autorun` to throw an exception. - -## Improved build - -* MobX is roughly 20% faster -* MobX is smaller: 75KB -> 60KB unminified, and 54KB -> 30KB minified. -* Distributable builds are no longer available in the git repository, use unpkg instead: -* Commonjs build: https://unpkg.com/mobx@^2.0.0/lib/mobx.js -* Minified commonjs build: https://unpkg.com/mobx@^2.0.0/lib/mobx.min.js -* UMD build: https://unpkg.com/mobx@^2.0.0/lib/mobx.umd.js -* To use the minified build, require / import the lib from `"mobx/lib/mobx.min.js"` (or set up an alias in your webpack configuration if applicable) - -## Other changes - -* Improved debug names of all observables. This is especially visible when using `mobx-react-devtools` or `extras.trackTransitions`. -* Renamed `extras.SimpleEventEmitter` to `SimpleEventEmitter` -* Removed already deprecated methods: `isReactive`, `makeReactive`, `observeUntil`, `observeAsync` -* Removed `extras.getDNode` -* Invoking `ObservableArray.peek` is no longer registered as listener -* Deprecated `untracked`. It wasn't documented and nobody seems to miss it. - -# 1.2.5 - -* Map no longer throws when `.has`, `.get` or `.delete` is invoked with an invalid key (#116) -* Files are now compiled without sourcemap to avoid issues when loading mobservable in a debugger when `src/` folder is not available. - -# 1.2.4 - -* Fixed: observable arrays didn't properly apply modifiers if created using `asFlat([])` or `fastArray([])` -* Don't try to make frozen objects observable (by @andykog) -* `observableArray.reverse` no longer mutates the arry but just returns a sorted copy -* Updated tests to use babel6 - -# 1.2.3 - -* observableArray.sort no longer mutates the array being sorted but returns a sorted clone instead (#90) -* removed an incorrect internal state assumption (#97) - -# 1.2.2 - -* Add bower support - -# 1.2.1 - -* Computed value now yields consistent results when being inspected while in transaction - -# 1.2.0 - -* Implemented #67: Reactive graph transformations. See: http://mobxjs.github.io/mobservable/refguide/create-transformer.html - -# 1.1.8 - -* Implemented #59, `isObservable` and `observe` now support a property name as second param to observe individual values on maps and objects. - -# 1.1.7 - -* Fixed #77: package consumers with --noImplicitAny should be able to build - -# 1.1.6 - -* Introduced `mobservable.fastArray(array)`, in addition to `mobservable.observable(array)`. Which is much faster when adding items but doesn't support enumerability (`for (var idx in ar) ..` loops). -* Introduced `observableArray.peek()`, for fast access to the array values. Should be used read-only. - -# 1.1.5 - -* Fixed 71: transactions should not influence running computations - -# 1.1.4 - -* Fixed #65; illegal state exception when using a transaction inside a reactive function. Credits: @kmalakoff - -# 1.1.3 - -* Fixed #61; if autorun was created during a transaction, postpone execution until the end of the transaction - -# 1.1.2 - -* Fixed exception when autorunUntil finished immediately - -# 1.1.1 - -* `toJSON` now serializes object trees with cycles as well. If you know the object tree is acyclic, pass in `false` as second parameter for a performance gain. - -# 1.1.0 - -* Exposed `ObservableMap` type -* Introduced `mobservable.untracked(block)` -* Introduced `mobservable.autorunAsync(block, delay)` - -# 1.0.9 - -Removed accidental log message - -# 1.0.7 / 1.0.8 - -Fixed inconsistency when using `transaction` and `@observer`, which sometimes caused stale values to be displayed. - -# 1.0.6 - -Fix incompatibility issue with systemjs bundler (see PR 52) - -# 1.0.4/5 - -* `map.size` is now a property instead of a function -* `map()` now accepts an array as entries to construct the new map -* introduced `isObservableObject`, `isObservableArray` and `isObservableMap` -* introduced `observe`, to observe observable arrays, objects and maps, similarly to Object.observe and Array.observe - -# 1.0.3 - -* `extendObservable` now supports passing in multiple object properties - -# 1.0.2 - -* added `mobservable.map()`, which creates a new map similarly to ES6 maps, yet observable. Until properly documentation, see the [MDN docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/map). - -# 1.0.1 - -* Stricter argument checking for several apis. - -# 1.0 - -## Renames - -* `isReactive` -> `isObservable` -* `makeReactive` -> `observable` -* `extendReactive` -> `extendObservable` -* `observe` -> `autorun` -* `observeUntil` -> `autorunUntil` -* `observeAsync` -> `autorunAsync` -* `reactiveComponent` -> `observer` (in `mobservable-react` package) - -## Breaking changes - -* dropped the `strict` and `logLevel` settings of mobservable. View functions are by default run in `strict` mode, `autorun` (formerly: `observe`) functions in `non-strict` mode (strict indicates that it is allowed to change other observable values during the computation of a view funtion). -Use `extras.withStrict(boolean, block)` if you want to deviate from the default behavior. -* `observable` (formerly `makeReactive`) no longer accepts an options object. The modifiers `asReference`, `asStructure` and `asFlat` can be used instead. -* dropped the `default` export of observable -* Removed all earlier deprecated functions - -## Bugfixes / improvements - -* `mobservable` now ships with TypeScript 1.6 compliant module typings, no external typings file is required anymore. -* `mobservable-react` supports React Native as well through the import `"mobservable-react/native"`. -* Improved debugger support -* `for (var key in observablearray)` now lists the correct keys -* `@observable` now works correct on classes that are transpiled by either TypeScript or Babel (Not all constructions where supported in Babel earlier) -* Simplified error handling, mobservable will no longer catch errors in views, which makes the stack traces easier to debug. -* Removed the initial 'welcom to mobservable' logline that was printed during start-up. - -# 0.7.1 - -* Backported Babel support for the @observable decorator from the 1.0 branch. The decorator should now behave the same when compiled with either Typescript or Babeljs. - -# 0.7.0 - -* Introduced `strict` mode (see issues [#30](), [#31]()) -* Renamed `sideEffect` to `observe` -* Renamed `when` to `observeUntil` -* Introduced `observeAsync`. -* Fixed issue where changing the `logLevel` was not picked up. -* Improved typings. -* Introduces `asStructure` (see [#8]()) and `asFlat`. -* Assigning a plain object to a reactive structure no longer clones the object, instead, the original object is decorated. (Arrays are still cloned due to Javascript limitations to extend arrays). -* Reintroduced `expr(func)` as shorthand for `makeReactive(func)()`, which is useful to create temporarily views inside views -* Deprecated the options object that could be passed to `makeReactive`. -* Deprecated the options object that could be passed to `makeReactive`: - * A `thisArg` can be passed as second param. - * A name (for debugging) can be passed as second or third param - * The `as` modifier is no longer needed, use `asReference` (instead of `as:'reference'`) or `asFlat` (instead of `recurse:false`). - -# 0.6.10 - -* Fixed issue where @observable did not properly create a stand-alone view - -# 0.6.9 - -* Fixed bug where views where sometimes not triggered again if the dependency tree changed to much. - -# 0.6.8 - -* Introduced `when`, which, given a reactive predicate, observes it until it returns true. -* Renamed `sideEffect -> observe` - -# 0.6.7: - -* Improved logging - -# 0.6.6: - -* Deprecated observable array `.values()` and `.clone()` -* Deprecated observeUntilInvalid; use sideEffect instead -* Renamed mobservable.toJson to mobservable.toJSON - -# 0.6.5: - -* It is no longer possible to create impure views; views that alter other reactive values. -* Update links to the new documentation. - -# 0.6.4: - -* 2nd argument of sideEffect is now the scope, instead of an options object which hadn't any useful properties - -# 0.6.3 - -* Deprecated: reactiveComponent, reactiveComponent from the separate package mobservable-react should be used instead -* Store the trackingstack globally, so that multiple instances of mobservable can run together - -# 0.6.2 - -* Deprecated: @observable on functions (use getter functions instead) -* Introduced: `getDependencyTree`, `getObserverTree` and `trackTransitions` -* Minor performance improvements diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..6267c67ae3 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,43 @@ +# MobX Contributor Guide + +Welcome to a community of developers just like you, striving to create the best experience around MobX. We welcome anyone who wants to contribute or provide constructive feedback, no matter the age or level of experience. + +Here are some ways to contribute to the project, from easiest to most difficult: + +- [Reporting bugs](#reporting-bugs) +- [Improving the documentation](#improving-the-documentation) +- [Responding to issues](#responding-to-issues) +- [Small bug fixes](#small-bug-fixes) + +## Issues + +### Reporting bugs + +If you encounter a bug, please file an issue on GitHub via the repository of the sub-project you think contains the bug. If an issue you have is already reported, please add additional information or add a 👍 reaction to indicate your agreement. + +Include in the issue a link to your reproduction. A couple good options are a small Github repo or a [CodeSandbox](https://codesandbox.io/s/minimal-mobx-react-project-ppgml). + +If you have a more complicated issue where it is helpful to run it locally, you can download CodeSandbox template and work on it and then commit into your GitHub repo. + +### Improving the documentation + +Improving the documentation, examples, and other open source content can be the easiest way to contribute to the library. If you see a piece of content that can be better, open a PR with an improvement, no matter how small! If you would like to suggest a big change or major rewrite, we’d love to hear your ideas but please open an issue for discussion before writing the PR. + +### Responding to issues + +In addition to reporting issues, a great way to contribute to MobX is to respond to other peoples' issues and try to identify the problem or help them work around it. If you’re interested in taking a more active role in this process, please go ahead and respond to issues. + +### Small bug fixes + +For a small bug fix change (less than 20 lines of code changed), feel free to open a pull request. We’ll try to merge it as fast as possible and ideally publish a new release on the same day. The only requirement is, make sure you also add a test that verifies the bug you are trying to fix. + +#### Getting things running + +``` +git clone git@github.com:mobxjs/mobx.git +cd mobx +yarn install +yarn lerna run build +yarn test +``` + diff --git a/ISSUE_TEMPLATE.md b/ISSUE_TEMPLATE.md deleted file mode 100644 index 0e0632d555..0000000000 --- a/ISSUE_TEMPLATE.md +++ /dev/null @@ -1,20 +0,0 @@ -Welcome to MobX. Please provide as much relevant information as possible! - -I have a: - -1. [ ] Question: Feel free to just state your question. For a quick answer, there are usually people online at our [Gitter](https://gitter.im/mobxjs/mobx) channel -2. [ ] Documentation improvement. Please don't open an issue but create a PR instead! -2. [ ] Issue: - * [ ] **Provide error messages including stacktrace** - * [ ] Provide a **minimal** sample reproduction. **Create a reproduction based on this [sandbox](https://codesandbox.io/s/v3v0my2370)** - * [ ] Did you check this issue wasn't filed before? - * [ ] Elaborate on your issue. What behavior did you expect? - * [ ] State the versions of MobX and relevant libraries. Which browser / node / ... version? -3. [ ] Idea: - * [ ] What problem would it solve for you? - * [ ] Do you think others will benefit from this change as well and it should in core package (see also mobx-utils)? - * [ ] Are you willing to (attempt) a PR yourself? - -Please tick the appropriate boxes. Feel free to remove the _other_ sections. - -**Please be sure to close your issues promptly.** diff --git a/PULL_REQUEST_TEMPLATE.md b/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index b7bba38133..0000000000 --- a/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,14 +0,0 @@ -Thanks for taking the effort to create a PR! - -If you are creating an extensive PR, you might want to open an issue with your idea first, so that you don't put a lot of effort in an PR that wouldn't be accepted. Please prepend pull requests with `WIP: ` if they are not yet finished -PR checklist: - -* [ ] Added unit tests -* [ ] Updated changelog -* [ ] Updated docs (either in the description of this PR as markdown, or as separate PR on the `gh-pages` branch. Please refer to this PR). For new functionality, at least [API.md](https://github.com/mobxjs/mobx/blob/gh-pages/docs/refguide/api.md) should be updated -* [ ] Added typescript typings -* [ ] Verified that there is no significant performance drop (`npm run perf`) - -Feel free to ask help with any of these boxes! - -The above process doesn't apply to doc updates etc. diff --git a/README.md b/README.md index 35e3896e43..680138f06c 100644 --- a/README.md +++ b/README.md @@ -1,477 +1,186 @@ -logo +logo # MobX -_Simple, scalable state management_ +_Simple, scalable state management._ -[![Build Status](https://travis-ci.org/mobxjs/mobx.svg?branch=master)](https://travis-ci.org/mobxjs/mobx) -[![Coverage Status](https://coveralls.io/repos/mobxjs/mobx/badge.svg?branch=master&service=github)](https://coveralls.io/github/mobxjs/mobx?branch=master) -[![Join the chat at https://gitter.im/mobxjs/mobx](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mobxjs/mobx?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Discuss MobX on Hashnode](https://hashnode.github.io/badges/mobx.svg)](https://hashnode.com/n/mobx) -[![OpenCollective](https://opencollective.com/mobx/backers/badge.svg)](#backers) -[![OpenCollective](https://opencollective.com/mobx/sponsors/badge.svg)](#sponsors) -[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier) - -MobX is proudly sponsored by Mendix, Coinbase, Facebook Open Source, Canva, Algolia, Guilded and many [individual sponsors](#backers) - -Mendix Coinbase Facebook Open Source -Canva -Algolia -Guilded - -# Installation - -* Installation: `npm install mobx --save`. React bindings: `npm install mobx-react --save`. To enable ESNext decorators (optional), see below. -* CDN: - * https://unpkg.com/mobx/lib/mobx.umd.js - * https://cdnjs.com/libraries/mobx - - -_Tip: Consider using the faster and smaller ES6 build if targetting a modern environment: `lib/mobx.es6.js`. For example by setting up a webpack alias: `resolve: { alias: { mobx: __dirname + "/node_modules/mobx/lib/mobx.es6.js" }}`_ - -# Browser support - -| MobX version | Actively supported | Supported browsers | GitHub branch | -| ----- | ----- | --- | --- | -| 5.* | Yes | Any browser that supports [ES6 Proxies](https://kangax.github.io/compat-table/es6/#test-Proxy) (non polyfillable). _NOT:_ IE 11 and lower, Node 5 and lower | `master` | -| 4.* | Yes (LTS) | Any ES5 compliant browser | `mobx4-master` | -| 1-3.* | No | Any ES5 compliant browser | No active branch | - -* MobX >=5 runs on any browser with [ES6 proxy support](https://kangax.github.io/compat-table/es6/#test-Proxy). It will throw an error on startup on older environments such as IE11, Node.js <6 or React Native Android on old JavaScriptCore [how-to-upgrade](https://github.com/react-community/jsc-android-buildscripts#how-to-use-it-with-my-react-native-app). _Warning: since upgrading JSC is non-trivial, and decorators can be [troublesome](https://github.com/mobxjs/mobx/issues/1777) as well in React Native, for now it is recommended to stick to MobX 4.x for for React Native Android development_. -* MobX 4 runs on any ES5 browser and will be actively maintained. The MobX 4 and 5 api's are the same and semantically can achieve the same, but MobX 4 has some [limitations](#mobx-4-vs-mobx-5). +[![npm version](https://badge.fury.io/js/mobx.svg)](https://badge.fury.io/js/mobx) +[![OpenCollective](https://opencollective.com/mobx/backers/badge.svg)](docs/backers-sponsors.md#backers) +[![OpenCollective](https://opencollective.com/mobx/sponsors/badge.svg)](docs/backers-sponsors.md#sponsors) +[![Discuss on Github](https://img.shields.io/badge/discuss%20on-GitHub-orange)](https://github.com/mobxjs/mobx/discussions) +[![Coverage Status](https://coveralls.io/repos/github/mobxjs/mobx/badge.svg?branch=main)](https://coveralls.io/github/mobxjs/mobx?branch=main) +[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/mobx) +--- -## Translations +## Documentation -* [中文](http://cn.mobx.js.org) +Documentation can be found at **[mobx.js.org](https://mobx.js.org/)**. -## Getting started - -* Egghead.io course -* [Ten minute, interactive MobX + React tutorial](https://mobxjs.github.io/mobx/getting-started.html) -* [The MobX book](https://books.google.nl/books?id=ALFmDwAAQBAJ&pg=PP1&lpg=PP1&dq=michel+weststrate+mobx+quick+start+guide:+supercharge+the+client+state+in+your+react+apps+with+mobx&source=bl&ots=D460fxti0F&sig=ivDGTxsPNwlOjLHrpKF1nweZFl8&hl=nl&sa=X&ved=2ahUKEwiwl8XO--ncAhWPmbQKHWOYBqIQ6AEwAnoECAkQAQ#v=onepage&q=michel%20weststrate%20mobx%20quick%20start%20guide%3A%20supercharge%20the%20client%20state%20in%20your%20react%20apps%20with%20mobx&f=false) by Pavan Podila and Michel Weststrate (which despite it's name is in-depth!) -* [Official MobX 4 documentation and API overview](https://mobxjs.github.io/mobx/refguide/api.html) ([MobX 3](https://github.com/mobxjs/mobx/blob/54557dc319b04e92e31cb87427bef194ec1c549c/docs/refguide/api.md), [MobX 2](https://github.com/mobxjs/mobx/blob/7c9e7c86e0c6ead141bb0539d33143d0e1f576dd/docs/refguide/api.md)) -* [How to (not) use decorators](https://mobx.js.org/best/decorators.html) -* Videos: - * [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) - 40m [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing) - * [Practical React with MobX](https://www.youtube.com/watch?v=XGwuM_u7UeQ). In depth introduction and explanation to MobX and React by Matt Ruby on OpenSourceNorth (ES5 only) - 42m. - * LearnCode.academy MobX tutorial [Part I: MobX + React is AWESOME (7m)](https://www.youtube.com/watch?v=_q50BXqkAfI) [Part II: Computed Values and Nested/Referenced Observables (12m.)](https://www.youtube.com/watch?v=nYvNqKrl69s) - * [Screencast: intro to MobX](https://www.youtube.com/watch?v=K8dr8BMU7-8) - 8m - * [Talk: State Management Is Easy, React Amsterdam 2016 conf](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) ([slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx)) -* [Boilerplates and related projects](http://mobxjs.github.io/mobx/faq/boilerplates.html) -* More tutorials, blogs, videos, and other helpful resources can be found on the [MobX awesome list](https://github.com/mobxjs/awesome-mobx#awesome-mobx) +--- +## Sponsors + +MobX is made possible by the generosity of the sponsors below, and many other [individual backers](https://github.com/mobxjs/mobx/blob/main/docs/backers-sponsors.md#backers). Sponsoring directly impacts the longevity of this project. + +**🥇🥇 Platinum sponsors (\$5000+ total contribution): 🥇🥇** + +
+Guilded +Canva +Parallax + +**🥇 Gold sponsors (\$2500+ total contribution):** + +
+One Beyond +Frontend Masters +Auction Frontier +CodeFirst +Modulz +Coinbase +Curology +Mendix +Facebook Open Source +Casino Sites +Bugsnag + +**🥈 Silver sponsors (\$500+ total contributions):**
+ +mantro GmbH +Extremely Heavy Industries +Algolia +Space307 +Blokt +UPPER +DAZN +talentplot +EaseUS +Route Planner and Route Optimizer +Handsontable ## Introduction -MobX is a battle tested, simple and scalable state management library transparently applying functional reactive programming (TFRP). The Mobx design principle is very simple: - -_Anything that can be derived from the application state, should be derived. Automatically._ - -This includes the UI, data serialization, server communication, etc. - -MobX unidirectional flow - -React and MobX together are a powerful combination. React renders the application state by providing mechanisms to translate it into a tree of renderable components. MobX provides the mechanism to store and update the application state that React then uses. - -Both React and MobX provide optimal and unique solutions to common problems in application development. React provides mechanisms to optimally render the UI by using a virtual DOM that reduces the number of costly DOM mutations. MobX provides mechanisms to optimally synchronize application state with React components by using a reactive virtual dependency state graph that is only updated when strictly needed and is never stale. - -## Core concepts - -MobX has only a few core concepts. The following snippets can be tried online using [codesandbox example](https://codesandbox.io/s/v3v0my2370). - -### Observable state - -Egghead.io lesson 1: observable & observer - -MobX adds observable capabilities to existing data structures like objects, arrays and class instances. -This can simply be done by annotating your class properties with the [@observable](http://mobxjs.github.io/mobx/refguide/observable-decorator.html) decorator (ES.Next). - -```javascript -import { observable } from "mobx" - -class Todo { - id = Math.random(); - @observable title = ""; - @observable finished = false; -} -``` - -Using `observable` is like turning a property of an object into a spreadsheet cell. -But, unlike spreadsheets, these values can be not only primitive values, but also references, objects and arrays. - -If your environment doesn't support decorator syntax, don't worry. -You can read [here](http://mobxjs.github.io/mobx/best/decorators.html) about how to set them up. -Or you can skip them altoghether, as MobX can be used fine without decorator _syntax_, by leveraging the _decorate_ utility. -Many MobX users prefer the slightly more concise decorator syntax, but the following snippet achieves the same: - -```javascript -import { decorate, observable } from "mobx" - -class Todo { - id = Math.random(); - title = ""; - finished = false; -} -decorate(Todo, { - title: observable, - finished: observable -}) -``` - -### Computed values - -Egghead.io lesson 3: computed values - -With MobX you can define values that will be derived automatically when relevant data is modified. -By using the [`@computed`](http://mobxjs.github.io/mobx/refguide/computed-decorator.html) decorator or by using getter / setter functions when using `(extend)Observable` (Of course, you can use `decorate` here again as alternative to the `@` syntax). - -```javascript -class TodoList { - @observable todos = []; - @computed get unfinishedTodoCount() { - return this.todos.filter(todo => !todo.finished).length; - } -} -``` - -MobX will ensure that `unfinishedTodoCount` is updated automatically when a todo is added or when one of the `finished` properties is modified. -Computations like these resemble formulas in spreadsheet programs like MS Excel. They update automatically and only when required. - -### Reactions - -Egghead.io lesson 9: custom reactions - -Reactions are similar to a computed value, but instead of producing a new value, a reaction produces a side effect for things like printing to the console, making network requests, incrementally updating the React component tree to patch the DOM, etc. -In short, reactions bridge [reactive](https://en.wikipedia.org/wiki/Reactive_programming) and [imperative](https://en.wikipedia.org/wiki/Imperative_programming) programming. - -#### React components - -Egghead.io lesson 1: observable & observer - -If you are using React, you can turn your (stateless function) components into reactive components by simply adding the [`observer`](http://mobxjs.github.io/mobx/refguide/observer-component.html) function / decorator from the `mobx-react` package onto them. - -```javascript -import React, {Component} from 'react'; -import ReactDOM from 'react-dom'; -import {observer} from 'mobx-react'; - -@observer -class TodoListView extends Component { - render() { - return
-
    - {this.props.todoList.todos.map(todo => - - )} -
- Tasks left: {this.props.todoList.unfinishedTodoCount} +_Anything that can be derived from the application state, should be. Automatically._ + +MobX is a signal based, battle-tested library that makes state management simple and scalable by transparently applying functional reactive programming. +The philosophy behind MobX is simple: + +
+
+
😙
+
+

Straightforward

+

Write minimalistic, boilerplate-free code that captures your intent. + Trying to update a record field? Simply use a normal JavaScript assignment — + the reactivity system will detect all your changes and propagate them out to where they are being used. + No special tools are required when updating data in an asynchronous process. +

- } -} - -const TodoView = observer(({todo}) => -
  • - todo.finished = !todo.finished} - />{todo.title} -
  • -) - -const store = new TodoList(); -ReactDOM.render(, document.getElementById('mount')); -``` +
    +
    +
    🚅
    +
    +

    Effortless optimal rendering

    +

    + All changes to and uses of your data are tracked at runtime, building a dependency tree that captures all relations between state and output. + This guarantees that computations that depend on your state, like React components, run only when strictly needed. + There is no need to manually optimize components with error-prone and sub-optimal techniques like memoization and selectors. +

    +
    +
    +
    +
    🤹🏻‍♂️
    +
    +

    Architectural freedom

    +

    + MobX is unopinionated and allows you to manage your application state outside of any UI framework. + This makes your code decoupled, portable, and above all, easily testable. +

    +
    +
    +
    -`observer` turns React (function) components into derivations of the data they render. -When using MobX there are no smart or dumb components. -All components render smartly but are defined in a dumb manner. MobX will simply make sure the components are always re-rendered whenever needed, but also no more than that. So the `onClick` handler in the above example will force the proper `TodoView` to render, and it will cause the `TodoListView` to render if the number of unfinished tasks has changed. -However, if you would remove the `Tasks left` line (or put it into a separate component), the `TodoListView` will no longer re-render when ticking a box. You can verify this yourself by changing the [JSFiddle](https://jsfiddle.net/mweststrate/wv3yopo0/). +--- -#### Custom reactions -Custom reactions can simply be created using the [`autorun`](http://mobxjs.github.io/mobx/refguide/autorun.html), -[`reaction`](http://mobxjs.github.io/mobx/refguide/reaction.html) or [`when`](http://mobxjs.github.io/mobx/refguide/when.html) functions to fit your specific situations. +## A quick example -For example the following `autorun` prints a log message each time the amount of `unfinishedTodoCount` changes: +So what does code that uses MobX look like? ```javascript -autorun(() => { - console.log("Tasks left: " + todos.unfinishedTodoCount) -}) -``` - -### What will MobX react to? - -Why does a new message get printed each time the `unfinishedTodoCount` is changed? The answer is this rule of thumb: - -_MobX reacts to any existing observable property that is read during the execution of a tracked function._ - -For an in-depth explanation about how MobX determines to which observables needs to be reacted, check [understanding what MobX reacts to](https://github.com/mobxjs/mobx/blob/gh-pages/docs/best/react.md). - -### Actions - -Egghead.io lesson 5: actions - -Unlike many flux frameworks, MobX is unopinionated about how user events should be handled. - -* This can be done in a Flux like manner. -* Or by processing events using RxJS. -* Or by simply handling events in the most straightforward way possible, as demonstrated in the above `onClick` handler. +import React from "react" +import ReactDOM from "react-dom" +import { makeAutoObservable } from "mobx" +import { observer } from "mobx-react-lite" + +// Model the application state. +function createTimer() { + return makeAutoObservable({ + secondsPassed: 0, + increase() { + this.secondsPassed += 1 + }, + reset() { + this.secondsPassed = 0 + } + }) +} -In the end it all boils down to: somehow the state should be updated. +const myTimer = createTimer() -After updating the state `MobX` will take care of the rest in an efficient, glitch-free manner. So, simple statements, like the ones below, are enough to automatically update the user interface. +// Build a "user interface" that uses the observable state. +const TimerView = observer(({ timer }) => ( + +)) -There is no technical need for firing events, calling a dispatcher, etc. A React component in the end is nothing more than a fancy representation of your state, i.e. a derivation that will be managed by MobX. +ReactDOM.render(, document.body) -```javascript -store.todos.push( - new Todo("Get Coffee"), - new Todo("Write simpler code") -); -store.todos[0].finished = true; +// Update the 'Seconds passed: X' text every second. +setInterval(() => { + myTimer.increase() +}, 1000) ``` -Nonetheless, MobX has an optional built-in concept of [`actions`](https://mobxjs.github.io/mobx/refguide/action.html). -Read this section as well if you want to know more about writing asynchronous actions. It's easy! -Use them to your advantage; they will help you to structure your code better and make wise decisions about when and where state should be modified. - -## MobX: Simple and scalable - -MobX is a simple, very scaleable and unobtrusive state management library. - -### Using classes and real references - -With MobX you don't need to normalize your data. This makes the library very suitable for very complex domain models. (At Mendix, for example, there are ~500 different domain classes in a single application.) +The `observer` wrapper around the `TimerView` React component will automatically detect that rendering +depends on the `timer.secondsPassed` observable, even though this relationship is not explicitly defined. The reactivity system will take care of re-rendering the component when _precisely that_ field is updated in the future. -### Referential integrity is guaranteed +Every event (`onClick` / `setInterval`) invokes an _action_ (`myTimer.increase` / `myTimer.reset`) that updates _observable state_ (`myTimer.secondsPassed`). +Changes in the observable state are propagated precisely to all _computations_ and _side effects_ (`TimerView`) that depend on the changes being made. -Since data doesn't need to be normalized and MobX automatically tracks the relations between state and derivations, you get referential integrity for free. +MobX unidirectional flow -Rendering something that is accessed through three levels of indirection? No problem. MobX will track them and re-render whenever one of the references changes. As a result, staleness bugs are eliminated. As a programmer, you might forget that changing some data might influence a seemingly unrelated component, but MobX won't forget. +This conceptual picture can be applied to the above example, or any other application using MobX. -### Simpler actions are easier to maintain - -As demonstrated above, modifying state when using MobX is very straightforward. You simply write down your intentions. MobX will take care of the rest. - -### Fine grained observability is efficient - -MobX builds a graph of all the derivations in your application to find the least number of re-computations that are needed to prevent staleness. "Derive everything" might sound expensive, but MobX builds a virtual derivation graph to minimize the number of recomputations needed to keep derivations in sync with the state. - -In fact, when testing MobX at Mendix we found out that using this library to track the relations in our code is often a lot more efficient than pushing changes through our application by using handwritten events or "smart" selector based container components. - -The simple reason is that MobX will establish far more fine grained 'listeners' on your data than you would do as a programmer. +## Getting started -Secondly, MobX sees the causality between derivations, so it can order them in such a way that no derivation has to run twice or introduce a glitch. +To learn about the core concepts of MobX using a larger example, check out **[The gist of MobX](https://mobx.js.org/the-gist-of-mobx.html)** page, or take the **[10 minute interactive introduction to MobX and React](https://mobx.js.org/getting-started)**. +The philosophy and benefits of the mental model provided by MobX are also described in great detail in the blog posts [UI as an afterthought](https://michel.codes/blogs/ui-as-an-afterthought) and [How to decouple state and UI (a.k.a. you don’t need componentWillMount)](https://hackernoon.com/how-to-decouple-state-and-ui-a-k-a-you-dont-need-componentwillmount-cc90b787aa37). -How that works? See this [in-depth explanation of MobX](https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254). +## Further resources -### Easy interoperability +- The [MobX cheat sheet](https://gum.co/fSocU) (£5) is both useful and sponsors the project +- [10 minute interactive introduction to MobX and React](https://mobx.js.org/getting-started) +- [Egghead.io course, based on MobX 3](https://egghead.io/courses/manage-complex-state-in-react-apps-with-mobx) +- The [MobX awesome list](https://github.com/mobxjs/awesome-mobx#awesome-mobx) – a long list of MobX resources and example projects -MobX works with plain JavaScript structures. Due to its unobtrusiveness, it works with most JavaScript libraries out of the box without needing MobX specific library add-ons. +### The MobX book -So, you can simply keep using your existing router, data fetching, and utility libraries like `react-router`, `director`, `superagent`, `lodash`, etc. + -For the same reason, you can use it with both server and client side, isomorphic and react-native applications. +The **[MobX Quick Start Guide](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837)** ($24.99) by [Pavan Podila](https://twitter.com/pavanpodila) and [Michel Weststrate](https://twitter.com/mweststrate) is available as an [ebook](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837), [paperback](https://www.amazon.com/MobX-Quick-Start-Guide-Supercharge/dp/1789344832), and on the [O'Reilly platform](https://www.oreilly.com/library/view/mobx-quick-start/9781789344837/) (see [preview](https://books.google.com/books?id=ALFmDwAAQBAJ&printsec=frontcover#v=onepage&q&f=false)). -The result of this is that you often need to learn fewer new concepts when using MobX in comparison to other state management solutions. +### Videos ---- +- [Introduction to MobX & React in 2020](https://www.youtube.com/watch?v=pnhIJA64ByY) by Leigh Halliday, _17 min_. +- [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) by Michel Weststrate, _40 min_, [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing). +- [CityJS 2020: MobX, from mutable to immutable, to observable data](https://youtu.be/sP7dtZm_Wx0?t=27050) by Michel Weststrate, _30 min_. +- [OpenSourceNorth: Practical React with MobX (ES5)](https://www.youtube.com/watch?v=XGwuM_u7UeQ) by Matt Ruby, _42 min_. +- [HolyJS 2019: MobX and the unique symbiosis of predictability and speed](https://www.youtube.com/watch?v=NBYbBbjZeX4&list=PL8sJahqnzh8JJD7xahG5zXkjfM5GOgcPA&index=21&t=0s) by Michel Weststrate, _59 min_. +- [React Amsterdam 2016: State Management Is Easy](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) by Michel Weststrate, _20 min_, [slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx). +- {🚀} [React Live 2019: Reinventing MobX](https://www.youtube.com/watch?v=P_WqKZxpX8g) by Max Gallo, _27 min_. ## Credits -MobX is inspired by reactive programming principles found in spreadsheets. It is inspired by MVVM frameworks such as MeteorJS tracker, Knockout and Vue.js. But, MobX brings Transparent Functional Reactive Programming to the next level and provides a stand alone implementation. It implements TFRP in a glitch-free, synchronous, predictable and efficient manner. - -A ton of credit goes to [Mendix](https://github.com/mendix) for providing the flexibility and support to maintain MobX and the chance to prove the philosophy of MobX in real, complex, performance critical applications. - -And finally, kudos to all the people that believed in, tried, validated and even [sponsored](https://github.com/mobxjs/mobx/blob/master/sponsors.md) MobX. - -## Further resources and documentation +MobX is inspired by reactive programming principles, which are for example used in spreadsheets. It is inspired by model–view–viewmodel frameworks like [MeteorJS's Tracker](https://docs.meteor.com/api/tracker.html), [Knockout](https://knockoutjs.com/) and [Vue.js](https://vuejs.org/), but MobX brings _transparent functional reactive programming_ (TFRP, a concept which is further explained in the [MobX book](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837)) to the next level and provides a standalone implementation. It implements TFRP in a glitch-free, synchronous, predictable and efficient manner. -* [The MobX book](https://books.google.nl/books?id=ALFmDwAAQBAJ&pg=PP1&lpg=PP1&dq=michel+weststrate+mobx+quick+start+guide:+supercharge+the+client+state+in+your+react+apps+with+mobx&source=bl&ots=D460fxti0F&sig=ivDGTxsPNwlOjLHrpKF1nweZFl8&hl=nl&sa=X&ved=2ahUKEwiwl8XO--ncAhWPmbQKHWOYBqIQ6AEwAnoECAkQAQ#v=onepage&q=michel%20weststrate%20mobx%20quick%20start%20guide%3A%20supercharge%20the%20client%20state%20in%20your%20react%20apps%20with%20mobx&f=false) by Pavan Podila and Michel Weststrate (which despite it's name is in-depth!) -* [MobX homepage](http://mobxjs.github.io/mobx/faq/blogs.html) -* [API overview](http://mobxjs.github.io/mobx/refguide/api.html) -* [Tutorials, Blogs & Videos](http://mobxjs.github.io/mobx/faq/blogs.html) -* [Boilerplates](http://mobxjs.github.io/mobx/faq/boilerplates.html) -* [Related projects](http://mobxjs.github.io/mobx/faq/related.html) - - -## What others are saying... - -> Guise, #mobx isn't pubsub, or your grandpa's observer pattern. Nay, it is a carefully orchestrated observable dimensional portal fueled by the power cosmic. It doesn't do change detection, it's actually a level 20 psionic with soul knife, slashing your viewmodel into submission. - -> After using #mobx for lone projects for a few weeks, it feels awesome to introduce it to the team. Time: 1/2, Fun: 2X - -> Working with #mobx is basically a continuous loop of me going “this is way too simple, it definitely won’t work” only to be proven wrong - -> Try react-mobx with es6 and you will love it so much that you will hug someone. - -> I have built big apps with MobX already and comparing to the one before that which was using Redux, it is simpler to read and much easier to reason about. - -> The #mobx is the way I always want things to be! It's really surprising simple and fast! Totally awesome! Don't miss it! - -> I've been using MobX for over 2 years now, and it *still* feels like cheating! 😎 - -## Contributing - -* Feel free to send small pull requests. Please discuss new features or big changes in a GitHub issue first. -* Use `npm test` to run the basic test suite, `npm run coverage` for the test suite with coverage and `npm run test:performance` for the performance tests. -* Please note that if you want to backport a feature / fix to MobX 4 a second PR needs to be opened to the mobx4-master branch. - -# MobX 4 vs MobX 5 - -The difference between MobX 4 and MobX 5 is that the latter uses Proxies to do property tracking. As a consequence, MobX 5 runs only on Proxy supporting browsers, in contrast to MobX 4 that runs on any ES 5 environment. - -The most noteable limitations of MobX 4: - * Observable arrays are not real arrays, so they won't pass the `Array.isArray()` check. The practical consequence is that you often need to `.slice()` the array first (to get a real array shallow copy) before passing to third party libraries. - * Adding properties to existing observable objects after creation is not automatically picked up. Instead, either use observable maps or use the the built-in [utility functions](https://mobx.js.org/refguide/object-api.html) to read / write / iterate objects that you want to dynamically add properties to. - -For more details see the [caveats page](https://mobx.js.org/best/pitfalls.html). - -## Flow support -MobX ships with [flow typings](flow-typed/mobx.js). Flow will automatically include them when you import MobX modules. Although you **do not** need to import the types explicitly, you can still do it like this: `import type { ... } from 'mobx'`. - -To use the [flow typings](flow-typed/mobx.js) shipped with MobX: - -* In `.flowconfig`, you **cannot** ignore `node_modules`. -* In `.flowconfig`, you **cannot** import it explicitly in the `[libs]` section. -* You **do not** need to install library definition using [flow-typed](https://github.com/flowtype/flow-typed). - -## Donating - -Was MobX key in making your project a success? -Join our [open collective](https://opencollective.com/mobx#) or use the [donate button](https://mobxjs.github.io/mobx/donate.html)! - -### Backers -Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/mobx#backer)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -One time donations through paypal are welcome as well and are recorded in the [sponsors](sponsors.md) list. - -[![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://mobxjs.github.io/mobx/donate.html) - -### Sponsors - -Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/mobx#sponsor)] - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +A ton of credit goes to [Mendix](https://github.com/mendix), for providing the flexibility and support to maintain MobX and the chance to prove the philosophy of MobX in a real, complex, performance critical applications. diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000000..ffd3e2fcf1 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,12 @@ +# Security Policy + +All our packages are provided as-is without guarantees or SLAs. +Security issues will be handled with appropriate urgency but without warranties. + +## Supported Versions + +Security issues must be reported against latest version of each package (as found on NPM) and will not be back-ported. + +## Reporting a Vulnerability + +Security issues can be reported at info@michel.codes. Since this software is provided as-is no follow up, remediation or time lines are guaranteed. diff --git a/docs/LINKS.md b/docs/LINKS.md new file mode 100644 index 0000000000..03c993e8a5 --- /dev/null +++ b/docs/LINKS.md @@ -0,0 +1,33 @@ + + +# Resources + +- [Ten minute interactive introduction to MobX and React](https://mobx.js.org/getting-started) +- How MobX works: [In depth explanation of MobX](https://medium.com/@mweststrate/becoming-fully-reactive-an-in-depth-explanation-of-mobservable-55995262a254#.wnlo6bw8y) +- Clone the boilerplate repository containing the above example from: https://github.com/mweststrate/react-mobservable-boilerplate. +- Or fork this [JSFiddle](https://jsfiddle.net/mweststrate/wgbe4guu/). + +## Related projects + +- [mobx-connect](https://github.com/nightwolfz/mobx-connect) MobX @connect decorator for react components. Similar to redux's @connect. +- [rfx-stack](https://github.com/foxhound87/rfx-stack) RFX Stack - Universal App featuring: React + Feathers + MobX +- [mobx-reactor](https://github.com/amsb/mobx-reactor) Connect MobX data stores to functional stateless React components with async actions and unidirectional data flow. +- [mobx-model](https://github.com/ikido/mobx-model) Simplify mobx data stores that mimic backend models +- [rx-mobx](https://github.com/chicoxyzzy/rx-mobx) Convert MobX observables to RxJS and vice versa + +## More examples + +A nice list is WIP, but see this [github issue](https://github.com/mobxjs/mobx/issues/104) for a list of example projects, including routing, authorization, server side rendering etc. + +- [TodoMVC using MobX and React](https://github.com/mweststrate/mobx-todomvc) +- The [ports of the _Notes_ and _Kanban_ examples](https://github.com/survivejs/mobservable-demo) from the book "SurviveJS - Webpack and React" to mobservable. +- A simple webshop using [React + mobx](https://jsfiddle.net/mweststrate/46vL0phw) or [JQuery + mobx](http://jsfiddle.net/mweststrate/vxn7qgdw). +- [Simple timer](https://jsfiddle.net/mweststrate/wgbe4guu/) application in JSFiddle. +- [Simple ES5 MobX examples](https://github.com/mattruby/mobx-examples) Bite sized MobX examples all setup to run in jsFiddle. + +## Philosophy + +- [Making React reactive: the pursuit of high performing, easily maintainable React apps](https://www.mendix.com/tech-blog/making-react-reactive-pursuit-high-performing-easily-maintainable-react-apps/) +- [SurviveJS interview on Mobservable, React and Flux](http://survivejs.com/blog/mobservable-interview/) +- [Pure rendering in the light of time and state](https://medium.com/@mweststrate/pure-rendering-in-the-light-of-time-and-state-4b537d8d40b1) +- [Official homepage](http://mobxjs.github.io/mobx/) diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000000..04e3529271 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,186 @@ +--- +title: About MobX +sidebar_label: About MobX +hide_title: true +--- + +logo + +# MobX + +_Simple, scalable state management._ + +[![Discuss on Github](https://img.shields.io/badge/discuss%20on-GitHub-orange)](https://github.com/mobxjs/mobx/discussions) +[![npm version](https://badge.fury.io/js/mobx.svg)](https://badge.fury.io/js/mobx) +[![OpenCollective](https://opencollective.com/mobx/backers/badge.svg)](backers-sponsors.md#backers) +[![OpenCollective](https://opencollective.com/mobx/sponsors/badge.svg)](backers-sponsors.md#sponsors) +[![View changelog](https://img.shields.io/badge/changelogs.xyz-Explore%20Changelog-brightgreen)](https://changelogs.xyz/mobx) + +--- + +MobX is made possible by the generosity of the sponsors below, and many other [individual backers](backers-sponsors.md#backers). Sponsoring directly impacts the longevity of this project. + +**🥇🥇 Platinum sponsors (\$5000+ total contribution): 🥇🥇** + +
    +Guilded +Canva +Parallax + +**🥇 Gold sponsors (\$2500+ total contribution):** + +
    +One Beyond +Frontend Masters +Auction Frontier +CodeFirst +Modulz +Coinbase +Curology +Mendix +Facebook Open Source +Casino Sites +Bugsnag + +**🥈 Silver sponsors (\$500+ total contributions):**
    + +mantro GmbH +Extremely Heavy +Algolia +Space307 +Blokt +UPPER +DAZN +talentplot +EaseUS +Route Planner and Route Optimizer +Handsontable + +--- + +## Introduction + +_Anything that can be derived from the application state, should be. Automatically._ + +MobX is a signal based, battle-tested library that makes state management simple and scalable by transparently applying functional reactive programming. +The philosophy behind MobX is simple: + +
    +
    +
    😙
    +
    +

    Straightforward

    +

    Write minimalistic, boilerplate-free code that captures your intent. + Trying to update a record field? Simply use a normal JavaScript assignment — + the reactivity system will detect all your changes and propagate them out to where they are being used. + No special tools are required when updating data in an asynchronous process. +

    +
    +
    +
    +
    🚅
    +
    +

    Effortless optimal rendering

    +

    + All changes to and uses of your data are tracked at runtime, building a dependency tree that captures all relations between state and output. + This guarantees that computations that depend on your state, like React components, run only when strictly needed. + There is no need to manually optimize components with error-prone and sub-optimal techniques like memoization and selectors. +

    +
    +
    +
    +
    🤹🏻‍♂️
    +
    +

    Architectural freedom

    +

    + MobX is unopinionated and allows you to manage your application state outside of any UI framework. + This makes your code decoupled, portable, and above all, easily testable. +

    +
    +
    +
    + +--- + +## A quick example + +So what does code that uses MobX look like? + +```javascript +import React from "react" +import ReactDOM from "react-dom" +import { makeAutoObservable } from "mobx" +import { observer } from "mobx-react-lite" + +// Model the application state. +function createTimer() { + return makeAutoObservable({ + secondsPassed: 0, + increase() { + this.secondsPassed += 1 + }, + reset() { + this.secondsPassed = 0 + } + }) +} + +const myTimer = createTimer() + +// Build a "user interface" that uses the observable state. +const TimerView = observer(({ timer }) => ( + +)) + +ReactDOM.render(, document.body) + +// Update the 'Seconds passed: X' text every second. +setInterval(() => { + myTimer.increase() +}, 1000) +``` + +The `observer` wrapper around the `TimerView` React component will automatically detect that rendering +depends on the `timer.secondsPassed` observable, even though this relationship is not explicitly defined. The reactivity system will take care of re-rendering the component when _precisely that_ field is updated in the future. + +Every event (`onClick` / `setInterval`) invokes an _action_ (`myTimer.increase` / `myTimer.reset`) that updates _observable state_ (`myTimer.secondsPassed`). +Changes in the observable state are propagated precisely to all _computations_ and _side effects_ (`TimerView`) that depend on the changes being made. + +MobX unidirectional flow + +This conceptual picture can be applied to the above example, or any other application using MobX. + +## Getting started + +To learn about the core concepts of MobX using a larger example, check out **[The gist of MobX](the-gist-of-mobx.md)** page, or take the **[10 minute interactive introduction to MobX and React](https://mobx.js.org/getting-started)**. + +The philosophy and benefits of the mental model provided by MobX are also described in great detail in the blog posts [UI as an afterthought](https://michel.codes/blogs/ui-as-an-afterthought) and [How to decouple state and UI (a.k.a. you don’t need componentWillMount)](https://hackernoon.com/how-to-decouple-state-and-ui-a-k-a-you-dont-need-componentwillmount-cc90b787aa37). + +## Further resources + +- The [MobX cheat sheet](https://gum.co/fSocU) (£5) is both useful and sponsors the project +- [10 minute interactive introduction to MobX and React](https://mobx.js.org/getting-started) +- [Egghead.io course, based on MobX 3](https://egghead.io/courses/manage-complex-state-in-react-apps-with-mobx) +- The [MobX awesome list](https://github.com/mobxjs/awesome-mobx#awesome-mobx) – a long list of MobX resources and example projects + +### The MobX book + + + +The **[MobX Quick Start Guide](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837)** ($24.99) by [Pavan Podila](https://twitter.com/pavanpodila) and [Michel Weststrate](https://twitter.com/mweststrate) is available as an [ebook](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837), [paperback](https://www.amazon.com/MobX-Quick-Start-Guide-Supercharge/dp/1789344832), and on the [O'Reilly platform](https://www.oreilly.com/library/view/mobx-quick-start/9781789344837/) (see [preview](https://books.google.com/books?id=ALFmDwAAQBAJ&printsec=frontcover#v=onepage&q&f=false)). + +### Videos + +- [Introduction to MobX & React in 2020](https://www.youtube.com/watch?v=pnhIJA64ByY) by Leigh Halliday, _17 min_. +- [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) by Michel Weststrate, _40 min_, [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing). +- [CityJS 2020: MobX, from mutable to immutable, to observable data](https://youtu.be/sP7dtZm_Wx0?t=27050) by Michel Weststrate, _30 min_. +- [OpenSourceNorth: Practical React with MobX (ES5)](https://www.youtube.com/watch?v=XGwuM_u7UeQ) by Matt Ruby, _42 min_. +- [HolyJS 2019: MobX and the unique symbiosis of predictability and speed](https://www.youtube.com/watch?v=NBYbBbjZeX4&list=PL8sJahqnzh8JJD7xahG5zXkjfM5GOgcPA&index=21&t=0s) by Michel Weststrate, _59 min_. +- [React Amsterdam 2016: State Management Is Easy](https://www.youtube.com/watch?v=ApmSsu3qnf0&feature=youtu.be) by Michel Weststrate, _20 min_, [slides](https://speakerdeck.com/mweststrate/state-management-is-easy-introduction-to-mobx). +- {🚀} [React Live 2019: Reinventing MobX](https://www.youtube.com/watch?v=P_WqKZxpX8g) by Max Gallo, _27 min_. + +## Credits + +MobX is inspired by reactive programming principles, which are for example used in spreadsheets. It is inspired by model–view–viewmodel frameworks like [MeteorJS's Tracker](https://docs.meteor.com/api/tracker.html), [Knockout](https://knockoutjs.com/) and [Vue.js](https://vuejs.org/), but MobX brings _transparent functional reactive programming_ (TFRP, a concept which is further explained in the [MobX book](https://www.packtpub.com/product/mobx-quick-start-guide/9781789344837)) to the next level and provides a standalone implementation. It implements TFRP in a glitch-free, synchronous, predictable and efficient manner. + +A ton of credit goes to [Mendix](https://github.com/mendix) for providing the flexibility and support to maintain MobX and the chance to prove the philosophy of MobX in a real, complex, performance critical applications. diff --git a/docs/about-this-documentation.md b/docs/about-this-documentation.md new file mode 100644 index 0000000000..b1df960d9a --- /dev/null +++ b/docs/about-this-documentation.md @@ -0,0 +1,50 @@ +--- +title: About this documentation +sidebar_label: About this documentation +hide_title: true +--- + + + +# About this documentation + +It follows the principle that the most commonly used concepts are +introduced before specialized information. This applies to the headings in the table +of concepts as well as the pages under those headings. + +We've marked the sections and concepts that are more advanced with the {🚀} marker. You likely won't have to understand them until you will have a special use case, and can use MobX very effectively without knowing about them. Feel free to skip them and move on to the next section! + +The documentation has been rewritten for MobX 6. For older versions of MobX, it can be found [here](https://github.com/mobxjs/mobx/tree/mobx4and5/docs). +All the principles are the same, and the API is largely the same. The main difference is that before MobX 6, [decorators](https://github.com/mobxjs/mobx/blob/mobx4and5/docs/best/decorators.md) were the recommended syntax to write MobX enhanced classes. + +A summary of the documentation can be downloaded as cheat sheet: + + + +## Guided tour + +To get an overall idea of how to use MobX with React, read through the current _Introduction_ heading, in particular [The gist of MobX](the-gist-of-mobx.md) section. +It will introduce you to the most important principles, APIs and how they relate. +You should be ready to use MobX once you read this! + +Here are a few suggestions about the next things to check out: + +- Try the [10 minute interactive introduction to MobX and React](https://mobx.js.org/getting-started) + +- [React integration](react-integration.md) + +- [`makeObservable` / `makeAutoObservable`](observable-state.md) + +- Learn about [actions](actions.md), which includes a discussion on asynchronous actions + +- The basics of [computeds](computeds.md) + +- Read about [`autorun`](reactions.md#autorun), if only because it's used in the examples + +- To get an idea on how to organize your application's data stores, check out [Defining data stores](defining-data-stores.md) + +- If the behavior of MobX confuses you, it's useful to check out [Understanding reactivity](understanding-reactivity.md) + +- Get a [quick overview of the API](api.md), also linked in the top navigation bar + +This should give you a good understanding of the day-to-day uses of MobX. There is plenty more available for you to read at your own leisure. diff --git a/docs/actions.md b/docs/actions.md new file mode 100644 index 0000000000..611c51a394 --- /dev/null +++ b/docs/actions.md @@ -0,0 +1,502 @@ +--- +title: Updating state using actions +sidebar_label: Actions +hide_title: true +--- + + + +# Updating state using actions + +Usage: + +- `action` _(annotation)_ +- `action(fn)` +- `action(name, fn)` +- `@action` _(method / field decorator)_ + +All applications have actions. An action is any piece of code that modifies the state. In principle, actions always happen in response to an event. For example, a button was clicked, some input changed, a websocket message arrived, etc. + +MobX requires that you declare your actions, although [`makeAutoObservable`](observable-state.md#makeautoobservable) can automate much of this job. Actions help you structure your code better and offer the following performance benefits: + +1. They are run inside [transactions](api.md#transaction). No reactions will be run until the outer-most action has finished, guaranteeing that intermediate or incomplete values produced during an action are not visible to the rest of the application until the action has completed. + +2. By default, it is not allowed to change the state outside of actions. This helps to clearly identify in your code base where the state updates happen. + +The `action` annotation should only be used on functions that intend to _modify_ the state. Functions that derive information (performing lookups or filtering data) should _not_ be marked as actions, to allow MobX to track their invocations. `action` annotated members will be non-enumerable. + +## Examples + + + + +```javascript +import { makeObservable, observable, action } from "mobx" + +class Doubler { + value = 0 + + constructor() { + makeObservable(this, { + value: observable, + increment: action + }) + } + + increment() { + // Intermediate states will not become visible to observers. + this.value++ + this.value++ + } +} +``` + + + +```javascript +import { observable, action } from "mobx" + +class Doubler { + @observable accessor value = 0 + + @action + increment() { + // Intermediate states will not become visible to observers. + this.value++ + this.value++ + } +} +``` + + + +```javascript +import { makeAutoObservable } from "mobx" + +class Doubler { + value = 0 + + constructor() { + makeAutoObservable(this) + } + + increment() { + this.value++ + this.value++ + } +} +``` + + + +```javascript +import { makeObservable, observable, action } from "mobx" + +class Doubler { + value = 0 + + constructor() { + makeObservable(this, { + value: observable, + increment: action.bound + }) + } + + increment() { + this.value++ + this.value++ + } +} + +const doubler = new Doubler() + +// Calling increment this way is safe as it is already bound. +setInterval(doubler.increment, 1000) +``` + + + +```javascript +import { observable, action } from "mobx" + +const state = observable({ value: 0 }) + +const increment = action(state => { + state.value++ + state.value++ +}) + +increment(state) +``` + + + +```javascript +import { observable, runInAction } from "mobx" + +const state = observable({ value: 0 }) + +runInAction(() => { + state.value++ + state.value++ +}) +``` + + + +## Wrapping functions using `action` + +To leverage the transactional nature of MobX as much as possible, actions should be passed as far outward as possible. It is good to mark a class method as an action if it modifies the state. It is even better to mark event handlers as actions, as it is the outer-most transaction that counts. A single unmarked event handler that calls two actions subsequently would still generate two transactions. + +To help create action based event handlers, `action` is not only an annotation, but also a higher order function. It can be called with a function as an argument, and in that case it will return an `action` wrapped function with the same signature. + +For example in React, an `onClick` handler can be wrapped as below. + +```javascript +const ResetButton = ({ formState }) => ( + +) +``` + +For debugging purposes, we recommend to either name the wrapped function, or pass a name as the first argument to `action`. + +
    **Note:** actions are untracked + +Another feature of actions is that they are [untracked](api.md#untracked). When an action is called from inside a side effect or a computed value (very rare!), observables read by the action won't be counted towards the dependencies of the derivation. + +`makeAutoObservable`, `extendObservable` and `observable` use a special flavour of `action` called [`autoAction`](observable-state.md#autoAction), +that will determine at runtime if the function is a derivation or action. + +
    + +## `action.bound` + +Usage: + +- `action.bound` _(annotation)_ + +The `action.bound` annotation can be used to automatically bind a method to the correct instance, so that `this` is always correctly bound inside the function. + +
    **Tip:** use `makeAutoObservable(o, {}, { autoBind: true })` to bind all actions and flows automatically + +```javascript +import { makeAutoObservable } from "mobx" + +class Doubler { + value = 0 + + constructor() { + makeAutoObservable(this, {}, { autoBind: true }) + } + + increment() { + this.value++ + this.value++ + } + + *flow() { + const response = yield fetch("http://example.com/value") + this.value = yield response.json() + } +} +``` + +
    + +## `runInAction` + +Usage: + +- `runInAction(fn)` + +Use this utility to create a temporary action that is immediately invoked. Can be useful in asynchronous processes. +Check out the [above code block](#examples) for an example. + +## Actions and inheritance + +Only actions defined **on prototype** can be **overridden** by subclass: + +```javascript +class Parent { + // on instance + arrowAction = () => {} + + // on prototype + action() {} + boundAction() {} + + constructor() { + makeObservable(this, { + arrowAction: action, + action: action, + boundAction: action.bound, + }) + } +} +class Child extends Parent { + // THROWS: TypeError: Cannot redefine property: arrowAction + arrowAction = () => {} + + // OK + action() {} + boundAction() {} + + constructor() { + super() + makeObservable(this, { + arrowAction: override, + action: override, + boundAction: override, + }) + } +} +``` + +To **bind** a single _action_ to `this`, `action.bound` can be used instead of _arrow functions_.
    +See [**subclassing**](subclassing.md) for more information. + +## Asynchronous actions + +In essence, asynchronous processes don't need any special treatment in MobX, as all reactions will update automatically regardless of the moment in time they are caused. +And since observable objects are mutable, it is generally safe to keep references to them for the duration of an action. +However, every step (tick) that updates observables in an asynchronous process should be marked as `action`. +This can be achieved in multiple ways by leveraging the above APIs, as shown below. + +For example, when handling promises, the handlers that update state should be actions or should be wrapped using `action`, as shown below. + + + + +Promise resolution handlers are handled in-line, but run after the original action finished, so they need to be wrapped by `action`: + +```javascript +import { action, makeAutoObservable } from "mobx" + +class Store { + githubProjects = [] + state = "pending" // "pending", "done" or "error" + + constructor() { + makeAutoObservable(this) + } + + fetchProjects() { + this.githubProjects = [] + this.state = "pending" + fetchGithubProjectsSomehow().then( + action("fetchSuccess", projects => { + const filteredProjects = somePreprocessing(projects) + this.githubProjects = filteredProjects + this.state = "done" + }), + action("fetchError", error => { + this.state = "error" + }) + ) + } +} +``` + + + +If the promise handlers are class fields, they will automatically be wrapped in `action` by `makeAutoObservable`: + +```javascript +import { makeAutoObservable } from "mobx" + +class Store { + githubProjects = [] + state = "pending" // "pending", "done" or "error" + + constructor() { + makeAutoObservable(this) + } + + fetchProjects() { + this.githubProjects = [] + this.state = "pending" + fetchGithubProjectsSomehow().then(this.projectsFetchSuccess, this.projectsFetchFailure) + } + + projectsFetchSuccess = projects => { + const filteredProjects = somePreprocessing(projects) + this.githubProjects = filteredProjects + this.state = "done" + } + + projectsFetchFailure = error => { + this.state = "error" + } +} +``` + + + +Any steps after `await` aren't in the same tick, so they require action wrapping. +Here, we can leverage `runInAction`: + +```javascript +import { runInAction, makeAutoObservable } from "mobx" + +class Store { + githubProjects = [] + state = "pending" // "pending", "done" or "error" + + constructor() { + makeAutoObservable(this) + } + + async fetchProjects() { + this.githubProjects = [] + this.state = "pending" + try { + const projects = await fetchGithubProjectsSomehow() + const filteredProjects = somePreprocessing(projects) + runInAction(() => { + this.githubProjects = filteredProjects + this.state = "done" + }) + } catch (e) { + runInAction(() => { + this.state = "error" + }) + } + } +} +``` + + + +```javascript +import { flow, makeAutoObservable, flowResult } from "mobx" + +class Store { + githubProjects = [] + state = "pending" + + constructor() { + makeAutoObservable(this, { + fetchProjects: flow + }) + } + + // Note the star, this a generator function! + *fetchProjects() { + this.githubProjects = [] + this.state = "pending" + try { + // Yield instead of await. + const projects = yield fetchGithubProjectsSomehow() + const filteredProjects = somePreprocessing(projects) + this.state = "done" + this.githubProjects = filteredProjects + return projects + } catch (error) { + this.state = "error" + } + } +} + +const store = new Store() +const projects = await flowResult(store.fetchProjects()) +``` + + + +## Using flow instead of async / await {🚀} + +Usage: + +- `flow` _(annotation)_ +- `flow(function* (args) { })` +- `@flow` _(method decorator)_ + +The `flow` wrapper is an optional alternative to `async` / `await` that makes it easier to +work with MobX actions. +`flow` takes a [generator function](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator) as its only input. +Inside the generator, you can chain promises by yielding them (instead of `await somePromise` you write `yield somePromise`). +The flow mechanism will then make sure the generator either continues or throws when a yielded promise resolves. + +So `flow` is an alternative to `async` / `await` that doesn't need any further `action` wrapping. It can be applied as follows: + +1. Wrap `flow` around your asynchronous function. +2. Instead of `async` use `function *`. +3. Instead of `await` use `yield`. + +The [`flow` + generator function](#asynchronous-actions) example above shows what this looks like in practice. + +Note that the `flowResult` function is only needed when using TypeScript. +Since decorating a method with `flow`, it will wrap the returned generator in a promise. +However, TypeScript isn't aware of that transformation, so `flowResult` will make sure that TypeScript is aware of that type change. + +`makeAutoObservable` and friends will automatically infer generators to be `flow`s. `flow` annotated members will be non-enumerable. + +
    {🚀} **Note:** using flow on object fields +`flow`, like `action`, can be used to wrap functions directly. The above example could also have been written as follows: + +```typescript +import { flow, makeObservable, observable } from "mobx" + +class Store { + githubProjects = [] + state = "pending" + + constructor() { + makeObservable(this, { + githubProjects: observable, + state: observable, + }) + } + + fetchProjects = flow(function* (this: Store) { + this.githubProjects = [] + this.state = "pending" + try { + // yield instead of await. + const projects = yield fetchGithubProjectsSomehow() + const filteredProjects = somePreprocessing(projects) + this.state = "done" + this.githubProjects = filteredProjects + } catch (error) { + this.state = "error" + } + }) +} + +const store = new Store() +const projects = await store.fetchProjects() +``` + +The upside is that we don't need `flowResult` anymore, the downside is that `this` needs to be typed to make sure its type is inferred correctly. + +
    + +## `flow.bound` + +Usage: + +- `flow.bound` _(annotation)_ + +The `flow.bound` annotation can be used to automatically bind a method to the correct instance, so that `this` is always correctly bound inside the function. +Similarly to actions, flows can be bound by default using [`autoBind` option](#auto-bind). + +## Cancelling flows {🚀} + +Another neat benefit of flows is that they are cancellable. +The return value of `flow` is a promise that resolves with the value that is returned from the generator function in the end. +The returned promise has an additional `cancel()` method that will interrupt the running generator and cancel it. +Any `try` / `finally` clauses will still be run. + +## Disabling mandatory actions {🚀} + +By default, MobX 6 and later require that you use actions to make changes to the state. +However, you can configure MobX to disable this behavior. Check out the [`enforceActions`](configuration.md#enforceactions) section. +For example, this can be quite useful in unit test setup, where the warnings don't always have much value. diff --git a/docs/analyzing-reactivity.md b/docs/analyzing-reactivity.md new file mode 100644 index 0000000000..80ad31378a --- /dev/null +++ b/docs/analyzing-reactivity.md @@ -0,0 +1,138 @@ +--- +title: Analyzing reactivity +sidebar_label: Analyzing reactivity {🚀} +hide_title: true +--- + + + +# Analyzing reactivity {🚀} + +# Using `trace` for debugging + +Trace is a small utility that helps you find out why your computed values, reactions or components are re-evaluating. + +It can be used by simply importing `import { trace } from "mobx"`, and then putting it inside a reaction or computed value. +It will print why it is re-evaluating the current derivation. + +Optionally it is possible to automatically enter the debugger by passing `true` as the last argument. +This way the exact mutation that causes the reaction to re-run will still be in stack, usually ~8 stack frames up. See the image below. + +In debugger mode, the debug information will also reveal the full derivation tree that is affecting the current computation / reaction. + +![trace](assets/trace-tips2.png) + +![trace](assets/trace.gif) + +## Live examples + +Simple [CodeSandbox `trace` example](https://codesandbox.io/s/trace-dnhbz?file=/src/index.js:309-338). + +[Here's a deployed example](https://csb-nr58ylyn4m-hontnuliaa.now.sh/) for exploring the stack. +Make sure to play with the chrome debugger's blackbox feature! + +## Usage examples + +There are different ways of calling `trace()`, some examples: + +```javascript +import { observer } from "mobx-react" +import { trace } from "mobx" + +const MyComponent = observer(() => { + trace(true) // Enter the debugger whenever an observable value causes this component to re-run. + return
    {this.props.user.name} +}) +``` + +Enable trace by using the `reaction` argument of a reaction / autorun: + +```javascript +mobx.autorun("logger", reaction => { + reaction.trace() + console.log(user.fullname) +}) +``` + +Pass in the property name of a computed property: + +```javascript +trace(user, "fullname") +``` + +# Introspection APIs + +The following APIs might come in handy if you want to inspect the internal state of MobX while debugging, or want to build cool tools on top of MobX. +Also relevant are the various [`isObservable*` APIs](api.md#isobservable). + +### `getDebugName` + +Usage: + +- `getDebugName(thing, property?)` + +Returns a (generated) friendly debug name of an observable object, property, reaction etc. Used for example by the [MobX developer tools](https://github.com/mobxjs/mobx-devtools). + +### `getDependencyTree` + +Usage: + +- `getDependencyTree(thing, property?)`. + +Returns a tree structure with all observables the given reaction / computation currently depends upon. + +### `getObserverTree` + +Usage: + +- `getObserverTree(thing, property?)`. + +Returns a tree structure with all reactions / computations that are observing the given observable. + +### `getAtom` + +Usage: + +- `getAtom(thing, property?)`. + +Returns the backing _Atom_ of a given observable object, property, reaction etc. + +# Spy + +Usage: + +- `spy(listener)` + +Registers a global spy listener that listens to all events that happen in MobX. +It is similar to attaching an `observe` listener to _all_ observables at once, but also notifies about running (trans/re)actions and computations. +Used for example by the [MobX developer tools](https://github.com/mobxjs/mobx-devtools). + +Example usage of spying all actions: + +```javascript +spy(event => { + if (event.type === "action") { + console.log(`${event.name} with args: ${event.arguments}`) + } +}) +``` + +Spy listeners always receive one object, which usually has at least a `type` field. The following events are emitted by default by spy: + +| Type | observableKind | Other fields | Nested | +| ------------------------------- | -------------- | -------------------------------------------------------------- | ------ | +| action | | name, object (scope), arguments[] | yes | +| scheduled-reaction | | name | no | +| reaction | | name | yes | +| error | | name, message, error | no | +| add,update,remove,delete,splice | | Check out [Intercept & observe {🚀}](intercept-and-observe.md) | yes | +| report-end | | spyReportEnd=true, time? (total execution time in ms) | no | + +The `report-end` events are part of an earlier fired event that had `spyReportStart: true`. +This event indicates the end of an event and this way groups of events with sub-events are created. +This event might report the total execution time as well. + +The spy events for observable values are identical to the events passed to `observe`. +In production builds, the `spy` API is a no-op as it will be minimized away. + +Check out the [Intercept & observe {🚀}](intercept-and-observe.md#event-overview) section for an extensive overview. diff --git a/docs/api.md b/docs/api.md new file mode 100644 index 0000000000..4db83b102a --- /dev/null +++ b/docs/api.md @@ -0,0 +1,582 @@ +--- +title: MobX API Reference +sidebar_label: API +hide_title: true +--- + + + +# MobX API Reference + +Functions marked with {🚀} are considered advanced, and should typically not be needed. +Consider downloading our handy cheat sheet that explains all important APIs on a single page: + + + +## Core APIs + +_These are the most important MobX APIs._ + +> Understanding [`observable`](#observable), [`computed`](#computed), [`reaction`](#reaction) and [`action`](#action) is enough to master and use MobX in your applications! + +## Creating observables + +_Making things observable._ + +### `makeObservable` + +Usage: `makeObservable(target, annotations?, options?)` +([further information](observable-state.md#makeobservable)) + +Properties, entire objects, arrays, Maps and Sets can all be made observable. + +### `makeAutoObservable` + +Usage: `makeAutoObservable(target, overrides?, options?)` +([further information](observable-state.md#makeautoobservable)) + +Automatically make properties, objects, arrays, Maps and Sets observable. + +### `extendObservable` + +{🚀} Usage: `extendObservable(target, properties, overrides?, options?)` + +Can be used to introduce new properties on the `target` object and make them observable immediately. Basically a shorthand for `Object.assign(target, properties); makeAutoObservable(target, overrides, options);`. However, existing properties on `target` won't be touched. + +Old-fashioned constructor functions can nicely leverage `extendObservable`: + +```javascript +function Person(firstName, lastName) { + extendObservable(this, { firstName, lastName }) +} + +const person = new Person("Michel", "Weststrate") +``` + +It is possible to use `extendObservable` to add observable fields to an existing object after instantiation, but be careful that adding an observable property this way is in itself not a fact that can be observed. + +### `observable` + +Usage: `observable(source, overrides?, options?)`, `observable` _(annotation)_ or `@observable accessor` _(field decorator)_. +([further information](observable-state.md#observable)) + +Clones an object and makes it observable. Source can be a plain object, array, Map or Set. By default, `observable` is applied recursively. If one of the encountered values is an object or array, that value will be passed through `observable` as well. + +### `observable.object` + +{🚀} Usage: `observable.object(source, overrides?, options?)` +([further information](observable-state.md#observable)) + +Alias for `observable(source, overrides?, options?)`. Creates a clone of the provided object and makes all of its properties observable. + +### `observable.array` + +{🚀} Usage: `observable.array(initialValues?, options?)` + +Creates a new observable array based on the provided `initialValues`. +To convert observable arrays back to plain arrays, use the `.slice()` method, or check out [toJS](#tojs) to convert them recursively. +Besides all the language built-in array functions, the following goodies are available on observable arrays as well: + +- `clear()` removes all current entries from the array. +- `replace(newItems)` replaces all existing entries in the array with new ones. +- `remove(value)` removes a single item by value from the array and returns `true` if the item was found and removed. + +If the values in the array should not be turned into observables automatically, use the `{ deep: false }` option to make the array shallowly observable. + +### `observable.map` + +{🚀} Usage: `observable.map(initialMap?, options?)` + +Creates a new observable [ES6 Map](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) based on the provided `initialMap`. +They are very useful if you don't want to react just to the change of a specific entry, but also to their addition and removal. +Creating observable Maps is the recommended approach for creating dynamically keyed collections if you don't have [enabled Proxies](configuration.md#proxy-support). + +Besides all the language built-in Map functions, the following goodies are available on observable Maps as well: + +- `toJSON()` returns a shallow plain object representation of this Map (use [toJS](#tojs) for a deep copy). +- `merge(values)` copies all entries from the provided `values` (plain object, array of entries or a string-keyed ES6 Map) into this Map. +- `replace(values)` replaces the entire contents of this Map with the provided `values`. + +If the values in the Map should not be turned into observables automatically, use the `{ deep: false }` option to make the Map shallowly observable. + +### `observable.set` + +{🚀} Usage: `observable.set(initialSet?, options?)` + +Creates a new observable [ES6 Set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) based on the provided `initialSet`. Use it whenever you want to create a dynamic set where the addition and removal of values needs to be observed, but where values can appear only once in the entire collection. + +If the values in the Set should not be turned into observables automatically, use the `{ deep: false }` option to make the Set shallowly observable. + +Unlike Map keys, Set values are [not tracked individually](https://github.com/mobxjs/mobx/issues/2336#issuecomment-616128089). + +### `observable.ref` + +Usage: `observable.ref` _(annotation)_ +([further information](observable-state.md#available-annotations)) + +Like the `observable` annotation, but only reassignments will be tracked. The assigned values themselves won't be made observable automatically. For example, use this if you intend to store immutable data in an observable field. + +### `observable.shallow` + +Usage: `observable.shallow` _(annotation)_ +([further information](observable-state.md#available-annotations)) + +Like the `observable.ref` annotation, but for collections. Any collection assigned will be made observable, but the contents of the collection itself won't become observable. + +### `observable.struct` + +{🚀} Usage: `observable.struct` _(annotation)_ +([further information](observable-state.md#available-annotations)) + +Like the `observable` annotation, except that any assigned value that is structurally equal to the current value will be ignored. + +### `observable.deep` + +{🚀} Usage: `observable.deep` _(annotation)_ +([further information](observable-state.md#available-annotations)) + +Alias for the [`observable`](#observable) annotation. + +### `observable.box` + +{🚀} Usage: `observable.box(value, options?)` + +All primitive values in JavaScript are immutable and hence per definition not observable. +Usually that is fine, as MobX can just make the _property_ that contains the value observable. +In rare cases, it can be convenient to have an observable _primitive_ that is not owned by an object. +For such cases, it is possible to create an observable _box_ that manages such a _primitive_. + +`observable.box(value)` accepts any value and stores it inside a box. The current value can be accessed through `.get()` and updated using `.set(newValue)`. + +```javascript +import { observable, autorun } from "mobx" + +const cityName = observable.box("Vienna") + +autorun(() => { + console.log(cityName.get()) +}) +// Prints: 'Vienna' + +cityName.set("Amsterdam") +// Prints: 'Amsterdam' +``` + +If the values in the box should not be turned into observables automatically, use the `{ deep: false }` option to make the box shallowly observable. + +--- + +## Actions + +_An action is any piece of code that modifies the state._ + +### `action` + +Usage: `action(fn)`, `action` _(annotation)_ or `@action` _(method / field decorator)_ +([further information](actions.md)) + +Use on functions that intend to modify the state. + +### `runInAction` + +{🚀} Usage: `runInAction(fn)` +([further information](actions.md#runinaction)) + +Create a one-time action that is immediately invoked. + +### `flow` + +Usage: `flow(fn)`, `flow` _(annotation)_ or `@flow` _(generator method decorator)_ +([further information](actions.md#using-flow-instead-of-async--await-)) + +MobX friendly replacement for `async` / `await` that supports cancellation. + +### `flowResult` + +Usage: `flowResult(flowFunctionResult)` +([further information](actions.md#using-flow-instead-of-async--await-)) + +For TypeScript users only. Utility that casts the output of the generator to a promise. +This is just a type-wise correction for the promise wrapping done by `flow`. At runtime it directly returns the inputted value. + +--- + +## Computeds + +_Computed values can be used to derive information from other observables._ + +### `computed` + +Usage: `computed(fn, options?)`, `computed(options?)` _(annotation)_ or `@computed` _(getter decorator)_ +([further information](computeds.md)) + +Creates an observable value that is derived from other observables, but won't be recomputed unless one of the underlying observables changes. + +--- + +## React integration + +_From the `mobx-react` / `mobx-react-lite` packages._ + +### `observer` + +Usage: `observer(component)` +([further information](react-integration.md)) + +A higher order component you can use to make a functional or class based React component re-render when observables change. + +### `Observer` + +Usage: `{() => rendering}` +([further information](react-integration.md#callback-components-might-require-observer)) + +Renders the given render function, and automatically re-renders it once one of the observables used in the render function changes. + +### `useLocalObservable` + +Usage: `useLocalObservable(() => source, annotations?)` +([further information](react-integration.md#using-local-observable-state-in-observer-components)) + +Creates a new observable object using `makeObservable`, and keeps it around in the component for the entire life-cycle of the component. + +--- + +## Reactions + +_The goal of reactions is to model side effects that happen automatically._ + +### `autorun` + +Usage: `autorun(() => effect, options?)` +([further information](reactions.md#autorun)) + +Reruns a function every time anything it observes changes. + +### `reaction` + +Usage: `reaction(() => data, data => effect, options?)` +([further information](reactions.md#reaction)) + +Reruns a side effect when any selected data changes. + +### `when` + +Usage: `when(() => condition, () => effect, options?)` or `await when(() => condition, options?)` +([further information](reactions.md#when)) + +Executes a side effect once when a observable condition becomes true. + +--- + +## Utilities + +_Utilities that might make working with observable objects or computed values more convenient. Less trivial utilities can also be found in the [mobx-utils](https://github.com/mobxjs/mobx-utils) package._ + +### `onReactionError` + +{🚀} Usage: `onReactionError(handler: (error: any, derivation) => void)` + +Attaches a global error listener, which is invoked for every error that is thrown from a _reaction_. This can be used for monitoring or test purposes. + +### `intercept` + +{🚀} Usage: `intercept(propertyName|array|object|Set|Map, listener)` +([further information](intercept-and-observe.md#intercept)) + +Intercepts changes before they are applied to an observable API. Returns a disposer function that stops the interception. + +### `observe` + +{🚀} Usage: `observe(propertyName|array|object|Set|Map, listener)` +([further information](intercept-and-observe.md#observe)) + +Low-level API that can be used to observe a single observable value. Returns a disposer function that stops the interception. + +### `onBecomeObserved` + +{🚀} Usage: `onBecomeObserved(observable, property?, listener: () => void)` +([further information](lazy-observables.md)) + +Hook for when something becomes observed. + +### `onBecomeUnobserved` + +{🚀} Usage: `onBecomeUnobserved(observable, property?, listener: () => void)` +([further information](lazy-observables.md)) + +Hook for when something stops being observed. + +### `toJS` + +Usage: `toJS(value)` +([further information](observable-state.md#converting-observables-back-to-vanilla-javascript-collections)) + +Recursively converts an observable object to a JavaScript _object_. Supports observable arrays, objects, Maps and primitives. + +It does NOT recurse into non-observables, these are left as they are, even if they contain observables. +Computed and other non-enumerable properties are completely ignored and won't be returned. + +For more complex (de)serialization scenarios, it is recommended to give classes a (computed) `toJSON` method, or use a serialization library like [serializr](https://github.com/mobxjs/serializr). + +```javascript +const obj = mobx.observable({ + x: 1 +}) + +const clone = mobx.toJS(obj) + +console.log(mobx.isObservableObject(obj)) // true +console.log(mobx.isObservableObject(clone)) // false +``` + +--- + +## Configuration + +_Fine-tuning your MobX instance._ + +### `configure` + +Usage: sets global behavior settings on the active MobX instance. +([further information](configuration.md)) +Use it to change how MobX behaves as a whole. + +--- + +## Collection utilities {🚀} + +_They enable manipulating observable arrays, objects and Maps with the same generic API. This can be useful in [environments without `Proxy` support](configuration.md#limitations-without-proxy-support), but is otherwise typically not needed._ + +### `values` + +{🚀} Usage: `values(array|object|Set|Map)` +([further information](collection-utilities.md)) + +Returns all values in the collection as an array. + +### `keys` + +{🚀} Usage: `keys(array|object|Set|Map)` +([further information](collection-utilities.md)) + +Returns all keys / indices in the collection as an array. + +### `entries` + +{🚀} Usage: `entries(array|object|Set|Map)` +([further information](collection-utilities.md)) + +Returns a `[key, value]` pair of every entry in the collection as an array. + +### `set` + +{🚀} Usage: `set(array|object|Map, key, value)` +([further information](collection-utilities.md)) + +Updates the collection. + +### `remove` + +{🚀} Usage: `remove(array|object|Map, key)` +([further information](collection-utilities.md)) + +Removes item from the collection. + +### `has` + +{🚀} Usage: `has(array|object|Map, key)` +([further information](collection-utilities.md)) + +Checks for membership in the collection. + +### `get` + +{🚀} Usage: `get(array|object|Map, key)` +([further information](collection-utilities.md)) + +Gets value from the collection with key. + +--- + +## Introspection utilities {🚀} + +_Utilities that might come in handy if you want to inspect the internal state of MobX, or want to build cool tools on top of MobX._ + +### `isObservable` + +{🚀} Usage: `isObservable(array|object|Set|Map)` + +Is the object / collection made observable by MobX? + +### `isObservableProp` + +{🚀} Usage: `isObservableProp(object, propertyName)` + +Is the property observable? + +### `isObservableArray` + +{🚀} Usage: `isObservableArray(array)` + +Is the value an observable array? + +### `isObservableObject` + +{🚀} Usage: `isObservableObject(object)` + +Is the value an observable object? + +### `isObservableSet` + +{🚀} Usage: `isObservableSet(set)` + +Is the value an observable Set? + +### `isObservableMap` + +{🚀} Usage: `isObservableMap(map)` + +Is the value an observable Map? + +### `isBoxedObservable` + +{🚀} Usage: `isBoxedObservable(value)` + +Is the value an observable box, created using `observable.box`? + +### `isAction` + +{🚀} Usage: `isAction(func)` + +Is the function marked as an `action`? + +### `isComputed` + +{🚀} Usage: `isComputed(boxedComputed)` + +Is this a boxed computed value, created using `computed(() => expr)`? + +### `isComputedProp` + +{🚀} Usage: `isComputedProp(object, propertyName)` + +Is this a computed property? + +### `trace` + +{🚀} Usage: `trace()`, `trace(true)` _(enter debugger)_ or `trace(object, propertyName, enterDebugger?)` +([further information](analyzing-reactivity.md)) + +Should be used inside an observer, reaction or computed value. Logs when the value is invalidated, or sets the debugger breakpoint if called with _true_. + +### `spy` + +{🚀} Usage: `spy(eventListener)` +([further information](analyzing-reactivity.md#spy)) + +Registers a global spy listener that listens to all events that happen in MobX. + +### `getDebugName` + +{🚀} Usage: `getDebugName(reaction|array|Set|Map)` or `getDebugName(object|Map, propertyName)` +([further information](analyzing-reactivity.md#getdebugname)) + +Returns the (generated) friendly debug name for an observable or reaction. + +### `getDependencyTree` + +{🚀} Usage: `getDependencyTree(object, computedPropertyName)` +([further information](analyzing-reactivity.md#getdependencytree)) + +Returns a tree structure with all observables the given reaction / computation currently depends upon. + +### `getObserverTree` + +{🚀} Usage: `getObserverTree(array|Set|Map)` or `getObserverTree(object|Map, propertyName)` +([further information](analyzing-reactivity.md#getobservertree)) + +Returns a tree structure with all reactions / computations that are observing the given observable. + +--- + +## Extending MobX {🚀} + +_In the rare case you want to extend MobX itself._ + +### `createAtom` + +{🚀} Usage: `createAtom(name, onBecomeObserved?, onBecomeUnobserved?)` +([further information](custom-observables.md)) + +Creates your own observable data structure and hooks it up to MobX. Used internally by all observable data types. Atom exposes two _report_ methods to notify MobX with when: + +- `reportObserved()`: the atom has become observed, and should be considered part of the dependency tree of the current derivation. +- `reportChanged()`: the atom has changed, and all derivations depending on it should be invalidated. + +### `getAtom` + +{🚀} Usage: `getAtom(thing, property?)` +([further information](analyzing-reactivity.md#getatom)) + +Returns the backing atom. + +### `transaction` + +{🚀} Usage: `transaction(worker: () => any)` + +_Transaction is a low-level API. It is recommended to use [`action`](#action) or [`runInAction`](#runinaction) instead._ + +Used to batch a bunch of updates without running any reactions until the end of the transaction. Like [`untracked`](#untracked), it is automatically applied by `action`, so usually it makes more sense to use actions than to use `transaction` directly. + +It takes a single, parameterless `worker` function as an argument, and returns any value that was returned by it. +Note that `transaction` runs completely synchronously and can be nested. Only after completing the outermost `transaction`, the pending reactions will be run. + +```javascript +import { observable, transaction, autorun } from "mobx" + +const numbers = observable([]) + +autorun(() => console.log(numbers.length, "numbers!")) +// Prints: '0 numbers!' + +transaction(() => { + transaction(() => { + numbers.push(1) + numbers.push(2) + }) + numbers.push(3) +}) +// Prints: '3 numbers!' +``` + +### `untracked` + +{🚀} Usage: `untracked(worker: () => any)` + +_Untracked is a low-level API. It is recommended to use [`reaction`](#reaction), [`action`](#action) or [`runInAction`](#runinaction) instead._ + +Runs a piece of code without establishing observers. Like `transaction`, `untracked` is automatically applied by `action`, so usually it makes more sense to use actions than to use `untracked` directly. + +```javascript +const person = observable({ + firstName: "Michel", + lastName: "Weststrate" +}) + +autorun(() => { + console.log( + person.lastName, + ",", + // This untracked block will return the person's + // firstName without establishing a dependency. + untracked(() => person.firstName) + ) +}) +// Prints: 'Weststrate, Michel' + +person.firstName = "G.K." +// Doesn't print! + +person.lastName = "Chesterton" +// Prints: 'Chesterton, G.K.' +``` diff --git a/docs/assets/action-state-view.excalidraw b/docs/assets/action-state-view.excalidraw new file mode 100644 index 0000000000..1fbfe2b17c --- /dev/null +++ b/docs/assets/action-state-view.excalidraw @@ -0,0 +1,414 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "id": "pIZO1JmQiFI2poIar1JJR", + "type": "rectangle", + "x": 1265.39453125, + "y": 506.8125, + "width": 169.73437500000006, + "height": 42.90625, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fab005", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 217429890, + "version": 373, + "versionNonce": 1117308162, + "isDeleted": false + }, + { + "id": "pD5v3-2w2hmmHs3ijydzw", + "type": "text", + "x": 1288.564453125, + "y": 513.876953125, + "width": 126, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 258359006, + "version": 335, + "versionNonce": 1677952030, + "isDeleted": false, + "text": "reduceEnergy", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 18 + }, + { + "id": "u7JpBImi1GLSlmI3XfhSo", + "type": "rectangle", + "x": 1016.30859375, + "y": 490.58984375, + "width": 96.56250000000003, + "height": 51.124999999999986, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#228be6", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 1302734018, + "version": 259, + "versionNonce": 1929172162, + "isDeleted": false + }, + { + "id": "BWk9D8NLVXhfJLVv98F7C", + "type": "text", + "x": 1026.07421875, + "y": 500.50390625, + "width": 76, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 1412671326, + "version": 121, + "versionNonce": 1736003678, + "isDeleted": false, + "text": "isHungry", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "top", + "baseline": 18 + }, + { + "id": "4-ymabCsXtPMIqHbdW8oE", + "type": "rectangle", + "x": 531.86328125, + "y": 477.41015625, + "width": 320.26171875000006, + "height": 119.37500000000001, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fa5252", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 500763422, + "version": 549, + "versionNonce": 1668755806, + "isDeleted": false + }, + { + "id": "LKVSistQFQl5dwvDIha03", + "type": "text", + "x": 548.16796875, + "y": 485.490234375, + "width": 74, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 275201474, + "version": 248, + "versionNonce": 399874946, + "isDeleted": false, + "text": "autorun", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 18 + }, + { + "id": "AmfUhwRl3kmfUpDL-cz69", + "type": "arrow", + "x": 893.578125, + "y": 542.67578125, + "width": 103.203125, + "height": 26.18359375, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fa5252", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 14401054, + "version": 98, + "versionNonce": 1922705986, + "isDeleted": false, + "points": [ + [ + 0, + 0 + ], + [ + 103.203125, + -26.18359375 + ] + ], + "lastCommittedPoint": null + }, + { + "id": "5Ri4oSpXCOayASosdJczV", + "type": "rectangle", + "x": 643.65625, + "y": 500.65234375, + "width": 181.6875, + "height": 77.12109375, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 958282526, + "version": 72, + "versionNonce": 1344405954, + "isDeleted": false + }, + { + "id": "4VRPEmGVy-I7ISGPIC3lG", + "type": "text", + "x": 697, + "y": 526.712890625, + "width": 75, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 132157534, + "version": 17, + "versionNonce": 1011446622, + "isDeleted": false, + "text": "function", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 18 + }, + { + "id": "FQzAKSjfUWyDZAjvXVOY5", + "type": "text", + "x": 537.37890625, + "y": 429.46484375, + "width": 217, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 1833437214, + "version": 104, + "versionNonce": 499153282, + "isDeleted": false, + "text": "1. autorun runs initially", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 18 + }, + { + "id": "DaIFjPSHk2uPQUxrBhM14", + "type": "text", + "x": 897.24609375, + "y": 434.5, + "width": 197, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 1406985630, + "version": 127, + "versionNonce": 2009028510, + "isDeleted": false, + "text": "2. read & subscribe", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 18 + }, + { + "id": "gdEVREQf-CI_WiOGb0k0p", + "type": "arrow", + "x": 1248.12109375, + "y": 535.2734375, + "width": 117.19921875, + "height": 10.93359375, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 419114910, + "version": 39, + "versionNonce": 1265546206, + "isDeleted": false, + "points": [ + [ + 0, + 0 + ], + [ + -117.19921875, + -10.93359375 + ] + ], + "lastCommittedPoint": null + }, + { + "id": "2L7qtsz980qi281apFm68", + "type": "text", + "x": 1170.65625, + "y": 565.06640625, + "width": 161, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 942371998, + "version": 36, + "versionNonce": 1861058818, + "isDeleted": false, + "text": "3. update state", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 18 + }, + { + "id": "W81Z7ZPQ_NNZj_IpAcRgP", + "type": "arrow", + "x": 1055.921875, + "y": 563.03125, + "width": 283.78515625, + "height": 130.73046875, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 93774430, + "version": 90, + "versionNonce": 1080000386, + "isDeleted": false, + "points": [ + [ + 0, + 0 + ], + [ + -169.859375, + 130.73046875 + ], + [ + -283.78515625, + 56.4453125 + ] + ], + "lastCommittedPoint": [ + -283.78515625, + 56.4453125 + ] + }, + { + "id": "7PSGJMcV7z4iygXHJNS_o", + "type": "text", + "x": 966.2265625, + "y": 676.7265625, + "width": 276, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fff", + "fillStyle": "solid", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "seed": 775974494, + "version": 50, + "versionNonce": 1448293598, + "isDeleted": false, + "text": "4. notify and re-run autorun", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 18 + } + ], + "appState": { + "viewBackgroundColor": "#ffffff", + "gridSize": null + } +} \ No newline at end of file diff --git a/docs/assets/action-state-view.png b/docs/assets/action-state-view.png new file mode 100644 index 0000000000..6238041a13 Binary files /dev/null and b/docs/assets/action-state-view.png differ diff --git a/docs/algolia.jpg b/docs/assets/algolia.jpg similarity index 100% rename from docs/algolia.jpg rename to docs/assets/algolia.jpg diff --git a/docs/assets/auctionfrontier.jpeg b/docs/assets/auctionfrontier.jpeg new file mode 100644 index 0000000000..236e77505c Binary files /dev/null and b/docs/assets/auctionfrontier.jpeg differ diff --git a/docs/assets/autorun.png b/docs/assets/autorun.png new file mode 100644 index 0000000000..8495112df9 Binary files /dev/null and b/docs/assets/autorun.png differ diff --git a/docs/assets/blokt.jpg b/docs/assets/blokt.jpg new file mode 100644 index 0000000000..cd61d242c8 Binary files /dev/null and b/docs/assets/blokt.jpg differ diff --git a/docs/book.jpg b/docs/assets/book.jpg similarity index 100% rename from docs/book.jpg rename to docs/assets/book.jpg diff --git a/docs/assets/bugsnag.jpg b/docs/assets/bugsnag.jpg new file mode 100644 index 0000000000..13ce42b758 Binary files /dev/null and b/docs/assets/bugsnag.jpg differ diff --git a/docs/assets/canva.svg b/docs/assets/canva.svg new file mode 100644 index 0000000000..e85e0694c6 --- /dev/null +++ b/docs/assets/canva.svg @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/casino.png b/docs/assets/casino.png new file mode 100644 index 0000000000..70424a4cfb Binary files /dev/null and b/docs/assets/casino.png differ diff --git a/docs/assets/casino2.png b/docs/assets/casino2.png new file mode 100644 index 0000000000..8e0bc78c0e Binary files /dev/null and b/docs/assets/casino2.png differ diff --git a/docs/assets/codefirst.png b/docs/assets/codefirst.png new file mode 100644 index 0000000000..0d8561af61 Binary files /dev/null and b/docs/assets/codefirst.png differ diff --git a/docs/coinbase.jpeg b/docs/assets/coinbase.jpeg similarity index 100% rename from docs/coinbase.jpeg rename to docs/assets/coinbase.jpeg diff --git a/docs/assets/computed-example.png b/docs/assets/computed-example.png new file mode 100644 index 0000000000..03cdbde48e Binary files /dev/null and b/docs/assets/computed-example.png differ diff --git a/docs/assets/concept.png b/docs/assets/concept.png new file mode 100644 index 0000000000..cd6894448c Binary files /dev/null and b/docs/assets/concept.png differ diff --git a/docs/assets/curology.png b/docs/assets/curology.png new file mode 100644 index 0000000000..8662080c5e Binary files /dev/null and b/docs/assets/curology.png differ diff --git a/docs/assets/dazn.png b/docs/assets/dazn.png new file mode 100644 index 0000000000..e58f1e19a4 Binary files /dev/null and b/docs/assets/dazn.png differ diff --git a/docs/assets/dcsl.png b/docs/assets/dcsl.png new file mode 100644 index 0000000000..a6ce1522cc Binary files /dev/null and b/docs/assets/dcsl.png differ diff --git a/docs/assets/devtools-noDisplayName.png b/docs/assets/devtools-noDisplayName.png new file mode 100644 index 0000000000..417316a029 Binary files /dev/null and b/docs/assets/devtools-noDisplayName.png differ diff --git a/docs/assets/devtools-withDisplayName.png b/docs/assets/devtools-withDisplayName.png new file mode 100644 index 0000000000..98434dcfbd Binary files /dev/null and b/docs/assets/devtools-withDisplayName.png differ diff --git a/docs/assets/devtools.gif b/docs/assets/devtools.gif new file mode 100644 index 0000000000..cf49646f37 Binary files /dev/null and b/docs/assets/devtools.gif differ diff --git a/docs/assets/easeus.png b/docs/assets/easeus.png new file mode 100644 index 0000000000..b72b7220b4 Binary files /dev/null and b/docs/assets/easeus.png differ diff --git a/docs/assets/faire.jpg b/docs/assets/faire.jpg new file mode 100644 index 0000000000..45af35aca7 Binary files /dev/null and b/docs/assets/faire.jpg differ diff --git a/docs/assets/favicon.png b/docs/assets/favicon.png new file mode 100644 index 0000000000..63da62bc9c Binary files /dev/null and b/docs/assets/favicon.png differ diff --git a/docs/fbos.jpeg b/docs/assets/fbos.jpeg similarity index 100% rename from docs/fbos.jpeg rename to docs/assets/fbos.jpeg diff --git a/docs/assets/flow.excalidraw..excalidraw..excalidraw b/docs/assets/flow.excalidraw..excalidraw..excalidraw new file mode 100644 index 0000000000..09244e39e3 --- /dev/null +++ b/docs/assets/flow.excalidraw..excalidraw..excalidraw @@ -0,0 +1,606 @@ +{ + "type": "excalidraw", + "version": 2, + "source": "https://excalidraw.com", + "elements": [ + { + "id": "umJvYNbrYyosAii0TCe8X", + "type": "ellipse", + "x": 600.93359375, + "y": 295.0234375, + "width": 166, + "height": 98.13671875, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fd7e14", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 798279679, + "version": 61, + "versionNonce": 534261841, + "isDeleted": false, + "boundElementIds": [ + "SQTF1dyrT_6IGmfEPfDFk", + "Qs4t0BM0S_4Pke8rNKbmD", + "c9iGYLrlWNl56Bq2qFVR3" + ] + }, + { + "id": "tMxgXvq5-KCTnP_iTfUt8", + "type": "text", + "x": 648.93359375, + "y": 331.826171875, + "width": 70, + "height": 25, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1329095185, + "version": 11, + "versionNonce": 637794161, + "isDeleted": false, + "boundElementIds": null, + "text": "Actions", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 18 + }, + { + "id": "fESH7TjYaPiRAXCLgu6gj", + "type": "ellipse", + "x": 889.2734375, + "y": 293.07421875, + "width": 153.390625, + "height": 97.08984375, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#228be6", + "fillStyle": "cross-hatch", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 754120735, + "version": 162, + "versionNonce": 277796639, + "isDeleted": false, + "boundElementIds": [ + "SQTF1dyrT_6IGmfEPfDFk", + "Gfe2kVUk-oe4nZFYZ4TS2" + ] + }, + { + "id": "YNybqj5LHUYEaaw-npqM0", + "type": "text", + "x": 913.22265625, + "y": 316.373046875, + "width": 105, + "height": 50, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1139926705, + "version": 92, + "versionNonce": 806532223, + "isDeleted": false, + "boundElementIds": null, + "text": "Observable\nState", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 43 + }, + { + "id": "Rp_m5EtBqLK880zk0HPes", + "type": "ellipse", + "x": 1168.73046875, + "y": 287.671875, + "width": 152.62109375, + "height": 101.0078125, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#82c91e", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 979115551, + "version": 137, + "versionNonce": 842295903, + "isDeleted": false, + "boundElementIds": [ + "Gfe2kVUk-oe4nZFYZ4TS2", + "muBFJlzUT62Z5u6vtgoPo" + ] + }, + { + "id": "bUQmcBczRpetKGA2QAQOC", + "type": "text", + "x": 1198.294921875, + "y": 313.17578125, + "width": 93, + "height": 50, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 21397215, + "version": 89, + "versionNonce": 275028479, + "isDeleted": false, + "boundElementIds": null, + "text": "Computed\nValues", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 43 + }, + { + "id": "2iAmN0ThUq3khqXmobwXR", + "type": "ellipse", + "x": 1440.24609375, + "y": 280.24609375, + "width": 180, + "height": 97.82421875, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "#fa5252", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 155797873, + "version": 93, + "versionNonce": 1218509617, + "isDeleted": false, + "boundElementIds": [ + "muBFJlzUT62Z5u6vtgoPo", + "YsOB3_rayI5zJZmc-0vka", + "MwGF75DmHeJQFvsbtXTC3", + "c9iGYLrlWNl56Bq2qFVR3" + ] + }, + { + "id": "-ksRGDFon1_cAw4yzn-NY", + "type": "text", + "x": 1468.4375, + "y": 303.76953125, + "width": 122, + "height": 50, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 919383807, + "version": 107, + "versionNonce": 1840129151, + "isDeleted": false, + "boundElementIds": null, + "text": "Side-effects\n(like render)", + "fontSize": 20, + "fontFamily": 1, + "textAlign": "center", + "verticalAlign": "middle", + "baseline": 43 + }, + { + "id": "SQTF1dyrT_6IGmfEPfDFk", + "type": "arrow", + "x": 778.8445740250362, + "y": 346.239580272118, + "width": 99.00070983588682, + "height": 1.6378151789648427, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1143683505, + "version": 44, + "versionNonce": 965939217, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 99.00070983588682, + -1.6378151789648427 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "umJvYNbrYyosAii0TCe8X", + "focus": 0.07806863034707597, + "gap": 11.969792579631289 + }, + "endBinding": { + "elementId": "fESH7TjYaPiRAXCLgu6gj", + "focus": -0.031398466371432183, + "gap": 11.536940281179355 + } + }, + { + "id": "Gfe2kVUk-oe4nZFYZ4TS2", + "type": "arrow", + "x": 1053.9983652852434, + "y": 343.1772085606117, + "width": 106.42230116522956, + "height": 0.10172927196111914, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1805338897, + "version": 44, + "versionNonce": 468837745, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 106.42230116522956, + -0.10172927196111914 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "fESH7TjYaPiRAXCLgu6gj", + "focus": 0.034035946947105086, + "gap": 11.364088475962532 + }, + "endBinding": { + "elementId": "Rp_m5EtBqLK880zk0HPes", + "focus": -0.09541448620171078, + "gap": 8.602060160628056 + } + }, + { + "id": "muBFJlzUT62Z5u6vtgoPo", + "type": "arrow", + "x": 1341.157078677608, + "y": 339.7422181379586, + "width": 88.60855868842668, + "height": 2.6091895262144362, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1832057969, + "version": 128, + "versionNonce": 1342081055, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 88.60855868842668, + -2.6091895262144362 + ] + ], + "lastCommittedPoint": null, + "startBinding": { + "elementId": "Rp_m5EtBqLK880zk0HPes", + "gap": 19.82936306898931, + "focus": 0.08945444862904846 + }, + "endBinding": { + "elementId": "2iAmN0ThUq3khqXmobwXR", + "gap": 11.37138636336131, + "focus": -0.1024021768851719 + } + }, + { + "id": "Qs4t0BM0S_4Pke8rNKbmD", + "type": "arrow", + "x": 492.0234375, + "y": 350.046875, + "width": 95.43387310642322, + "height": 0.9643864370914343, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "round", + "seed": 234060401, + "version": 68, + "versionNonce": 297558161, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + 95.43387310642322, + -0.9643864370914343 + ] + ], + "lastCommittedPoint": null, + "startBinding": null, + "endBinding": { + "elementId": "umJvYNbrYyosAii0TCe8X", + "focus": -0.08182839036919108, + "gap": 13.781886293370846 + } + }, + { + "id": "c9iGYLrlWNl56Bq2qFVR3", + "type": "arrow", + "x": 1521.4329053171455, + "y": 397.76984274454924, + "width": 847.5934093483568, + "height": 71.62078225545076, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "round", + "seed": 1408772703, + "version": 339, + "versionNonce": 455396689, + "isDeleted": false, + "boundElementIds": null, + "points": [ + [ + 0, + 0 + ], + [ + -85.06181156714547, + 61.46453225545076 + ], + [ + -770.2180615671455, + 71.62078225545076 + ], + [ + -847.5934093483568, + 15.194066486107488 + ] + ], + "lastCommittedPoint": [ + -834.17578125, + 10.3515625 + ], + "startBinding": { + "elementId": "2iAmN0ThUq3khqXmobwXR", + "gap": 19.92113118460233, + "focus": -0.7649085384743577 + }, + "endBinding": { + "elementId": "umJvYNbrYyosAii0TCe8X", + "focus": 0.9783632894951878, + "gap": 20.136000442647486 + } + }, + { + "id": "eGPmufgc-vKMKmqf5K70-", + "type": "text", + "x": 499.75, + "y": 299.75, + "width": 59, + "height": 24, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1637190321, + "version": 57, + "versionNonce": 722379505, + "isDeleted": false, + "boundElementIds": null, + "text": "event", + "fontSize": 20, + "fontFamily": 3, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 19 + }, + { + "id": "vynyr8w8fVE7OJXHAE365", + "type": "text", + "x": 780, + "y": 300, + "width": 70, + "height": 24, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1893934897, + "version": 361, + "versionNonce": 1504841009, + "isDeleted": false, + "boundElementIds": null, + "text": "update", + "fontSize": 20, + "fontFamily": 3, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 19 + }, + { + "id": "4svZvrPyD8SmDlCrAqiub", + "type": "text", + "x": 1060, + "y": 300, + "width": 70, + "height": 24, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1281306641, + "version": 14, + "versionNonce": 881014001, + "isDeleted": false, + "boundElementIds": null, + "text": "notify", + "fontSize": 20, + "fontFamily": 3, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 19 + }, + { + "id": "9SF49CHx9H587dg3XyxK3", + "type": "text", + "x": 1340, + "y": 300, + "width": 82, + "height": 24, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1159088735, + "version": 18, + "versionNonce": 1065184433, + "isDeleted": false, + "boundElementIds": null, + "text": "trigger", + "fontSize": 20, + "fontFamily": 3, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 19 + }, + { + "id": "Qw_akk4TX_QbVkg5X1aKS", + "type": "text", + "x": 1078.23046875, + "y": 484.29296875, + "width": 59, + "height": 24, + "angle": 0, + "strokeColor": "#000000", + "backgroundColor": "transparent", + "fillStyle": "hachure", + "strokeWidth": 1, + "strokeStyle": "solid", + "roughness": 1, + "opacity": 100, + "groupIds": [], + "strokeSharpness": "sharp", + "seed": 1289093279, + "version": 95, + "versionNonce": 313892977, + "isDeleted": false, + "boundElementIds": null, + "text": "event", + "fontSize": 20, + "fontFamily": 3, + "textAlign": "left", + "verticalAlign": "top", + "baseline": 19 + } + ], + "appState": { + "viewBackgroundColor": "#ffffff", + "gridSize": null + } +} \ No newline at end of file diff --git a/docs/flow.png b/docs/assets/flow.png similarity index 100% rename from docs/flow.png rename to docs/assets/flow.png diff --git a/docs/assets/flow2.png b/docs/assets/flow2.png new file mode 100644 index 0000000000..91201b77fd Binary files /dev/null and b/docs/assets/flow2.png differ diff --git a/docs/assets/frontendmasters.jpg b/docs/assets/frontendmasters.jpg new file mode 100644 index 0000000000..613ce309ae Binary files /dev/null and b/docs/assets/frontendmasters.jpg differ diff --git a/docs/assets/getting-started-assets/babel.min.js b/docs/assets/getting-started-assets/babel.min.js new file mode 100755 index 0000000000..855e76f62a --- /dev/null +++ b/docs/assets/getting-started-assets/babel.min.js @@ -0,0 +1,47065 @@ +!(function(e, t) { + "object" == typeof exports && "object" == typeof module + ? (module.exports = t()) + : "function" == typeof define && define.amd + ? define([], t) + : "object" == typeof exports + ? (exports.Babel = t()) + : (e.Babel = t()) +})(this, function() { + return (function(e) { + function t(n) { + if (r[n]) return r[n].exports + var i = (r[n] = { exports: {}, id: n, loaded: !1 }) + return e[n].call(i.exports, i, i.exports, t), (i.loaded = !0), i.exports + } + var r = {} + return (t.m = e), (t.c = r), (t.p = ""), t(0) + })( + (function(e) { + for (var t in e) + if (Object.prototype.hasOwnProperty.call(e, t)) + switch (typeof e[t]) { + case "function": + break + case "object": + e[t] = (function(t) { + var r = t.slice(1), + n = e[t[0]] + return function(e, t, i) { + n.apply(this, [e, t, i].concat(r)) + } + })(e[t]) + break + default: + e[t] = e[e[t]] + } + return e + })([ + function(e, t, r) { + "use strict" + function n(e) { + if (e && e.__esModule) return e + var t = {} + if (null != e) + for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]) + return (t["default"] = e), t + } + function i(e) { + var t = (e.presets || []).map(function(e) { + if ("string" == typeof e) { + var t = p[e] + if (!t) + throw new Error( + 'Invalid preset specified in Babel options: "' + e + '"' + ) + return t + } + return e + }), + r = (e.plugins || []).map(function(e) { + if ("string" == typeof e) { + var t = c[e] + if (!t) + throw new Error( + 'Invalid plugin specified in Babel options: "' + e + '"' + ) + return t + } + return e + }) + return o({}, e, { presets: t, plugins: r }) + } + function s(e, t) { + return l.transform(e, i(t)) + } + function a(e, t, r) { + return l.transformFromAst(t, i(r)) + } + Object.defineProperty(t, "__esModule", { value: !0 }), + (t.version = t.availablePresets = t.availablePlugins = void 0) + var o = + Object.assign || + function(e) { + for (var t = 1; t < arguments.length; t++) { + var r = arguments[t] + for (var n in r) + Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]) + } + return e + } + ;(t.transform = s), (t.transformFromAst = a) + var u = r(2503), + l = n(u), + c = (t.availablePlugins = { + "check-es2015-constants": r(566), + "external-helpers-2": r(2715), + "syntax-async-functions": r(567), + "syntax-async-generators": r(2716), + "syntax-class-constructor-call": r(1426), + "syntax-class-properties": r(1427), + "syntax-decorators": r(1428), + "syntax-do-expressions": r(1429), + "syntax-exponentiation-operator": r(1430), + "syntax-export-extensions": r(1431), + "syntax-flow": r(822), + "syntax-function-bind": r(1432), + "syntax-jsx": r(823), + "syntax-object-rest-spread": r(1433), + "syntax-trailing-function-commas": r(1434), + "transform-async-functions": r(2717), + "transform-async-to-generator": r(1435), + "transform-async-to-module-method": r(2935), + "transform-class-constructor-call": r(1539), + "transform-class-properties": r(1577), + "transform-decorators": r(1621), + "transform-decorators-legacy": r(3373)["default"], + "transform-do-expressions": r(1672), + "transform-es2015-arrow-functions": r(616), + "transform-es2015-block-scoped-functions": r(617), + "transform-es2015-block-scoping": r(618), + "transform-es2015-classes": r(628), + "transform-es2015-computed-properties": r(640), + "transform-es2015-destructuring": r(643), + "transform-es2015-for-of": r(644), + "transform-es2015-function-name": r(645), + "transform-es2015-instanceof": r(4439), + "transform-es2015-literals": r(657), + "transform-es2015-modules-amd": r(1818), + "transform-es2015-modules-commonjs": r(1053), + "transform-es2015-modules-systemjs": r(4820), + "transform-es2015-modules-umd": r(5077), + "transform-es2015-object-super": r(694), + "transform-es2015-parameters": r(705), + "transform-es2015-shorthand-properties": r(715), + "transform-es2015-spread": r(722), + "transform-es2015-sticky-regex": r(723), + "transform-es2015-template-literals": r(730), + "transform-es2015-typeof-symbol": r(731), + "transform-es2015-unicode-regex": r(733), + "transform-es3-member-expression-literals": r(6110), + "transform-es3-property-literals": r(6111), + "transform-es5-property-mutators": r(6112), + "transform-eval": r(6306), + "transform-exponentiation-operator": r(2261), + "transform-export-extensions": r(2300), + "transform-flow-strip-types": r(2301), + "transform-function-bind": r(2302), + "transform-inline-environment-variables": r(6459), + "transform-jscript": r(6460), + "transform-member-expression-literals": r(6461), + "transform-merge-sibling-variables": r(6462), + "transform-minify-booleans": r(6463), + "transform-node-env-inline": r(6464), + "transform-object-assign": r(6465), + "transform-object-rest-spread": r(2303), + "transform-object-set-prototype-of-to-assign": r(6466), + "transform-property-literals": r(6467), + "transform-proto-to-assign": r(6468), + "transform-react-constant-elements": r(6473), + "transform-react-display-name": r(2304), + "transform-react-inline-elements": r(6475), + "transform-react-jsx": r(2342), + "transform-react-jsx-compat": r(6476), + "transform-react-jsx-source": r(6628), + "transform-regenerator": r(767), + "transform-remove-console": r(6964), + "transform-remove-debugger": r(6965), + "transform-runtime": r(6967), + "transform-simplify-comparison-operators": r(6969), + "transform-strict-mode": r(1328), + "transform-undefined-to-void": r(7120), + "undeclared-variables-check": r(7121) + }), + p = (t.availablePresets = { + es2015: r(7124), + react: r(7276), + "stage-0": r(7277), + "stage-1": r(2499), + "stage-2": r(2500), + "stage-3": r(2501), + "es2015-no-commonjs": { + plugins: [ + r(730), + r(657), + r(645), + r(616), + r(617), + r(628), + r(694), + r(715), + r(640), + r(644), + r(723), + r(733), + r(566), + r(722), + r(705), + r(643), + r(618), + r(731), + [r(767), { async: !1, asyncGenerators: !1 }] + ] + }, + "es2015-loose": { + plugins: [ + [r(730), { loose: !0 }], + r(657), + r(645), + r(616), + r(617), + [r(628), { loose: !0 }], + r(694), + r(715), + [r(640), { loose: !0 }], + [r(644), { loose: !0 }], + r(723), + r(733), + r(566), + [r(722), { loose: !0 }], + r(705), + [r(643), { loose: !0 }], + r(618), + r(731), + [r(767), { async: !1, asyncGenerators: !1 }] + ] + } + }) + t.version = l.version + }, + function(e, t) { + function r() { + ;(l = !1), a.length ? (u = a.concat(u)) : (c = -1), u.length && n() + } + function n() { + if (!l) { + var e = setTimeout(r) + l = !0 + for (var t = u.length; t; ) { + for (a = u, u = []; ++c < t; ) a && a[c].run() + ;(c = -1), (t = u.length) + } + ;(a = null), (l = !1), clearTimeout(e) + } + } + function i(e, t) { + ;(this.fun = e), (this.array = t) + } + function s() {} + var a, + o = (e.exports = {}), + u = [], + l = !1, + c = -1 + ;(o.nextTick = function(e) { + var t = new Array(arguments.length - 1) + if (arguments.length > 1) + for (var r = 1; r < arguments.length; r++) t[r - 1] = arguments[r] + u.push(new i(e, t)), 1 !== u.length || l || setTimeout(n, 0) + }), + (i.prototype.run = function() { + this.fun.apply(null, this.array) + }), + (o.title = "browser"), + (o.browser = !0), + (o.env = {}), + (o.argv = []), + (o.version = ""), + (o.versions = {}), + (o.on = s), + (o.addListener = s), + (o.once = s), + (o.off = s), + (o.removeListener = s), + (o.removeAllListeners = s), + (o.emit = s), + (o.binding = function(e) { + throw new Error("process.binding is not supported") + }), + (o.cwd = function() { + return "/" + }), + (o.chdir = function(e) { + throw new Error("process.chdir is not supported") + }), + (o.umask = function() { + return 0 + }) + }, + function(e, t) { + "use strict" + ;(t["default"] = function(e) { + if (e && e.__esModule) return e + var t = {} + if (null != e) + for (var r in e) Object.prototype.hasOwnProperty.call(e, r) && (t[r] = e[r]) + return (t["default"] = e), t + }), + (t.__esModule = !0) + }, + 2, + 2, + function(e, t) { + "use strict" + ;(t["default"] = function(e) { + return e && e.__esModule ? e : { default: e } + }), + (t.__esModule = !0) + }, + 2, + 2, + 2, + 2, + 5, + [ + 7427, + 481, + 85, + 17, + 6, + 3049, + 3050, + 3193, + 3140, + 1534, + 3143, + 3142, + 3091, + 187, + 3095, + 870, + 1513, + 3096, + 3086, + 3094 + ], + [ + 7427, + 537, + 92, + 20, + 4, + 6270, + 6271, + 6216, + 6217, + 1241, + 2233, + 6218, + 6167, + 273, + 6171, + 1233, + 2223, + 6172, + 6162, + 6170 + ], + [ + 7427, + 491, + 83, + 18, + 7, + 3534, + 3535, + 3756, + 3703, + 1667, + 3706, + 3705, + 3654, + 203, + 3658, + 940, + 1646, + 3659, + 3649, + 3657 + ], + [ + 7427, + 507, + 88, + 19, + 8, + 4295, + 4296, + 4438, + 4385, + 1813, + 4388, + 4387, + 4336, + 218, + 4340, + 1023, + 1792, + 4341, + 4331, + 4339 + ], + [ + 7427, + 414, + 84, + 21, + 9, + 4597, + 4598, + 4819, + 4766, + 1900, + 4769, + 4768, + 4717, + 228, + 4721, + 1072, + 1879, + 4722, + 4712, + 4720 + ], + [ + 7427, + 462, + 146, + 5, + 3, + 2566, + 2567, + 2644, + 2650, + 564, + 811, + 2651, + 2635, + 179, + 2639, + 809, + 1394, + 2640, + 2630, + 2638 + ], + 5, + 5, + 5, + 5, + 5, + function(e, t, r) { + ;(function(e, n) { + function i(e, r) { + var n = { seen: [], stylize: a } + return ( + arguments.length >= 3 && (n.depth = arguments[2]), + arguments.length >= 4 && (n.colors = arguments[3]), + m(r) ? (n.showHidden = r) : r && t._extend(n, r), + x(n.showHidden) && (n.showHidden = !1), + x(n.depth) && (n.depth = 2), + x(n.colors) && (n.colors = !1), + x(n.customInspect) && (n.customInspect = !0), + n.colors && (n.stylize = s), + u(n, e, n.depth) + ) + } + function s(e, t) { + var r = i.styles[t] + return r ? "[" + i.colors[r][0] + "m" + e + "[" + i.colors[r][1] + "m" : e + } + function a(e, t) { + return e + } + function o(e) { + var t = {} + return ( + e.forEach(function(e, r) { + t[e] = !0 + }), + t + ) + } + function u(e, r, n) { + if ( + e.customInspect && + r && + F(r.inspect) && + r.inspect !== t.inspect && + (!r.constructor || r.constructor.prototype !== r) + ) { + var i = r.inspect(n, e) + return E(i) || (i = u(e, i, n)), i + } + var s = l(e, r) + if (s) return s + var a = Object.keys(r), + m = o(a) + if ( + (e.showHidden && (a = Object.getOwnPropertyNames(r)), + S(r) && (a.indexOf("message") >= 0 || a.indexOf("description") >= 0)) + ) + return c(r) + if (0 === a.length) { + if (F(r)) { + var y = r.name ? ": " + r.name : "" + return e.stylize("[Function" + y + "]", "special") + } + if (A(r)) return e.stylize(RegExp.prototype.toString.call(r), "regexp") + if (C(r)) return e.stylize(Date.prototype.toString.call(r), "date") + if (S(r)) return c(r) + } + var v = "", + g = !1, + b = ["{", "}"] + if ((d(r) && ((g = !0), (b = ["[", "]"])), F(r))) { + var x = r.name ? ": " + r.name : "" + v = " [Function" + x + "]" + } + if ( + (A(r) && (v = " " + RegExp.prototype.toString.call(r)), + C(r) && (v = " " + Date.prototype.toUTCString.call(r)), + S(r) && (v = " " + c(r)), + 0 === a.length && (!g || 0 == r.length)) + ) + return b[0] + v + b[1] + if (0 > n) + return A(r) + ? e.stylize(RegExp.prototype.toString.call(r), "regexp") + : e.stylize("[Object]", "special") + e.seen.push(r) + var D + return ( + (D = g + ? p(e, r, n, m, a) + : a.map(function(t) { + return f(e, r, n, m, t, g) + })), + e.seen.pop(), + h(D, v, b) + ) + } + function l(e, t) { + if (x(t)) return e.stylize("undefined", "undefined") + if (E(t)) { + var r = + "'" + + JSON.stringify(t) + .replace(/^"|"$/g, "") + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + + "'" + return e.stylize(r, "string") + } + return g(t) + ? e.stylize("" + t, "number") + : m(t) + ? e.stylize("" + t, "boolean") + : y(t) + ? e.stylize("null", "null") + : void 0 + } + function c(e) { + return "[" + Error.prototype.toString.call(e) + "]" + } + function p(e, t, r, n, i) { + for (var s = [], a = 0, o = t.length; o > a; ++a) + B(t, String(a)) ? s.push(f(e, t, r, n, String(a), !0)) : s.push("") + return ( + i.forEach(function(i) { + i.match(/^\d+$/) || s.push(f(e, t, r, n, i, !0)) + }), + s + ) + } + function f(e, t, r, n, i, s) { + var a, o, l + if ( + ((l = Object.getOwnPropertyDescriptor(t, i) || { value: t[i] }), + l.get + ? (o = l.set + ? e.stylize("[Getter/Setter]", "special") + : e.stylize("[Getter]", "special")) + : l.set && (o = e.stylize("[Setter]", "special")), + B(n, i) || (a = "[" + i + "]"), + o || + (e.seen.indexOf(l.value) < 0 + ? ((o = y(r) ? u(e, l.value, null) : u(e, l.value, r - 1)), + o.indexOf("\n") > -1 && + (o = s + ? o + .split("\n") + .map(function(e) { + return " " + e + }) + .join("\n") + .substr(2) + : "\n" + + o + .split("\n") + .map(function(e) { + return " " + e + }) + .join("\n"))) + : (o = e.stylize("[Circular]", "special"))), + x(a)) + ) { + if (s && i.match(/^\d+$/)) return o + ;(a = JSON.stringify("" + i)), + a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) + ? ((a = a.substr(1, a.length - 2)), (a = e.stylize(a, "name"))) + : ((a = a + .replace(/'/g, "\\'") + .replace(/\\"/g, '"') + .replace(/(^"|"$)/g, "'")), + (a = e.stylize(a, "string"))) + } + return a + ": " + o + } + function h(e, t, r) { + var n = 0, + i = e.reduce(function(e, t) { + return ( + n++, + t.indexOf("\n") >= 0 && n++, + e + t.replace(/\u001b\[\d\d?m/g, "").length + 1 + ) + }, 0) + return i > 60 + ? r[0] + + ("" === t ? "" : t + "\n ") + + " " + + e.join(",\n ") + + " " + + r[1] + : r[0] + t + " " + e.join(", ") + " " + r[1] + } + function d(e) { + return Array.isArray(e) + } + function m(e) { + return "boolean" == typeof e + } + function y(e) { + return null === e + } + function v(e) { + return null == e + } + function g(e) { + return "number" == typeof e + } + function E(e) { + return "string" == typeof e + } + function b(e) { + return "symbol" == typeof e + } + function x(e) { + return void 0 === e + } + function A(e) { + return D(e) && "[object RegExp]" === _(e) + } + function D(e) { + return "object" == typeof e && null !== e + } + function C(e) { + return D(e) && "[object Date]" === _(e) + } + function S(e) { + return D(e) && ("[object Error]" === _(e) || e instanceof Error) + } + function F(e) { + return "function" == typeof e + } + function w(e) { + return ( + null === e || + "boolean" == typeof e || + "number" == typeof e || + "string" == typeof e || + "symbol" == typeof e || + "undefined" == typeof e + ) + } + function _(e) { + return Object.prototype.toString.call(e) + } + function T(e) { + return 10 > e ? "0" + e.toString(10) : e.toString(10) + } + function P() { + var e = new Date(), + t = [T(e.getHours()), T(e.getMinutes()), T(e.getSeconds())].join(":") + return [e.getDate(), M[e.getMonth()], t].join(" ") + } + function B(e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + } + var k = /%[sdj%]/g + ;(t.format = function(e) { + if (!E(e)) { + for (var t = [], r = 0; r < arguments.length; r++) + t.push(i(arguments[r])) + return t.join(" ") + } + for ( + var r = 1, + n = arguments, + s = n.length, + a = String(e).replace(k, function(e) { + if ("%%" === e) return "%" + if (r >= s) return e + switch (e) { + case "%s": + return String(n[r++]) + case "%d": + return Number(n[r++]) + case "%j": + try { + return JSON.stringify(n[r++]) + } catch (t) { + return "[Circular]" + } + default: + return e + } + }), + o = n[r]; + s > r; + o = n[++r] + ) + a += y(o) || !D(o) ? " " + o : " " + i(o) + return a + }), + (t.deprecate = function(r, i) { + function s() { + if (!a) { + if (n.throwDeprecation) throw new Error(i) + n.traceDeprecation ? console.trace(i) : console.error(i), + (a = !0) + } + return r.apply(this, arguments) + } + if (x(e.process)) + return function() { + return t.deprecate(r, i).apply(this, arguments) + } + if (n.noDeprecation === !0) return r + var a = !1 + return s + }) + var I, + O = {} + ;(t.debuglog = function(e) { + if ((x(I) && (I = n.env.NODE_DEBUG || ""), (e = e.toUpperCase()), !O[e])) + if (new RegExp("\\b" + e + "\\b", "i").test(I)) { + var r = n.pid + O[e] = function() { + var n = t.format.apply(t, arguments) + console.error("%s %d: %s", e, r, n) + } + } else O[e] = function() {} + return O[e] + }), + (t.inspect = i), + (i.colors = { + bold: [1, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + white: [37, 39], + grey: [90, 39], + black: [30, 39], + blue: [34, 39], + cyan: [36, 39], + green: [32, 39], + magenta: [35, 39], + red: [31, 39], + yellow: [33, 39] + }), + (i.styles = { + special: "cyan", + number: "yellow", + boolean: "yellow", + undefined: "grey", + null: "bold", + string: "green", + date: "magenta", + regexp: "red" + }), + (t.isArray = d), + (t.isBoolean = m), + (t.isNull = y), + (t.isNullOrUndefined = v), + (t.isNumber = g), + (t.isString = E), + (t.isSymbol = b), + (t.isUndefined = x), + (t.isRegExp = A), + (t.isObject = D), + (t.isDate = C), + (t.isError = S), + (t.isFunction = F), + (t.isPrimitive = w), + (t.isBuffer = r(7316)) + var M = [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec" + ] + ;(t.log = function() { + console.log("%s - %s", P(), t.format.apply(t, arguments)) + }), + (t.inherits = r(7315)), + (t._extend = function(e, t) { + if (!t || !D(t)) return e + for (var r = Object.keys(t), n = r.length; n--; ) e[r[n]] = t[r[n]] + return e + }) + }.call( + t, + (function() { + return this + })(), + r(1) + )) + }, + 2, + 2, + function(e, t) { + e.exports = function(e) { + return ( + e.webpackPolyfill || + ((e.deprecate = function() {}), + (e.paths = []), + (e.children = []), + (e.webpackPolyfill = 1)), + e + ) + } + }, + [ + 7427, + 973, + 161, + 32, + 23, + 3948, + 3950, + 4155, + 4105, + 4145, + 4108, + 4107, + 4096, + 213, + 4100, + 994, + 1743, + 4101, + 4091, + 4099 + ], + 2, + [ + 7427, + 1148, + 252, + 50, + 24, + 5425, + 5426, + 5630, + 5580, + 5620, + 5583, + 5582, + 5571, + 254, + 5575, + 1170, + 2078, + 5576, + 5566, + 5574 + ], + 2, + [ + 7427, + 768, + 293, + 53, + 27, + 6790, + 6791, + 6962, + 6912, + 6952, + 6915, + 6914, + 6903, + 295, + 6907, + 1323, + 2408, + 6908, + 6898, + 6906 + ], + 2, + 5, + [ + 7427, + 840, + 186, + 48, + 29, + 2898, + 2899, + 2890, + 2840, + 2880, + 2843, + 2842, + 2831, + 182, + 2835, + 835, + 1454, + 2836, + 2826, + 2834 + ], + 2, + 2, + 2, + 2, + 2, + 2, + [ + 7427, + 949, + 206, + 67, + 31, + 3764, + 3765, + 3860, + 3861, + 1704, + 3863, + 3862, + 3851, + 209, + 3855, + 961, + 1690, + 3856, + 3846, + 3854 + ], + 2, + 2, + 2, + 2, + 2, + 2, + 2, + 5, + [ + 7427, + 1138, + 249, + 70, + 34, + 5377, + 5378, + 5370, + 5320, + 5360, + 5323, + 5322, + 5311, + 245, + 5315, + 1133, + 2023, + 5316, + 5306, + 5314 + ], + 5, + [ + 7427, + 1193, + 263, + 74, + 35, + 5791, + 5792, + 5934, + 5881, + 2164, + 5884, + 5883, + 5832, + 265, + 5836, + 1203, + 2143, + 5837, + 5827, + 5835 + ], + [ + 7427, + 1260, + 281, + 72, + 37, + 6423, + 6424, + 6416, + 6363, + 2283, + 6366, + 6365, + 6314, + 278, + 6318, + 1252, + 2262, + 6319, + 6309, + 6317 + ], + 5, + [ + 7427, + 878, + 190, + 66, + 38, + 3200, + 3201, + 3294, + 3295, + 1573, + 3297, + 3296, + 3285, + 192, + 3289, + 890, + 1558, + 3290, + 3280, + 3288 + ], + [ + 7427, + 901, + 196, + 73, + 39, + 3382, + 3383, + 3475, + 3476, + 1617, + 3478, + 3477, + 3466, + 198, + 3470, + 914, + 1602, + 3471, + 3461, + 3469 + ], + [ + 7427, + 1032, + 221, + 68, + 41, + 4446, + 4447, + 4540, + 4541, + 1851, + 4543, + 4542, + 4531, + 223, + 4535, + 1045, + 1836, + 4536, + 4526, + 4534 + ], + [ + 7427, + 421, + 82, + 10, + 2, + 1936, + 1937, + 4929, + 4876, + 1926, + 4879, + 4878, + 4827, + 231, + 4831, + 1080, + 1905, + 4832, + 4822, + 4830 + ], + [ + 7427, + 421, + 82, + 10, + 2, + 1936, + 1937, + 5024, + 5025, + 1968, + 5027, + 5026, + 5015, + 235, + 5019, + 1099, + 1953, + 5020, + 5010, + 5018 + ], + [ + 7427, + 1107, + 239, + 69, + 42, + 5084, + 5085, + 5178, + 5179, + 2005, + 5181, + 5180, + 5169, + 241, + 5173, + 1120, + 1990, + 5174, + 5164, + 5172 + ], + [ + 7427, + 1175, + 258, + 77, + 43, + 5637, + 5638, + 5780, + 5727, + 2126, + 5730, + 5729, + 5678, + 260, + 5682, + 1185, + 2105, + 5683, + 5673, + 5681 + ], + [ + 7427, + 1221, + 271, + 71, + 36, + 6070, + 6071, + 6009, + 6010, + 2198, + 6014, + 6013, + 5960, + 268, + 5964, + 1212, + 2178, + 5965, + 5955, + 5963 + ], + [ + 7427, + 1279, + 286, + 75, + 44, + 6592, + 6593, + 6530, + 6533, + 2325, + 6536, + 6535, + 6483, + 283, + 6487, + 1270, + 2305, + 6488, + 6478, + 6486 + ], + [ + 7427, + 1298, + 291, + 76, + 45, + 6744, + 6745, + 6682, + 6685, + 2363, + 6688, + 6687, + 6635, + 288, + 6639, + 1289, + 2343, + 6640, + 6630, + 6638 + ], + [ + 7427, + 1329, + 299, + 78, + 46, + 6976, + 6977, + 7119, + 7066, + 2457, + 7069, + 7068, + 7017, + 301, + 7021, + 1339, + 2436, + 7022, + 7012, + 7020 + ], + [ + 7427, + 1348, + 173, + 79, + 47, + 7132, + 7133, + 7275, + 7222, + 2494, + 7225, + 7224, + 7173, + 305, + 7177, + 1358, + 2473, + 7178, + 7168, + 7176 + ], + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + 5, + function(e, t) { + "use strict" + ;(t["default"] = function(e, t) { + if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function") + }), + (t.__esModule = !0) + }, + function(e, t) { + var r = Object + e.exports = { + create: r.create, + getProto: r.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: r.getOwnPropertyDescriptor, + setDesc: r.defineProperty, + setDescs: r.defineProperties, + getKeys: r.keys, + getNames: r.getOwnPropertyNames, + getSymbols: r.getOwnPropertySymbols, + each: [].forEach + } + }, + [7331, 4932], + [7331, 3536], + [7331, 4599], + [7331, 3051], + 80, + 80, + [7331, 4297], + 80, + 80, + 80, + [7331, 6272], + 80, + [7480, 562, 180, 148], + 81, + 81, + 81, + function(e, t) { + var r = (e.exports = { version: "1.2.6" }) + "number" == typeof __e && (__e = r) + }, + function(e, t) { + function r(e) { + var t = typeof e + return !!e && ("object" == t || "function" == t) + } + e.exports = r + }, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 81, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + 99, + [7331, 2568], + [ + 7396, + 146, + 797, + 2562, + 5, + 3, + 798, + 2607, + 2624, + 176, + 561, + 16, + 308, + 808, + 1390, + 308, + 808, + 1390 + ], + function(e, t) { + function r(e) { + return !!e && "object" == typeof e + } + e.exports = r + }, + [7480, 592, 193, 194], + [7480, 601, 199, 200], + [7480, 623, 210, 211], + 80, + [7480, 661, 224, 225], + [7480, 683, 236, 237], + [7480, 690, 242, 243], + [7480, 740, 274, 275], + 98, + 98, + [7480, 586, 314, 188], + [7480, 614, 322, 204], + [7331, 3951], + 98, + [7480, 655, 329, 219], + [7480, 674, 335, 229], + [7480, 677, 337, 232], + [7480, 720, 347, 261], + [7480, 728, 350, 266], + [7480, 735, 352, 269], + [7480, 750, 357, 279], + [7480, 756, 360, 284], + [7480, 762, 363, 289], + [7480, 781, 369, 302], + [7331, 7134], + [7480, 787, 372, 306], + function(e, t, r) { + ;(function(e) { + function r(e, t) { + for (var r = 0, n = e.length - 1; n >= 0; n--) { + var i = e[n] + "." === i + ? e.splice(n, 1) + : ".." === i + ? (e.splice(n, 1), r++) + : r && (e.splice(n, 1), r--) + } + if (t) for (; r--; r) e.unshift("..") + return e + } + function n(e, t) { + if (e.filter) return e.filter(t) + for (var r = [], n = 0; n < e.length; n++) t(e[n], n, e) && r.push(e[n]) + return r + } + var i = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/, + s = function(e) { + return i.exec(e).slice(1) + } + ;(t.resolve = function() { + for (var t = "", i = !1, s = arguments.length - 1; s >= -1 && !i; s--) { + var a = s >= 0 ? arguments[s] : e.cwd() + if ("string" != typeof a) + throw new TypeError("Arguments to path.resolve must be strings") + a && ((t = a + "/" + t), (i = "/" === a.charAt(0))) + } + return ( + (t = r( + n(t.split("/"), function(e) { + return !!e + }), + !i + ).join("/")), + (i ? "/" : "") + t || "." + ) + }), + (t.normalize = function(e) { + var i = t.isAbsolute(e), + s = "/" === a(e, -1) + return ( + (e = r( + n(e.split("/"), function(e) { + return !!e + }), + !i + ).join("/")), + e || i || (e = "."), + e && s && (e += "/"), + (i ? "/" : "") + e + ) + }), + (t.isAbsolute = function(e) { + return "/" === e.charAt(0) + }), + (t.join = function() { + var e = Array.prototype.slice.call(arguments, 0) + return t.normalize( + n(e, function(e, t) { + if ("string" != typeof e) + throw new TypeError( + "Arguments to path.join must be strings" + ) + return e + }).join("/") + ) + }), + (t.relative = function(e, r) { + function n(e) { + for (var t = 0; t < e.length && "" === e[t]; t++); + for (var r = e.length - 1; r >= 0 && "" === e[r]; r--); + return t > r ? [] : e.slice(t, r - t + 1) + } + ;(e = t.resolve(e).substr(1)), (r = t.resolve(r).substr(1)) + for ( + var i = n(e.split("/")), + s = n(r.split("/")), + a = Math.min(i.length, s.length), + o = a, + u = 0; + a > u; + u++ + ) + if (i[u] !== s[u]) { + o = u + break + } + for (var l = [], u = o; u < i.length; u++) l.push("..") + return (l = l.concat(s.slice(o))), l.join("/") + }), + (t.sep = "/"), + (t.delimiter = ":"), + (t.dirname = function(e) { + var t = s(e), + r = t[0], + n = t[1] + return r || n ? (n && (n = n.substr(0, n.length - 1)), r + n) : "." + }), + (t.basename = function(e, t) { + var r = s(e)[2] + return ( + t && + r.substr(-1 * t.length) === t && + (r = r.substr(0, r.length - t.length)), + r + ) + }), + (t.extname = function(e) { + return s(e)[3] + }) + var a = + "b" === "ab".substr(-1) + ? function(e, t, r) { + return e.substr(t, r) + } + : function(e, t, r) { + return 0 > t && (t = e.length + t), e.substr(t, r) + } + }.call(t, r(1))) + }, + [7330, 3], + [7363, 466, 98, 556], + [7380, 1382, 805, 466], + [7422, 146, 3, 16], + function(e, t) { + function r(e) { + return "number" == typeof e && e > -1 && e % 1 == 0 && n >= e + } + var n = 9007199254740991 + e.exports = r + }, + [7475, 99], + [7422, 186, 29, 33], + 148, + [7475, 121], + [7480, 572, 380, 183], + [7331, 2900], + [7422, 85, 6, 11], + 148, + [7475, 122], + [7331, 3202], + 98, + [7422, 190, 38, 54], + 180, + 148, + [7475, 123], + [7331, 3384], + 98, + [7422, 196, 39, 55], + 180, + 148, + [7475, 124], + 98, + [7422, 83, 7, 13], + 148, + [7475, 125], + [7331, 3766], + 80, + 98, + [7422, 206, 31, 40], + 180, + 148, + [7475, 126], + [7422, 161, 23, 26], + 148, + [7475, 127], + [7480, 638, 405, 214], + 98, + [7422, 88, 8, 14], + 148, + [7475, 128], + [7331, 4448], + 98, + [7422, 221, 41, 56], + 180, + 148, + [7475, 129], + 98, + [7422, 84, 9, 15], + 148, + [7475, 130], + [7422, 82, 2, 57], + 148, + [7475, 131], + 98, + [7422, 82, 2, 58], + 180, + 148, + [7475, 132], + [7331, 5086], + 98, + [7422, 239, 42, 59], + 180, + 148, + [7475, 133], + [7422, 249, 34, 49], + 148, + [7475, 134], + [7480, 699, 430, 246], + [7331, 5379], + 80, + 98, + [7331, 5427], + 98, + [7422, 252, 24, 28], + 148, + [7475, 135], + [7480, 713, 436, 255], + [7331, 5639], + 98, + [7422, 258, 43, 60], + 148, + [7475, 136], + [7331, 5793], + 98, + [7422, 263, 35, 51], + 148, + [7475, 137], + [7422, 271, 36, 61], + 148, + [7475, 138], + [7331, 6072], + 98, + [7422, 92, 4, 12], + 180, + 148, + [7475, 139], + 98, + [7422, 281, 37, 52], + 148, + [7475, 140], + [7331, 6425], + 98, + [7422, 286, 44, 62], + 148, + [7475, 141], + [7331, 6594], + 98, + [7422, 291, 45, 63], + 148, + [7475, 142], + [7331, 6746], + 98, + [7331, 6792], + 98, + [7422, 293, 27, 30], + 148, + [7475, 143], + [7480, 775, 455, 296], + [7331, 6978], + 98, + [7422, 299, 46, 64], + 148, + [7475, 144], + 98, + [7422, 173, 47, 65], + 148, + [7475, 145], + [ + 7401, + 80, + 3, + 5, + 1392, + 2646, + 1391, + 2626, + 147, + 565, + 808, + 16, + 2608, + 2614, + 2622, + 2612, + 2611, + 2617, + 2610, + 2621, + 2620, + 2613, + 2609 + ], + [7491, 562, 375, 99, 2691], + [ + 7401, + 311, + 29, + 48, + 1442, + 2790, + 1441, + 2794, + 378, + 1452, + 829, + 33, + 2754, + 2760, + 2768, + 2758, + 2757, + 2763, + 2756, + 2767, + 2766, + 2759, + 2755 + ], + 80, + [ + 7401, + 86, + 6, + 17, + 1488, + 3008, + 1487, + 3012, + 479, + 1498, + 855, + 11, + 2972, + 2978, + 2986, + 2976, + 2975, + 2981, + 2974, + 2985, + 2984, + 2977, + 2973 + ], + [ + 7401, + 86, + 6, + 17, + 1516, + 3131, + 1515, + 3135, + 485, + 1536, + 871, + 11, + 3098, + 3104, + 3112, + 3102, + 3101, + 3107, + 3100, + 3111, + 3110, + 3103, + 3099 + ], + 180, + 80, + [ + 7401, + 315, + 38, + 66, + 1553, + 3273, + 1552, + 3277, + 388, + 897, + 888, + 54, + 3238, + 3244, + 3252, + 3242, + 3241, + 3247, + 3240, + 3251, + 3250, + 3243, + 3239 + ], + 80, + [ + 7401, + 317, + 39, + 73, + 1597, + 3454, + 1596, + 3458, + 391, + 921, + 912, + 55, + 3419, + 3425, + 3433, + 3423, + 3422, + 3428, + 3421, + 3432, + 3431, + 3424, + 3420 + ], + [ + 7401, + 87, + 7, + 18, + 1635, + 3607, + 1634, + 3611, + 494, + 939, + 931, + 13, + 3572, + 3578, + 3586, + 3576, + 3575, + 3581, + 3574, + 3585, + 3584, + 3577, + 3573 + ], + [7480, 1645, 394, 611], + [ + 7401, + 87, + 7, + 18, + 1649, + 3694, + 1648, + 3698, + 495, + 1669, + 941, + 13, + 3661, + 3667, + 3675, + 3665, + 3664, + 3670, + 3663, + 3674, + 3673, + 3666, + 3662 + ], + 180, + [ + 7396, + 206, + 619, + 3761, + 67, + 31, + 1674, + 3802, + 3819, + 960, + 962, + 40, + 324, + 959, + 1683, + 324, + 959, + 1683 + ], + [ + 7401, + 207, + 31, + 67, + 1685, + 3839, + 1684, + 3843, + 323, + 627, + 959, + 40, + 3803, + 3809, + 3817, + 3807, + 3806, + 3812, + 3805, + 3816, + 3815, + 3808, + 3804 + ], + [ + 7396, + 161, + 498, + 3944, + 32, + 23, + 1715, + 4018, + 4035, + 631, + 990, + 26, + 326, + 989, + 1729, + 326, + 989, + 1729 + ], + [ + 7401, + 152, + 23, + 32, + 1731, + 4055, + 1730, + 4059, + 325, + 1741, + 989, + 26, + 4019, + 4025, + 4033, + 4023, + 4022, + 4028, + 4021, + 4032, + 4031, + 4024, + 4020 + ], + [ + 7401, + 89, + 8, + 19, + 1769, + 4255, + 1768, + 4259, + 505, + 1779, + 1007, + 14, + 4219, + 4225, + 4233, + 4223, + 4222, + 4228, + 4221, + 4232, + 4231, + 4224, + 4220 + ], + [ + 7401, + 89, + 8, + 19, + 1795, + 4376, + 1794, + 4380, + 510, + 1815, + 1024, + 14, + 4343, + 4349, + 4357, + 4347, + 4346, + 4352, + 4345, + 4356, + 4355, + 4348, + 4344 + ], + 180, + 80, + [ + 7401, + 330, + 41, + 68, + 1831, + 4519, + 1830, + 4523, + 412, + 1052, + 1043, + 56, + 4484, + 4490, + 4498, + 4488, + 4487, + 4493, + 4486, + 4497, + 4496, + 4489, + 4485 + ], + [ + 7401, + 90, + 9, + 21, + 1868, + 4670, + 1867, + 4674, + 514, + 1071, + 1063, + 15, + 4635, + 4641, + 4649, + 4639, + 4638, + 4644, + 4637, + 4648, + 4647, + 4640, + 4636 + ], + [7480, 1878, 417, 671], + [ + 7401, + 90, + 9, + 21, + 1882, + 4757, + 1881, + 4761, + 515, + 1902, + 1073, + 15, + 4724, + 4730, + 4738, + 4728, + 4727, + 4733, + 4726, + 4737, + 4736, + 4729, + 4725 + ], + 180, + [ + 7401, + 91, + 2, + 10, + 1908, + 4867, + 1907, + 4871, + 516, + 1928, + 1081, + 57, + 4834, + 4840, + 4848, + 4838, + 4837, + 4843, + 4836, + 4847, + 4846, + 4839, + 4835 + ], + 180, + [ + 7401, + 91, + 2, + 10, + 1948, + 5003, + 1947, + 5007, + 424, + 1106, + 1097, + 58, + 4968, + 4974, + 4982, + 4972, + 4971, + 4977, + 4970, + 4981, + 4980, + 4973, + 4969 + ], + 80, + [ + 7401, + 339, + 42, + 69, + 1985, + 5157, + 1984, + 5161, + 427, + 1127, + 1118, + 59, + 5122, + 5128, + 5136, + 5126, + 5125, + 5131, + 5124, + 5135, + 5134, + 5127, + 5123 + ], + [ + 7401, + 250, + 34, + 70, + 2011, + 5270, + 2010, + 5274, + 522, + 2021, + 1128, + 49, + 5234, + 5240, + 5248, + 5238, + 5237, + 5243, + 5236, + 5247, + 5246, + 5239, + 5235 + ], + 80, + [ + 7396, + 252, + 1149, + 5422, + 50, + 24, + 2051, + 5493, + 5510, + 1165, + 1166, + 28, + 344, + 1164, + 2064, + 344, + 1164, + 2064 + ], + [ + 7401, + 342, + 24, + 50, + 2066, + 5530, + 2065, + 5534, + 343, + 2076, + 1164, + 28, + 5494, + 5500, + 5508, + 5498, + 5497, + 5503, + 5496, + 5507, + 5506, + 5499, + 5495 + ], + 80, + [ + 7401, + 345, + 43, + 77, + 2108, + 5718, + 2107, + 5722, + 529, + 2128, + 1186, + 60, + 5685, + 5691, + 5699, + 5689, + 5688, + 5694, + 5687, + 5698, + 5697, + 5690, + 5686 + ], + 180, + 80, + [ + 7401, + 348, + 35, + 74, + 2146, + 5872, + 2145, + 5876, + 531, + 2166, + 1204, + 51, + 5839, + 5845, + 5853, + 5843, + 5842, + 5848, + 5841, + 5852, + 5851, + 5844, + 5840 + ], + 180, + [ + 7401, + 353, + 36, + 71, + 2181, + 6e3, + 2180, + 6004, + 532, + 2200, + 1213, + 61, + 5967, + 5973, + 5981, + 5971, + 5970, + 5976, + 5969, + 5980, + 5979, + 5972, + 5968 + ], + 180, + 80, + [ + 7401, + 93, + 4, + 20, + 2218, + 6155, + 2217, + 6159, + 534, + 744, + 1231, + 12, + 6119, + 6125, + 6133, + 6123, + 6122, + 6128, + 6121, + 6132, + 6131, + 6124, + 6120 + ], + [ + 7401, + 93, + 4, + 20, + 2226, + 6207, + 2225, + 6211, + 535, + 744, + 1234, + 12, + 6174, + 6180, + 6188, + 6178, + 6177, + 6183, + 6176, + 6187, + 6186, + 6179, + 6175 + ], + [ + 7401, + 358, + 37, + 72, + 2265, + 6354, + 2264, + 6358, + 540, + 2285, + 1253, + 52, + 6321, + 6327, + 6335, + 6325, + 6324, + 6330, + 6323, + 6334, + 6333, + 6326, + 6322 + ], + 180, + 80, + [ + 7401, + 361, + 44, + 75, + 2308, + 6523, + 2307, + 6527, + 542, + 2327, + 1271, + 62, + 6490, + 6496, + 6504, + 6494, + 6493, + 6499, + 6492, + 6503, + 6502, + 6495, + 6491 + ], + 180, + 80, + [ + 7401, + 364, + 45, + 76, + 2346, + 6675, + 2345, + 6679, + 544, + 2365, + 1290, + 63, + 6642, + 6648, + 6656, + 6646, + 6645, + 6651, + 6644, + 6655, + 6654, + 6647, + 6643 + ], + 180, + 80, + 80, + [ + 7401, + 365, + 27, + 53, + 2396, + 6862, + 2395, + 6866, + 547, + 2406, + 1317, + 30, + 6827, + 6833, + 6841, + 6831, + 6830, + 6836, + 6829, + 6840, + 6839, + 6832, + 6828 + ], + 80, + [ + 7401, + 367, + 46, + 78, + 2439, + 7057, + 2438, + 7061, + 550, + 2459, + 1340, + 64, + 7024, + 7030, + 7038, + 7028, + 7027, + 7033, + 7026, + 7037, + 7036, + 7029, + 7025 + ], + 180, + 80, + [ + 7401, + 370, + 47, + 79, + 2476, + 7213, + 2475, + 7217, + 552, + 2496, + 1359, + 65, + 7180, + 7186, + 7194, + 7184, + 7183, + 7189, + 7182, + 7193, + 7192, + 7185, + 7181 + ], + 180, + function(e, t) {}, + [7345, 555, 2563], + [7470, 816, 180], + [7480, 1439, 474, 825], + 99, + [ + 7396, + 186, + 841, + 2895, + 48, + 29, + 1471, + 2753, + 2770, + 830, + 831, + 33, + 310, + 829, + 1440, + 310, + 829, + 1440 + ], + 99, + 180, + [7380, 1479, 1481, 575], + [7480, 1485, 478, 851], + 99, + 99, + [7380, 1510, 1512, 583], + [7491, 586, 875, 122, 3181], + [7380, 1549, 1550, 590], + [ + 7396, + 190, + 588, + 3197, + 66, + 38, + 1542, + 3237, + 3254, + 889, + 891, + 54, + 316, + 888, + 1551, + 316, + 888, + 1551 + ], + [7491, 592, 894, 123, 3333], + [7380, 1593, 1594, 599], + [ + 7396, + 196, + 902, + 3379, + 73, + 39, + 1586, + 3418, + 3435, + 913, + 915, + 55, + 318, + 912, + 1595, + 318, + 912, + 1595 + ], + [7491, 601, 918, 124, 3514], + [7380, 1631, 1632, 608], + 180, + 99, + [7491, 614, 945, 125, 3744], + [7380, 1681, 1682, 621], + [7491, 623, 965, 126, 3899], + 180, + [7480, 1711, 399, 969], + [7380, 1723, 1724, 632], + [7480, 1728, 501, 985], + 99, + 99, + 180, + [7480, 1766, 504, 1003], + 99, + 99, + [7380, 1790, 1791, 652], + [7491, 655, 1028, 128, 4426], + [7380, 1827, 1828, 659], + [ + 7396, + 221, + 1033, + 4443, + 68, + 41, + 1820, + 4483, + 4500, + 1044, + 1046, + 56, + 331, + 1043, + 1829, + 331, + 1043, + 1829 + ], + [7491, 661, 1049, 129, 4579], + [7339, 4606], + [7341, 4608], + [7380, 1864, 1865, 668], + 180, + 99, + [7491, 674, 1077, 130, 4807], + [7491, 677, 1085, 131, 4917], + [7339, 4939], + [7341, 4941], + [7380, 1944, 1945, 681], + [ + 7396, + 82, + 422, + 1933, + 10, + 2, + 679, + 4967, + 4984, + 1098, + 1100, + 58, + 338, + 1097, + 1946, + 338, + 1097, + 1946 + ], + [7491, 683, 1103, 132, 5063], + [7380, 1981, 1982, 688], + [ + 7396, + 239, + 1108, + 5081, + 69, + 42, + 1974, + 5121, + 5138, + 1119, + 1121, + 59, + 340, + 1118, + 1983, + 340, + 1118, + 1983 + ], + [7491, 690, 1124, 133, 5217], + 99, + 180, + [7380, 2047, 2048, 703], + [7380, 2058, 2059, 707], + [7480, 2063, 526, 1160], + 99, + 99, + 180, + [7380, 2103, 2104, 717], + [7491, 720, 1190, 136, 5768], + [7380, 2141, 2142, 725], + [7491, 728, 1208, 137, 5922], + 81, + [7491, 735, 1218, 138, 6052], + [7380, 2213, 2214, 738], + [7436, 2240, 1237, 156, 742, 274, 2245, 6264], + [7491, 740, 1238, 139, 6254], + [7380, 2259, 2260, 747], + [7491, 750, 1257, 140, 6404], + [7380, 2298, 2299, 753], + [7491, 756, 1276, 141, 6574], + [7380, 2340, 2341, 759], + [7491, 762, 1295, 142, 6726], + [7380, 2378, 2379, 765], + [7380, 2392, 2393, 770], + 99, + 180, + [7380, 2434, 2435, 778], + [7491, 781, 1344, 144, 7107], + [7380, 2471, 2472, 784], + [7491, 787, 1363, 145, 7263], + function(e, t) { + "use strict" + e.exports = { + filename: { + type: "filename", + description: + "filename to use when reading from stdin - this will be used in source-maps, errors etc", + default: "unknown", + shorthand: "f" + }, + filenameRelative: { hidden: !0, type: "string" }, + inputSourceMap: { hidden: !0 }, + env: { hidden: !0, default: {} }, + mode: { description: "", hidden: !0 }, + retainLines: { + type: "boolean", + default: !1, + description: "retain line numbers - will result in really ugly code" + }, + highlightCode: { + description: + "enable/disable ANSI syntax highlighting of code frames (on by default)", + type: "boolean", + default: !0 + }, + suppressDeprecationMessages: { type: "boolean", default: !1, hidden: !0 }, + presets: { type: "list", description: "", default: [] }, + plugins: { type: "list", default: [], description: "" }, + ignore: { + type: "list", + description: "list of glob paths to **not** compile", + default: [] + }, + only: { type: "list", description: "list of glob paths to **only** compile" }, + code: { hidden: !0, default: !0, type: "boolean" }, + metadata: { hidden: !0, default: !0, type: "boolean" }, + ast: { hidden: !0, default: !0, type: "boolean" }, + extends: { type: "string", hidden: !0 }, + comments: { + type: "boolean", + default: !0, + description: "write comments to generated output (true by default)" + }, + shouldPrintComment: { + hidden: !0, + description: + "optional callback to control whether a comment should be inserted, when this is used the comments option is ignored" + }, + compact: { + type: "booleanString", + default: "auto", + description: + "do not include superfluous whitespace characters and line terminators [true|false|auto]" + }, + minified: { + type: "boolean", + default: !1, + description: "save as much bytes when printing [true|false]" + }, + sourceMap: { alias: "sourceMaps", hidden: !0 }, + sourceMaps: { + type: "booleanString", + description: "[true|false|inline]", + default: !1, + shorthand: "s" + }, + sourceMapTarget: { + type: "string", + description: "set `file` on returned source map" + }, + sourceFileName: { + type: "string", + description: "set `sources[0]` on returned source map" + }, + sourceRoot: { + type: "filename", + description: "the root from which all sources are relative" + }, + babelrc: { + description: "Whether or not to look up .babelrc and .babelignore files", + type: "boolean", + default: !0 + }, + sourceType: { description: "", default: "module" }, + auxiliaryCommentBefore: { + type: "string", + description: "print a comment before any injected non-user code" + }, + auxiliaryCommentAfter: { + type: "string", + description: "print a comment after any injected non-user code" + }, + resolveModuleSource: { hidden: !0 }, + getModuleId: { hidden: !0 }, + moduleRoot: { + type: "filename", + description: + "optional prefix for the AMD module formatter that will be prepend to the filename on module definitions" + }, + moduleIds: { + type: "boolean", + default: !1, + shorthand: "M", + description: "insert an explicit id for modules" + }, + moduleId: { + description: "specify a custom name for module ids", + type: "string" + }, + passPerPreset: { + description: + "Whether to spawn a traversal pass per a preset. By default all presets are merged.", + type: "boolean", + default: !1, + hidden: !0 + } + } + }, + function(e, t, r) { + ;(function(n) { + "use strict" + function i(e) { + var t = N[e] + return null == t ? (N[e] = D["default"].sync(e)) : t + } + var s = r(80)["default"], + a = r(796)["default"], + o = r(3)["default"], + u = r(5)["default"] + t.__esModule = !0 + var l = r(1366), + c = o(l), + p = r(553), + f = u(p), + h = r(176), + d = o(h), + m = r(792), + y = r(2506), + v = u(y), + g = r(2649), + E = u(g), + b = r(2707), + x = u(b), + A = r(2706), + D = u(A), + C = r(1413), + S = u(C), + F = r(564), + w = u(F), + _ = r(2504), + T = u(_), + P = r(460), + B = u(P), + k = r(794), + I = u(k), + O = r(175), + M = u(O), + R = r(373), + L = u(R), + N = {}, + j = {}, + U = ".babelignore", + V = ".babelrc", + G = "package.json", + W = (function() { + function e(t) { + s(this, e), + (this.resolvedConfigs = []), + (this.options = e.createBareOptions()), + (this.log = t) + } + return ( + (e.memoisePluginContainer = function(t, r, n, i) { + for (var s = e.memoisedPlugins, a = 0; a < s.length; a++) { + var o = s[a] + if (o.container === t) return o.plugin + } + var u = void 0 + if ( + ((u = "function" == typeof t ? t(c) : t), + "object" == typeof u) + ) { + var l = new f["default"](u, i) + return ( + e.memoisedPlugins.push({ container: t, plugin: l }), l + ) + } + throw new TypeError( + d.get("pluginNotObject", r, n, typeof u) + r + n + ) + }), + (e.createBareOptions = function() { + var e = {} + for (var t in B["default"]) { + var r = B["default"][t] + e[t] = w["default"](r["default"]) + } + return e + }), + (e.normalisePlugin = function(t, r, n, i) { + if ( + ((t = t.__esModule ? t["default"] : t), + !(t instanceof f["default"])) + ) { + if ("function" != typeof t && "object" != typeof t) + throw new TypeError( + d.get("pluginNotFunction", r, n, typeof t) + ) + t = e.memoisePluginContainer(t, r, n, i) + } + return t.init(r, n), t + }), + (e.normalisePlugins = function(t, n, i) { + return i.map(function(i, s) { + var a = void 0, + o = void 0 + if (!i) throw new TypeError("Falsy value found in plugins") + Array.isArray(i) ? ((a = i[0]), (o = i[1])) : (a = i) + var u = "string" == typeof a ? a : t + "$" + s + if ("string" == typeof a) { + var l = + v["default"]("babel-plugin-" + a, n) || + v["default"](a, n) + if (!l) + throw new ReferenceError( + d.get("pluginUnknown", a, t, s, n) + ) + a = r(1367)(l) + } + return (a = e.normalisePlugin(a, t, s, u)), [a, o] + }) + }), + (e.prototype.addConfig = function(e, t) { + var r = + arguments.length <= 2 || void 0 === arguments[2] + ? E["default"] + : arguments[2] + if (this.resolvedConfigs.indexOf(e) >= 0) return !1 + var n = L["default"].readFileSync(e, "utf8"), + i = void 0 + try { + ;(i = j[n] = j[n] || r.parse(n)), t && (i = i[t]) + } catch (s) { + throw ((s.message = + e + ": Error while parsing JSON - " + s.message), + s) + } + return ( + this.mergeOptions({ + options: i, + alias: e, + dirname: M["default"].dirname(e) + }), + this.resolvedConfigs.push(e), + !!i + ) + }), + (e.prototype.mergeOptions = function(t) { + var r = this, + i = t.options, + s = t.extending, + o = t.alias, + u = t.loc, + l = t.dirname + if (((o = o || "foreign"), i)) { + ;("object" != typeof i || Array.isArray(i)) && + this.log.error( + "Invalid options type for " + o, + TypeError + ) + var c = S["default"](i, function(e) { + return e instanceof f["default"] ? e : void 0 + }) + ;(l = l || n.cwd()), (u = u || o) + for (var p in c) { + var h = B["default"][p] + if (!h && this.log) { + var d = + "Check out http://babeljs.io/docs/usage/options/ for more info" + I["default"][p] + ? this.log.error( + "Using removed Babel 5 option: " + + o + + "." + + p + + " - " + + I["default"][p].message, + ReferenceError + ) + : this.log.error( + "Unknown option: " + + o + + "." + + p + + ". " + + d, + ReferenceError + ) + } + } + if ( + (m.normaliseOptions(c), + c.plugins && + (c.plugins = e.normalisePlugins(u, l, c.plugins)), + c["extends"]) + ) { + var y = v["default"](c["extends"], l) + y + ? this.addConfig(y) + : this.log && + this.log.error( + "Couldn't resolve extends clause of " + + c["extends"] + + " in " + + o + ), + delete c["extends"] + } + c.presets && + (c.passPerPreset + ? (c.presets = this.resolvePresets( + c.presets, + l, + function(e, t) { + r.mergeOptions({ + options: e, + extending: e, + alias: t, + loc: t, + dirname: l + }) + } + )) + : (this.mergePresets(c.presets, l), + delete c.presets)) + var g = void 0, + E = n.env.BABEL_ENV || "production" || "development" + c.env && ((g = c.env[E]), delete c.env), + i === s ? a(s, c) : T["default"](s || this.options, c), + this.mergeOptions({ + options: g, + extending: s, + alias: o + ".env." + E, + dirname: l + }) + } + }), + (e.prototype.mergePresets = function(e, t) { + var r = this + this.resolvePresets(e, t, function(e, t) { + r.mergeOptions({ + options: e, + alias: t, + loc: t, + dirname: M["default"].dirname(t) + }) + }) + }), + (e.prototype.resolvePresets = function(e, t, n) { + return e.map(function(e) { + if ("string" == typeof e) { + var i = + v["default"]("babel-preset-" + e, t) || + v["default"](e, t) + if (i) { + var s = r(1367)(i) + return n && n(s, i), s + } + throw new Error( + "Couldn't find preset " + + JSON.stringify(e) + + " relative to directory " + + JSON.stringify(t) + ) + } + if ("object" == typeof e) return n && n(e), e + throw new Error("Unsupported preset format: " + e + ".") + }) + }), + (e.prototype.addIgnoreConfig = function(e) { + var t = L["default"].readFileSync(e, "utf8"), + r = t.split("\n") + ;(r = r + .map(function(e) { + return e.replace(/#(.*?)$/, "").trim() + }) + .filter(function(e) { + return !!e + })), + this.mergeOptions({ options: { ignore: r }, loc: e }) + }), + (e.prototype.findConfigs = function(e) { + if (e) { + x["default"](e) || (e = M["default"].join(n.cwd(), e)) + for ( + var t = !1, r = !1; + e !== (e = M["default"].dirname(e)); + + ) { + if (!t) { + var s = M["default"].join(e, V) + i(s) && (this.addConfig(s), (t = !0)) + var a = M["default"].join(e, G) + !t && i(a) && (t = this.addConfig(a, "babel", JSON)) + } + if (!r) { + var o = M["default"].join(e, U) + i(o) && (this.addIgnoreConfig(o), (r = !0)) + } + if (r && t) return + } + } + }), + (e.prototype.normaliseOptions = function() { + var e = this.options + for (var t in B["default"]) { + var r = B["default"][t], + n = e[t] + ;(!n && r.optional) || + (r.alias ? (e[r.alias] = e[r.alias] || n) : (e[t] = n)) + } + }), + (e.prototype.init = function() { + var e = + arguments.length <= 0 || void 0 === arguments[0] + ? {} + : arguments[0], + t = e.filename + return ( + e.babelrc !== !1 && this.findConfigs(t), + this.mergeOptions({ + options: e, + alias: "base", + dirname: t && M["default"].dirname(t) + }), + this.normaliseOptions(e), + this.options + ) + }), + e + ) + })() + ;(t["default"] = W), (W.memoisedPlugins = []), (e.exports = t["default"]) + }.call(t, r(1))) + }, + [7339, 2577], + [7358, 559], + [7361, 465], + function(e, t) { + e.exports = function(e) { + try { + return !!e() + } catch (t) { + return !0 + } + } + }, + function(e, t) { + var r = (e.exports = + "undefined" != typeof window && window.Math == Math + ? window + : "undefined" != typeof self && self.Math == Math + ? self + : Function("return this")()) + "number" == typeof __g && (__g = r) + }, + [7365, 81, 803, 464], + function(e, t) { + e.exports = {} + }, + [7378, 1378, 557], + [7455, 1420], + [7471, 375, 563, 99], + [7479, 375, 148], + function(e, t) { + function r(e, t, r) { + if (t in e) return e[t] + if (3 === arguments.length) return r + throw new Error('"' + t + '" is a required argument.') + } + function n(e) { + var t = e.match(d) + return t + ? { scheme: t[1], auth: t[2], host: t[3], port: t[4], path: t[5] } + : null + } + function i(e) { + var t = "" + return ( + e.scheme && (t += e.scheme + ":"), + (t += "//"), + e.auth && (t += e.auth + "@"), + e.host && (t += e.host), + e.port && (t += ":" + e.port), + e.path && (t += e.path), + t + ) + } + function s(e) { + var r = e, + s = n(e) + if (s) { + if (!s.path) return e + r = s.path + } + for ( + var a, o = t.isAbsolute(r), u = r.split(/\/+/), l = 0, c = u.length - 1; + c >= 0; + c-- + ) + (a = u[c]), + "." === a + ? u.splice(c, 1) + : ".." === a + ? l++ + : l > 0 && + ("" === a ? (u.splice(c + 1, l), (l = 0)) : (u.splice(c, 2), l--)) + return ( + (r = u.join("/")), + "" === r && (r = o ? "/" : "."), + s ? ((s.path = r), i(s)) : r + ) + } + function a(e, t) { + "" === e && (e = "."), "" === t && (t = ".") + var r = n(t), + a = n(e) + if ((a && (e = a.path || "/"), r && !r.scheme)) + return a && (r.scheme = a.scheme), i(r) + if (r || t.match(m)) return t + if (a && !a.host && !a.path) return (a.host = t), i(a) + var o = "/" === t.charAt(0) ? t : s(e.replace(/\/+$/, "") + "/" + t) + return a ? ((a.path = o), i(a)) : o + } + function o(e, t) { + "" === e && (e = "."), (e = e.replace(/\/$/, "")) + for (var r = 0; 0 !== t.indexOf(e + "/"); ) { + var n = e.lastIndexOf("/") + if (0 > n) return t + if (((e = e.slice(0, n)), e.match(/^([^\/]+:\/)?\/*$/))) return t + ++r + } + return Array(r + 1).join("../") + t.substr(e.length + 1) + } + function u(e) { + return "$" + e + } + function l(e) { + return e.substr(1) + } + function c(e, t, r) { + var n = e.source - t.source + return 0 !== n + ? n + : ((n = e.originalLine - t.originalLine), + 0 !== n + ? n + : ((n = e.originalColumn - t.originalColumn), + 0 !== n || r + ? n + : ((n = e.generatedColumn - t.generatedColumn), + 0 !== n + ? n + : ((n = e.generatedLine - t.generatedLine), + 0 !== n ? n : e.name - t.name)))) + } + function p(e, t, r) { + var n = e.generatedLine - t.generatedLine + return 0 !== n + ? n + : ((n = e.generatedColumn - t.generatedColumn), + 0 !== n || r + ? n + : ((n = e.source - t.source), + 0 !== n + ? n + : ((n = e.originalLine - t.originalLine), + 0 !== n + ? n + : ((n = e.originalColumn - t.originalColumn), + 0 !== n ? n : e.name - t.name)))) + } + function f(e, t) { + return e === t ? 0 : e > t ? 1 : -1 + } + function h(e, t) { + var r = e.generatedLine - t.generatedLine + return 0 !== r + ? r + : ((r = e.generatedColumn - t.generatedColumn), + 0 !== r + ? r + : ((r = f(e.source, t.source)), + 0 !== r + ? r + : ((r = e.originalLine - t.originalLine), + 0 !== r + ? r + : ((r = e.originalColumn - t.originalColumn), + 0 !== r ? r : f(e.name, t.name))))) + } + t.getArg = r + var d = /^(?:([\w+\-.]+):)?\/\/(?:(\w+:\w+)@)?([\w.]*)(?::(\d+))?(\S*)$/, + m = /^data:.+\,.+$/ + ;(t.urlParse = n), + (t.urlGenerate = i), + (t.normalize = s), + (t.join = a), + (t.isAbsolute = function(e) { + return "/" === e.charAt(0) || !!e.match(d) + }), + (t.relative = o), + (t.toSetString = u), + (t.fromSetString = l), + (t.compareByOriginalPositions = c), + (t.compareByGeneratedPositionsDeflated = p), + (t.compareByGeneratedPositionsInflated = h) + }, + 180, + 180, + [7363, 575, 157, 2914], + [7378, 1475, 843], + 180, + [ + 7396, + 85, + 482, + 1501, + 17, + 6, + 581, + 2971, + 2988, + 856, + 857, + 11, + 312, + 855, + 1486, + 312, + 855, + 1486 + ], + 180, + [7339, 3059], + [7341, 3061], + [7363, 583, 158, 3065], + [7378, 1506, 863], + [ + 7396, + 85, + 482, + 1501, + 17, + 6, + 581, + 3097, + 3114, + 872, + 873, + 11, + 313, + 871, + 1514, + 313, + 871, + 1514 + ], + [7378, 3217, 880], + [7455, 1576], + [7380, 3363, 3367, 899], + [7378, 3399, 904], + [7455, 1620], + [7339, 3543], + [7341, 3545], + [7378, 3551, 923], + [ + 7396, + 83, + 492, + 1623, + 18, + 7, + 606, + 3571, + 3588, + 932, + 933, + 13, + 319, + 931, + 1633, + 319, + 931, + 1633 + ], + [ + 7396, + 83, + 492, + 1623, + 18, + 7, + 606, + 3660, + 3677, + 942, + 943, + 13, + 321, + 941, + 1647, + 321, + 941, + 1647 + ], + [7378, 3781, 951], + [7455, 1708], + [7341, 3961], + [7363, 632, 162, 1716], + [7378, 3966, 976], + 180, + 180, + [7380, 4172, 4176, 1e3], + 180, + [ + 7396, + 88, + 508, + 1782, + 19, + 8, + 650, + 4218, + 4235, + 1008, + 1009, + 14, + 327, + 1007, + 1767, + 327, + 1007, + 1767 + ], + 180, + [7339, 4304], + [7341, 4306], + [7378, 4312, 1015], + [ + 7396, + 88, + 508, + 1782, + 19, + 8, + 650, + 4342, + 4359, + 1025, + 1026, + 14, + 328, + 1024, + 1793, + 328, + 1024, + 1793 + ], + [7378, 4463, 1035], + [7455, 1854], + [7378, 4614, 1055], + [ + 7396, + 84, + 415, + 1856, + 21, + 9, + 666, + 4634, + 4651, + 1064, + 1065, + 15, + 332, + 1063, + 1866, + 332, + 1063, + 1866 + ], + [ + 7396, + 84, + 415, + 1856, + 21, + 9, + 666, + 4723, + 4740, + 1074, + 1075, + 15, + 334, + 1073, + 1880, + 334, + 1073, + 1880 + ], + [ + 7396, + 82, + 422, + 1933, + 10, + 2, + 679, + 4833, + 4850, + 1082, + 1083, + 57, + 336, + 1081, + 1906, + 336, + 1081, + 1906 + ], + [7334, 4934], + [7378, 4947, 1089], + [7455, 1971], + [7378, 5101, 1110], + [7455, 2008], + [ + 7396, + 249, + 701, + 5374, + 70, + 34, + 2040, + 5233, + 5250, + 695, + 1129, + 49, + 341, + 1128, + 2009, + 341, + 1128, + 2009 + ], + 180, + [7378, 5394, 1140], + [7378, 5442, 1151], + 180, + 180, + [7378, 5654, 1177], + [ + 7396, + 258, + 2095, + 5634, + 77, + 43, + 2096, + 5684, + 5701, + 1187, + 1188, + 60, + 346, + 1186, + 2106, + 346, + 1186, + 2106 + ], + [7378, 5808, 1195], + [ + 7396, + 263, + 2133, + 5788, + 74, + 35, + 2134, + 5838, + 5855, + 1205, + 1206, + 51, + 349, + 1204, + 2144, + 349, + 1204, + 2144 + ], + [ + 7396, + 271, + 2205, + 6067, + 71, + 36, + 2206, + 5966, + 5983, + 1214, + 1215, + 61, + 351, + 1213, + 2179, + 351, + 1213, + 2179 + ], + [7378, 6087, 1223], + [ + 7396, + 92, + 538, + 2251, + 20, + 4, + 745, + 6118, + 6135, + 1232, + 444, + 12, + 354, + 1231, + 2216, + 354, + 1231, + 2216 + ], + [ + 7396, + 92, + 538, + 2251, + 20, + 4, + 745, + 6173, + 6190, + 1235, + 444, + 12, + 355, + 1234, + 2224, + 355, + 1234, + 2224 + ], + [7455, 2249], + [7339, 6279], + [7341, 6281], + [7378, 6287, 1244], + [ + 7396, + 281, + 2290, + 6420, + 72, + 37, + 2291, + 6320, + 6337, + 1254, + 1255, + 52, + 356, + 1253, + 2263, + 356, + 1253, + 2263 + ], + [7378, 6440, 1262], + [ + 7396, + 286, + 2332, + 6589, + 75, + 44, + 2333, + 6489, + 6506, + 1272, + 1274, + 62, + 359, + 1271, + 2306, + 359, + 1271, + 2306 + ], + [7378, 6609, 1281], + [ + 7396, + 291, + 2370, + 6741, + 76, + 45, + 2371, + 6641, + 6658, + 1291, + 1293, + 63, + 362, + 1290, + 2344, + 362, + 1290, + 2344 + ], + [7378, 6761, 1300], + [7378, 6807, 1309], + [ + 7396, + 293, + 2384, + 6787, + 53, + 27, + 2385, + 6826, + 6843, + 1318, + 1319, + 30, + 366, + 1317, + 2394, + 366, + 1317, + 2394 + ], + 180, + [7378, 6993, 1331], + [ + 7396, + 299, + 2426, + 6973, + 78, + 46, + 2427, + 7023, + 7040, + 1341, + 1342, + 64, + 368, + 1340, + 2437, + 368, + 1340, + 2437 + ], + [7378, 7149, 1350], + [ + 7396, + 173, + 2463, + 7129, + 79, + 47, + 2464, + 7179, + 7196, + 1360, + 1361, + 65, + 371, + 1359, + 2474, + 371, + 1359, + 2474 + ], + function(e, t, r) { + "use strict" + var n = r(374)["default"], + i = r(80)["default"], + s = r(146)["default"], + a = r(5)["default"], + o = r(3)["default"] + t.__esModule = !0 + var u = r(461), + l = a(u), + c = r(176), + p = o(c), + f = r(790), + h = a(f), + d = r(147), + m = a(d), + y = r(565), + v = a(y), + g = r(564), + E = a(g), + b = ["enter", "exit"], + x = (function(e) { + function t(r, n) { + i(this, t), + e.call(this), + (this.initialized = !1), + (this.raw = v["default"]({}, r)), + (this.key = n), + (this.manipulateOptions = this.take("manipulateOptions")), + (this.post = this.take("post")), + (this.pre = this.take("pre")), + (this.visitor = this.normaliseVisitor( + E["default"](this.take("visitor")) || {} + )) + } + return ( + n(t, e), + (t.prototype.take = function(e) { + var t = this.raw[e] + return delete this.raw[e], t + }), + (t.prototype.chain = function(e, t) { + if (!e[t]) return this[t] + if (!this[t]) return e[t] + var r = [e[t], this[t]] + return function() { + for ( + var e = void 0, t = arguments.length, n = Array(t), i = 0; + t > i; + i++ + ) + n[i] = arguments[i] + for (var s = 0; s < r.length; s++) { + var a = r[s] + if (a) { + var o = a.apply(this, n) + null != o && (e = o) + } + } + return e + } + }), + (t.prototype.maybeInherit = function(e) { + var t = this.take("inherits") + t && + ((t = l["default"].normalisePlugin(t, e, "inherits")), + (this.manipulateOptions = this.chain(t, "manipulateOptions")), + (this.post = this.chain(t, "post")), + (this.pre = this.chain(t, "pre")), + (this.visitor = m["default"].visitors.merge([ + t.visitor, + this.visitor + ]))) + }), + (t.prototype.init = function(e, t) { + if (!this.initialized) { + ;(this.initialized = !0), this.maybeInherit(e) + for (var r in this.raw) + throw new Error(p.get("pluginInvalidProperty", e, t, r)) + } + }), + (t.prototype.normaliseVisitor = function(e) { + for (var t = b, r = Array.isArray(t), n = 0, t = r ? t : s(t); ; ) { + var i + if (r) { + if (n >= t.length) break + i = t[n++] + } else { + if (((n = t.next()), n.done)) break + i = n.value + } + var a = i + if (e[a]) + throw new Error( + "Plugins aren't allowed to specify catch-all enter/exit handlers. Please target individual nodes." + ) + } + return m["default"].explode(e), e + }), + t + ) + })(h["default"]) + ;(t["default"] = x), (e.exports = t["default"]) + }, + [7328, 2554], + [7334, 2572], + [7360, 2581], + function(e, t) { + e.exports = function(e) { + if (void 0 == e) throw TypeError("Can't call method on " + e) + return e + } + }, + function(e, t) { + var r = {}.hasOwnProperty + e.exports = function(e, t) { + return r.call(e, t) + } + }, + function(e, t) { + e.exports = function(e) { + return "object" == typeof e ? null !== e : "function" == typeof e + } + }, + [7375, 81, 558, 178], + [7436, 1406, 816, 94, 471, 180, 819, 2698], + [7468, 2693], + function(e, t) { + function r(e, t) { + return ( + (e = "number" == typeof e || n.test(e) ? +e : -1), + (t = null == t ? i : t), + e > -1 && e % 1 == 0 && t > e + ) + } + var n = /^\d+$/, + i = 9007199254740991 + e.exports = r + }, + [7477, 1401, 470, 471], + [7488, 2660, 1400, 1411], + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.messages + return { + visitor: { + Scope: function(e) { + var r = e.scope + for (var n in r.bindings) { + var i = r.bindings[n] + if ("const" === i.kind || "module" === i.kind) + for ( + var s = i.constantViolations, a = 0; + a < s.length; + a++ + ) { + var o = s[a] + throw o.buildCodeFrameError(t.get("readOnly", n)) + } + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("asyncFunctions") + } + } + }), + (e.exports = t["default"]) + }, + 563, + 148, + [7480, 1450, 475, 569], + [7491, 1450, 832, 379, 2814], + [7468, 2882], + [7491, 572, 837, 121, 2878], + 465, + 466, + 468, + 563, + 148, + [7480, 1496, 480, 578], + [7491, 1496, 858, 384, 3032], + function(e, t) { + "use strict" + ;(t["default"] = function(e) { + return e && e.__esModule ? e["default"] : e + }), + (t.__esModule = !0) + }, + 465, + 466, + 468, + [7455, 1538], + [7468, 3184], + [7471, 875, 876, 122], + [7341, 3211], + [7363, 590, 191, 3215], + 466, + 468, + [7468, 3337], + 563, + [7471, 894, 593, 123], + [7479, 894, 194], + 468, + 81, + [7363, 599, 197, 3397], + 466, + 468, + [7468, 3518], + 563, + [7471, 918, 602, 124], + [7479, 918, 200], + [7334, 3538], + 581, + [7363, 608, 202, 3549], + 466, + 468, + 563, + 148, + [7491, 1645, 935, 395, 3637], + [7455, 1671], + [7468, 3747], + [7471, 945, 946, 125], + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + ArrowFunctionExpression: function(e, r) { + if (r.opts.spec) { + var n = e.node + if (n.shadow) return + ;(n.shadow = { this: !1 }), (n.type = "FunctionExpression") + var i = t.thisExpression() + ;(i._forceShadow = e), + e.ensureBlock(), + e + .get("body") + .unshiftContainer( + "body", + t.expressionStatement( + t.callExpression( + r.addHelper("newArrowCheck"), + [t.thisExpression(), i] + ) + ) + ), + e.replaceWith( + t.callExpression( + t.memberExpression(n, t.identifier("bind")), + [t.thisExpression()] + ) + ) + } else e.arrowFunctionToShadowed() + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e, t) { + for (var n = t.get(e), i = 0; i < n.length; i++) { + var s = n[i], + a = s.node + if (s.isFunctionDeclaration()) { + var o = r.variableDeclaration("let", [ + r.variableDeclarator(a.id, r.toExpression(a)) + ]) + ;(o._blockHoist = 2), (a.id = null), s.replaceWith(o) + } + } + } + var r = e.types + return { + visitor: { + BlockStatement: function(e) { + var n = e.node, + i = e.parent + r.isFunction(i, { body: n }) || + r.isExportDeclaration(i) || + t("body", e) + }, + SwitchCase: function(e) { + t("consequent", e) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + function n(e) { + return g.isVariableDeclaration(e) + ? e[g.BLOCK_SCOPED_SYMBOL] + ? !0 + : "let" === e.kind || "const" === e.kind + : !1 + } + function i(e, t, r) { + var n = arguments.length <= 3 || void 0 === arguments[3] ? !1 : arguments[3], + i = e.node + if (!g.isFor(t)) + for (var s = 0; s < i.declarations.length; s++) { + var a = i.declarations[s] + a.init = a.init || r.buildUndefinedNode() + } + if (((i[g.BLOCK_SCOPED_SYMBOL] = !0), (i.kind = "var"), n)) { + var o = r.getFunctionParent() + if (o === r) return + var u = e.getBindingIdentifiers() + for (var l in u) r.removeOwnBinding(l) + o.registerBinding("var", e) + } + } + function s(e) { + return g.isVariableDeclaration(e, { kind: "var" }) && !n(e) + } + function a(e, t, r, n) { + var i = n[t.name] + if (i) { + var s = r.getBindingIdentifier(t.name) + s === i.binding ? r.rename(t.name, i.uid) : e && e.skip() + } + } + function o(e, t, r, n) { + if ((g.isIdentifier(e) && a(e, t, r, n), g.isAssignmentExpression(e))) { + var i = g.getBindingIdentifiers(e) + for (var s in i) a(i[s], t, r, n) + } + r.traverse(e, F, n) + } + function u(e) { + return g.isBreakStatement(e) + ? "break" + : g.isContinueStatement(e) + ? "continue" + : void 0 + } + var l = r(207)["default"], + c = r(948)["default"], + p = r(619)["default"], + f = r(67)["default"], + h = r(31)["default"] + t.__esModule = !0 + var d = r(323), + m = f(d), + y = r(3757), + v = r(40), + g = h(v), + E = r(1707), + b = f(E), + x = r(3909), + A = f(x), + D = r(3800), + C = f(D) + t["default"] = function() { + return { + visitor: { + VariableDeclaration: function(e, t) { + var r = e.node, + s = e.parent, + a = e.scope + if (n(r) && (i(e, s, a, !0), r._tdzThis)) { + for (var o = [r], u = 0; u < r.declarations.length; u++) { + var l = r.declarations[u] + if (l.init) { + var c = g.assignmentExpression("=", l.id, l.init) + ;(c._ignoreBlockScopingTDZ = !0), + o.push(g.expressionStatement(c)) + } + l.init = t.addHelper("temporalUndefined") + } + ;(r._blockHoist = 2), + e.isCompletionRecord() && + o.push(g.expressionStatement(a.buildUndefinedNode())), + e.replaceWithMultiple(o) + } + }, + Loop: function(e, t) { + var r = e.node, + n = e.parent, + i = e.scope + g.ensureBlock(r) + var s = new I(e, e.get("body"), n, i, t), + a = s.run() + a && e.replaceWith(a) + }, + "BlockStatement|Program": function(e, t) { + if (!g.isLoop(e.parent)) { + var r = new I(null, e, e.parent, e.scope, t) + r.run() + } + } + } + } + } + var S = C["default"]('\n if (typeof RETURN === "object") return RETURN.v;\n'), + F = { + ReferencedIdentifier: function(e, t) { + a(e, e.node, e.scope, t) + }, + AssignmentExpression: function(e, t) { + var r = e.getBindingIdentifiers() + for (var n in r) a(null, r[n], e.scope, t) + } + }, + w = m["default"].visitors.merge([ + { + Function: function(e, t) { + return e.traverse(_, t), e.skip() + } + }, + y.visitor + ]), + _ = m["default"].visitors.merge([ + { + ReferencedIdentifier: function(e, t) { + var r = t.letReferences[e.node.name] + if (r) { + var n = e.scope.getBindingIdentifier(e.node.name) + ;(n && n !== r) || (t.closurify = !0) + } + } + }, + y.visitor + ]), + T = { + enter: function(e, t) { + var r = e.node, + n = e.parent + if (e.isForStatement()) { + if (s(r.init, r)) { + var i = t.pushDeclar(r.init) + 1 === i.length + ? (r.init = i[0]) + : (r.init = g.sequenceExpression(i)) + } + } else if (e.isFor()) + s(r.left, r) && + (t.pushDeclar(r.left), (r.left = r.left.declarations[0].id)) + else if (s(r, n)) + e.replaceWithMultiple( + t.pushDeclar(r).map(function(e) { + return g.expressionStatement(e) + }) + ) + else if (e.isFunction()) return e.skip() + } + }, + P = { + LabeledStatement: function(e, t) { + var r = e.node + t.innerLabels.push(r.label.name) + } + }, + B = { + enter: function(e, t) { + if (e.isAssignmentExpression() || e.isUpdateExpression()) { + var r = e.getBindingIdentifiers() + for (var n in r) + t.outsideReferences[n] === e.scope.getBindingIdentifier(n) && + (t.reassignments[n] = !0) + } + } + }, + k = { + Loop: function(e, t) { + var r = t.ignoreLabeless + ;(t.ignoreLabeless = !0), + e.traverse(k, t), + (t.ignoreLabeless = r), + e.skip() + }, + Function: function(e) { + e.skip() + }, + SwitchCase: function(e, t) { + var r = t.inSwitchCase + ;(t.inSwitchCase = !0), e.traverse(k, t), (t.inSwitchCase = r), e.skip() + }, + "BreakStatement|ContinueStatement|ReturnStatement": function(e, t) { + var r = e.node, + n = e.parent, + i = e.scope + if (!r[this.LOOP_IGNORE]) { + var s = void 0, + a = u(r) + if (a) { + if (r.label) { + if (t.innerLabels.indexOf(r.label.name) >= 0) return + a = a + "|" + r.label.name + } else { + if (t.ignoreLabeless) return + if (t.inSwitchCase) return + if (g.isBreakStatement(r) && g.isSwitchCase(n)) return + } + ;(t.hasBreakContinue = !0), + (t.map[a] = r), + (s = g.stringLiteral(a)) + } + e.isReturnStatement() && + ((t.hasReturn = !0), + (s = g.objectExpression([ + g.objectProperty( + g.identifier("v"), + r.argument || i.buildUndefinedNode() + ) + ]))), + s && + ((s = g.returnStatement(s)), + (s[this.LOOP_IGNORE] = !0), + e.skip(), + e.replaceWith(g.inherits(s, r))) + } + } + }, + I = (function() { + function e(t, r, n, i, s) { + l(this, e), + (this.parent = n), + (this.scope = i), + (this.file = s), + (this.blockPath = r), + (this.block = r.node), + (this.outsideLetReferences = c(null)), + (this.hasLetReferences = !1), + (this.letReferences = c(null)), + (this.letReferencesDeclars = []), + (this.body = []), + t && + ((this.loopParent = t.parent), + (this.loopLabel = + g.isLabeledStatement(this.loopParent) && + this.loopParent.label), + (this.loopPath = t), + (this.loop = t.node)) + } + return ( + (e.prototype.run = function() { + var e = this.block + if (!e._letDone) { + e._letDone = !0 + var t = this.getLetReferences() + if ( + !g.isFunction(this.parent) && + !g.isProgram(this.block) && + this.hasLetReferences + ) + return ( + t ? this.wrapClosure() : this.remap(), + this.loopLabel && !g.isLabeledStatement(this.loopParent) + ? g.labeledStatement(this.loopLabel, this.loop) + : void 0 + ) + } + }), + (e.prototype.remap = function() { + var e = !1, + t = this.letReferences, + r = this.scope, + n = r.getFunctionParent(), + i = c(null) + for (var s in t) { + var a = t[s] + if (r.parentHasBinding(s) || r.hasGlobal(s)) { + var u = r.generateUidIdentifier(a.name).name + ;(a.name = u), + (e = !0), + (i[s] = i[u] = { binding: a, uid: u }) + } + n !== r && r.removeOwnBinding(a.name) + } + if (n !== r) + for ( + var l = this.letReferencesDeclars, p = 0; + p < l.length; + p++ + ) { + var f = l[p] + n.registerBinding("var", f) + } + if (e) { + var h = this.loop + h && + (o(h.right, h, r, i), + o(h.test, h, r, i), + o(h.update, h, r, i)), + this.blockPath.traverse(F, i) + } + }), + (e.prototype.wrapClosure = function() { + var e = this.block, + t = this.outsideLetReferences + if (this.loop) + for (var r in t) { + var n = t[r] + ;(this.scope.hasGlobal(n.name) || + this.scope.parentHasBinding(n.name)) && + (delete t[n.name], + delete this.letReferences[n.name], + this.scope.rename(n.name), + (this.letReferences[n.name] = n), + (t[n.name] = n)) + } + ;(this.has = this.checkLoop()), this.hoistVarDeclarations() + var i = b["default"](t), + s = b["default"](t), + a = g.functionExpression(null, i, g.blockStatement(e.body)) + ;(a.shadow = !0), this.addContinuations(a), (e.body = this.body) + var o = a + this.loop && + ((o = this.scope.generateUidIdentifier("loop")), + this.loopPath.insertBefore( + g.variableDeclaration("var", [g.variableDeclarator(o, a)]) + )) + var u = g.callExpression(o, s), + l = this.scope.generateUidIdentifier("ret"), + c = m["default"].hasType( + a.body, + this.scope, + "YieldExpression", + g.FUNCTION_TYPES + ) + c && ((a.generator = !0), (u = g.yieldExpression(u, !0))) + var p = m["default"].hasType( + a.body, + this.scope, + "AwaitExpression", + g.FUNCTION_TYPES + ) + p && ((a.async = !0), (u = g.awaitExpression(u))), + this.buildClosure(l, u) + }), + (e.prototype.buildClosure = function(e, t) { + var r = this.has + r.hasReturn || r.hasBreakContinue + ? this.buildHas(e, t) + : this.body.push(g.expressionStatement(t)) + }), + (e.prototype.addContinuations = function(e) { + var t = { + reassignments: {}, + outsideReferences: this.outsideLetReferences + } + this.scope.traverse(e, B, t) + for (var r = 0; r < e.params.length; r++) { + var n = e.params[r] + if (t.reassignments[n.name]) { + var i = this.scope.generateUidIdentifier(n.name) + ;(e.params[r] = i), + this.scope.rename(n.name, i.name, e), + e.body.body.push( + g.expressionStatement( + g.assignmentExpression("=", n, i) + ) + ) + } + } + }), + (e.prototype.getLetReferences = function() { + var e = this.block, + t = [] + if (this.loop) { + var r = this.loop.left || this.loop.init + n(r) && + (t.push(r), + A["default"]( + this.outsideLetReferences, + g.getBindingIdentifiers(r) + )) + } + if (e.body) + for (var s = 0; s < e.body.length; s++) { + var a = e.body[s] + if ( + g.isClassDeclaration(a) || + g.isFunctionDeclaration(a) || + n(a) + ) { + var o = this.blockPath.get("body")[s] + n(a) && + (i(o, e, this.scope), + this.letReferencesDeclars.push(o)), + (t = t.concat(a.declarations || a)) + } + } + for (var s = 0; s < t.length; s++) { + var a = t[s], + u = g.getBindingIdentifiers(a) + A["default"](this.letReferences, u), + (this.hasLetReferences = !0) + } + if (this.hasLetReferences) { + var l = { + letReferences: this.letReferences, + closurify: !1, + file: this.file + } + return this.blockPath.traverse(w, l), l.closurify + } + }), + (e.prototype.checkLoop = function() { + var e = { + hasBreakContinue: !1, + ignoreLabeless: !1, + inSwitchCase: !1, + innerLabels: [], + hasReturn: !1, + isLoop: !!this.loop, + map: {}, + LOOP_IGNORE: p() + } + return ( + this.blockPath.traverse(P, e), this.blockPath.traverse(k, e), e + ) + }), + (e.prototype.hoistVarDeclarations = function() { + this.blockPath.traverse(T, this) + }), + (e.prototype.pushDeclar = function(e) { + var t = [], + r = g.getBindingIdentifiers(e) + for (var n in r) t.push(g.variableDeclarator(r[n])) + this.body.push(g.variableDeclaration(e.kind, t)) + for (var i = [], s = 0; s < e.declarations.length; s++) { + var a = e.declarations[s] + if (a.init) { + var o = g.assignmentExpression("=", a.id, a.init) + i.push(g.inherits(o, a)) + } + } + return i + }), + (e.prototype.buildHas = function(e, t) { + var r = this.body + r.push(g.variableDeclaration("var", [g.variableDeclarator(e, t)])) + var n = void 0, + i = this.has, + s = [] + if ((i.hasReturn && (n = S({ RETURN: e })), i.hasBreakContinue)) { + for (var a in i.map) + s.push(g.switchCase(g.stringLiteral(a), [i.map[a]])) + if ( + (i.hasReturn && s.push(g.switchCase(null, [n])), + 1 === s.length) + ) { + var o = s[0] + r.push( + g.ifStatement( + g.binaryExpression("===", e, o.test), + o.consequent[0] + ) + ) + } else { + for (var u = 0; u < s.length; u++) { + var l = s[u].consequent[0] + g.isBreakStatement(l) && + !l.label && + (l.label = this.loopLabel = + this.loopLabel || + this.scope.generateUidIdentifier("loop")) + } + r.push(g.switchStatement(e, s)) + } + } else i.hasReturn && r.push(n) + }), + e + ) + })() + e.exports = t["default"] + }, + [7341, 3775], + [7363, 621, 208, 3779], + 466, + 468, + [7468, 3903], + 563, + [7471, 965, 624, 126], + [7479, 965, 211], + [7488, 3869, 1695, 3885], + function(e, t, r) { + "use strict" + var n = r(498)["default"], + i = r(32)["default"] + t.__esModule = !0 + var s = r(3913), + a = i(s), + o = r(1709), + u = i(o), + l = r(971), + c = i(l) + ;(t["default"] = function(e) { + var t = e.types, + r = n() + return { + visitor: { + ExportDefaultDeclaration: function(e) { + if (e.get("declaration").isClassDeclaration()) { + var r = e.node, + n = + r.declaration.id || + e.scope.generateUidIdentifier("class") + ;(r.declaration.id = n), + e.replaceWith(r.declaration), + e.insertAfter(t.exportDefaultDeclaration(n)) + } + }, + ClassDeclaration: function(e) { + var r = e.node, + n = r.id || e.scope.generateUidIdentifier("class") + e.replaceWith( + t.variableDeclaration("let", [ + t.variableDeclarator(n, t.toExpression(r)) + ]) + ) + }, + ClassExpression: function(e, t) { + var n = e.node + if (!n[r]) { + var i = c["default"](e) + if (i && i !== n) return e.replaceWith(i) + n[r] = !0 + var s = u["default"] + t.opts.loose && (s = a["default"]), + e.replaceWith(new s(e, t.file).run()) + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7475, 630], + 99, + [7330, 23], + 466, + 468, + 563, + 148, + [7480, 1739, 502, 635], + [7491, 1739, 991, 404, 4079], + [7468, 4147], + [7491, 638, 996, 127, 4143], + function(e, t, r) { + "use strict" + var n = r(4156)["default"] + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e) { + return o.isObjectProperty(e) + ? e.value + : o.isObjectMethod(e) + ? o.functionExpression(null, e.params, e.body, e.generator, e.async) + : void 0 + } + function r(e, r, n) { + "get" === r.kind && "set" === r.kind + ? i(e, r, n) + : n.push( + o.expressionStatement( + o.assignmentExpression( + "=", + o.memberExpression( + e, + r.key, + r.computed || o.isLiteral(r.key) + ), + t(r) + ) + ) + ) + } + function i(e, r) { + var n = (e.objId, e.body), + i = e.getMutatorId, + s = e.scope, + a = + !r.computed && o.isIdentifier(r.key) + ? o.stringLiteral(r.key.name) + : r.key, + u = s.maybeGenerateMemoised(a) + u && + (n.push(o.expressionStatement(o.assignmentExpression("=", u, a))), + (a = u)), + n.push.apply( + n, + l({ + MUTATOR_MAP_REF: i(), + KEY: a, + VALUE: t(r), + KIND: o.identifier(r.kind) + }) + ) + } + function s(e) { + for ( + var t = e.computedProps, + s = Array.isArray(t), + a = 0, + t = s ? t : n(t); + ; + + ) { + var o + if (s) { + if (a >= t.length) break + o = t[a++] + } else { + if (((a = t.next()), a.done)) break + o = a.value + } + var u = o + "get" === u.kind || "set" === u.kind + ? i(e, u) + : r(e.objId, u, e.body) + } + } + function a(e) { + for ( + var s = e.objId, + a = e.body, + u = e.computedProps, + l = e.state, + c = u, + p = Array.isArray(c), + f = 0, + c = p ? c : n(c); + ; + + ) { + var h + if (p) { + if (f >= c.length) break + h = c[f++] + } else { + if (((f = c.next()), f.done)) break + h = f.value + } + var d = h, + m = o.toComputedKey(d) + if ("get" === d.kind || "set" === d.kind) i(e, d) + else if (o.isStringLiteral(m, { value: "__proto__" })) r(s, d, a) + else { + if (1 === u.length) + return o.callExpression(l.addHelper("defineProperty"), [ + e.initPropExpression, + m, + t(d) + ]) + a.push( + o.expressionStatement( + o.callExpression(l.addHelper("defineProperty"), [ + s, + m, + t(d) + ]) + ) + ) + } + } + } + var o = e.types, + u = e.template, + l = u( + "\n MUTATOR_MAP_REF[KEY] = MUTATOR_MAP_REF[KEY] || {};\n MUTATOR_MAP_REF[KEY].KIND = VALUE;\n " + ) + return { + visitor: { + ObjectExpression: { + exit: function(e, t) { + for ( + var r = e.node, + i = e.parent, + u = e.scope, + l = !1, + c = r.properties, + p = 0; + p < c.length; + p++ + ) { + var f = c[p] + if ((l = f.computed === !0)) break + } + if (l) { + for ( + var h = [], + d = [], + m = !1, + y = r.properties, + v = Array.isArray(y), + g = 0, + y = v ? y : n(y); + ; + + ) { + var E + if (v) { + if (g >= y.length) break + E = y[g++] + } else { + if (((g = y.next()), g.done)) break + E = g.value + } + var f = E + f.computed && (m = !0), m ? d.push(f) : h.push(f) + } + var b = u.generateUidIdentifierBasedOnNode(i), + x = o.objectExpression(h), + A = [] + A.push( + o.variableDeclaration("var", [ + o.variableDeclarator(b, x) + ]) + ) + var D = a + t.opts.loose && (D = s) + var C = void 0, + S = function() { + return ( + C || + ((C = u.generateUidIdentifier( + "mutatorMap" + )), + A.push( + o.variableDeclaration("var", [ + o.variableDeclarator( + C, + o.objectExpression([]) + ) + ]) + )), + C + ) + }, + F = D({ + scope: u, + objId: b, + body: A, + computedProps: d, + initPropExpression: x, + getMutatorId: S, + state: t + }) + C && + A.push( + o.expressionStatement( + o.callExpression( + t.addHelper( + "defineEnumerableProperties" + ), + [b, C] + ) + ) + ), + F + ? e.replaceWith(F) + : (A.push(o.expressionStatement(b)), + e.replaceWithMultiple(A)) + } + } + } + } + } + }), + (e.exports = t["default"]) + }, + 468, + 81, + function(e, t, r) { + "use strict" + var n = r(4182)["default"] + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e) { + for (var t = e.declarations, r = 0; r < t.length; r++) { + var n = t[r] + if (i.isPattern(n.id)) return !0 + } + return !1 + } + function r(e) { + for (var t = e.elements, r = 0; r < t.length; r++) { + var n = t[r] + if (i.isRestElement(n)) return !0 + } + return !1 + } + var i = e.types, + s = { + ReferencedIdentifier: function(e, t) { + t.bindings[e.node.name] && ((t.deopt = !0), e.stop()) + } + }, + a = (function() { + function e(t) { + n(this, e), + (this.blockHoist = t.blockHoist), + (this.operator = t.operator), + (this.arrays = {}), + (this.nodes = t.nodes || []), + (this.scope = t.scope), + (this.file = t.file), + (this.kind = t.kind) + } + return ( + (e.prototype.buildVariableAssignment = function(e, t) { + var r = this.operator + i.isMemberExpression(e) && (r = "=") + var n = void 0 + return ( + (n = r + ? i.expressionStatement( + i.assignmentExpression(r, e, t) + ) + : i.variableDeclaration(this.kind, [ + i.variableDeclarator(e, t) + ])), + (n._blockHoist = this.blockHoist), + n + ) + }), + (e.prototype.buildVariableDeclaration = function(e, t) { + var r = i.variableDeclaration("var", [ + i.variableDeclarator(e, t) + ]) + return (r._blockHoist = this.blockHoist), r + }), + (e.prototype.push = function(e, t) { + i.isObjectPattern(e) + ? this.pushObjectPattern(e, t) + : i.isArrayPattern(e) + ? this.pushArrayPattern(e, t) + : i.isAssignmentPattern(e) + ? this.pushAssignmentPattern(e, t) + : this.nodes.push(this.buildVariableAssignment(e, t)) + }), + (e.prototype.toArray = function(e, t) { + return this.file.opts.loose || + (i.isIdentifier(e) && this.arrays[e.name]) + ? e + : this.scope.toArray(e, t) + }), + (e.prototype.pushAssignmentPattern = function(e, t) { + var r = this.scope.generateUidIdentifierBasedOnNode(t), + n = i.variableDeclaration("var", [ + i.variableDeclarator(r, t) + ]) + ;(n._blockHoist = this.blockHoist), this.nodes.push(n) + var s = i.conditionalExpression( + i.binaryExpression( + "===", + r, + i.identifier("undefined") + ), + e.right, + r + ), + a = e.left + if (i.isPattern(a)) { + var o = i.expressionStatement( + i.assignmentExpression("=", r, s) + ) + ;(o._blockHoist = this.blockHoist), + this.nodes.push(o), + this.push(a, r) + } else this.nodes.push(this.buildVariableAssignment(a, s)) + }), + (e.prototype.pushObjectRest = function(e, t, r, n) { + for (var s = [], a = 0; a < e.properties.length; a++) { + var o = e.properties[a] + if (a >= n) break + if (!i.isRestProperty(o)) { + var u = o.key + i.isIdentifier(u) && + !o.computed && + (u = i.stringLiteral(o.key.name)), + s.push(u) + } + } + s = i.arrayExpression(s) + var l = i.callExpression( + this.file.addHelper("objectWithoutProperties"), + [t, s] + ) + this.nodes.push(this.buildVariableAssignment(r.argument, l)) + }), + (e.prototype.pushObjectProperty = function(e, t) { + i.isLiteral(e.key) && (e.computed = !0) + var r = e.value, + n = i.memberExpression(t, e.key, e.computed) + i.isPattern(r) + ? this.push(r, n) + : this.nodes.push(this.buildVariableAssignment(r, n)) + }), + (e.prototype.pushObjectPattern = function(e, t) { + if ( + (e.properties.length || + this.nodes.push( + i.expressionStatement( + i.callExpression( + this.file.addHelper( + "objectDestructuringEmpty" + ), + [t] + ) + ) + ), + e.properties.length > 1 && !this.scope.isStatic(t)) + ) { + var r = this.scope.generateUidIdentifierBasedOnNode(t) + this.nodes.push(this.buildVariableDeclaration(r, t)), + (t = r) + } + for (var n = 0; n < e.properties.length; n++) { + var s = e.properties[n] + i.isRestProperty(s) + ? this.pushObjectRest(e, t, s, n) + : this.pushObjectProperty(s, t) + } + }), + (e.prototype.canUnpackArrayPattern = function(e, t) { + if (!i.isArrayExpression(t)) return !1 + if (!(e.elements.length > t.elements.length)) { + if (e.elements.length < t.elements.length && !r(e)) + return !1 + for (var n = e.elements, a = 0; a < n.length; a++) { + var o = n[a] + if (!o) return !1 + if (i.isMemberExpression(o)) return !1 + } + for (var u = t.elements, l = 0; l < u.length; l++) { + var o = u[l] + if (i.isSpreadElement(o)) return !1 + } + var c = i.getBindingIdentifiers(e), + p = { deopt: !1, bindings: c } + return this.scope.traverse(t, s, p), !p.deopt + } + }), + (e.prototype.pushUnpackedArrayPattern = function(e, t) { + for (var r = 0; r < e.elements.length; r++) { + var n = e.elements[r] + i.isRestElement(n) + ? this.push( + n.argument, + i.arrayExpression(t.elements.slice(r)) + ) + : this.push(n, t.elements[r]) + } + }), + (e.prototype.pushArrayPattern = function(e, t) { + if (e.elements) { + if (this.canUnpackArrayPattern(e, t)) + return this.pushUnpackedArrayPattern(e, t) + var n = !r(e) && e.elements.length, + s = this.toArray(t, n) + i.isIdentifier(s) + ? (t = s) + : ((t = this.scope.generateUidIdentifierBasedOnNode( + t + )), + (this.arrays[t.name] = !0), + this.nodes.push( + this.buildVariableDeclaration(t, s) + )) + for (var a = 0; a < e.elements.length; a++) { + var o = e.elements[a] + if (o) { + var u = void 0 + i.isRestElement(o) + ? ((u = this.toArray(t)), + a > 0 && + (u = i.callExpression( + i.memberExpression( + u, + i.identifier("slice") + ), + [i.numericLiteral(a)] + )), + (o = o.argument)) + : (u = i.memberExpression( + t, + i.numericLiteral(a), + !0 + )), + this.push(o, u) + } + } + } + }), + (e.prototype.init = function(e, t) { + if (!i.isArrayExpression(t) && !i.isMemberExpression(t)) { + var r = this.scope.maybeGenerateMemoised(t, !0) + r && + (this.nodes.push( + this.buildVariableDeclaration(r, t) + ), + (t = r)) + } + return this.push(e, t), this.nodes + }), + e + ) + })() + return { + visitor: { + ExportNamedDeclaration: function(e) { + var r = e.get("declaration") + if (r.isVariableDeclaration() && t(r.node)) { + var n = [] + for (var s in e.getOuterBindingIdentifiers(e)) { + var a = i.identifier(s) + n.push(i.exportSpecifier(a, a)) + } + e.replaceWith(r.node), + e.insertAfter(i.exportNamedDeclaration(null, n)) + } + }, + ForXStatement: function(e, t) { + var r = e.node, + n = e.scope, + s = r.left + if (i.isPattern(s)) { + var o = n.generateUidIdentifier("ref") + return ( + (r.left = i.variableDeclaration("var", [ + i.variableDeclarator(o) + ])), + e.ensureBlock(), + void r.body.body.unshift( + i.variableDeclaration("var", [ + i.variableDeclarator(s, o) + ]) + ) + ) + } + if (i.isVariableDeclaration(s)) { + var u = s.declarations[0].id + if (i.isPattern(u)) { + var l = n.generateUidIdentifier("ref") + r.left = i.variableDeclaration(s.kind, [ + i.variableDeclarator(l, null) + ]) + var c = [], + p = new a({ + kind: s.kind, + file: t, + scope: n, + nodes: c + }) + p.init(u, l), e.ensureBlock() + var f = r.body + f.body = c.concat(f.body) + } + } + }, + CatchClause: function(e, t) { + var r = e.node, + n = e.scope, + s = r.param + if (i.isPattern(s)) { + var o = n.generateUidIdentifier("ref") + r.param = o + var u = [], + l = new a({ kind: "let", file: t, scope: n, nodes: u }) + l.init(s, o), (r.body.body = u.concat(r.body.body)) + } + }, + AssignmentExpression: function(e, t) { + var r = e.node, + n = e.scope + if (i.isPattern(r.left)) { + var s = [], + o = new a({ + operator: r.operator, + file: t, + scope: n, + nodes: s + }), + u = void 0 + ;(!e.isCompletionRecord() && + e.parentPath.isExpressionStatement()) || + ((u = n.generateUidIdentifierBasedOnNode( + r.right, + "ref" + )), + s.push( + i.variableDeclaration("var", [ + i.variableDeclarator(u, r.right) + ]) + ), + i.isArrayExpression(r.right) && + (o.arrays[u.name] = !0)), + o.init(r.left, u || r.right), + u && s.push(i.expressionStatement(u)), + e.replaceWithMultiple(s) + } + }, + VariableDeclaration: function(e, r) { + var n = e.node, + s = e.scope, + o = e.parent + if (!i.isForXStatement(o) && o && e.container && t(n)) { + for ( + var u = [], l = void 0, c = 0; + c < n.declarations.length; + c++ + ) { + l = n.declarations[c] + var p = l.init, + f = l.id, + h = new a({ + blockHoist: n._blockHoist, + nodes: u, + scope: s, + kind: n.kind, + file: r + }) + i.isPattern(f) + ? (h.init(f, p), + +c !== n.declarations.length - 1 && + i.inherits(u[u.length - 1], l)) + : u.push( + i.inherits( + h.buildVariableAssignment(l.id, l.init), + l + ) + ) + } + e.replaceWithMultiple(u) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e) { + var t = e.node, + r = e.scope, + n = [], + i = t.right + if (!a.isIdentifier(i) || !r.hasBinding(i.name)) { + var s = r.generateUidIdentifier("arr") + n.push(a.variableDeclaration("var", [a.variableDeclarator(s, i)])), + (i = s) + } + var u = r.generateUidIdentifier("i"), + l = o({ BODY: t.body, KEY: u, ARR: i }) + a.inherits(l, t), a.ensureBlock(l) + var c = a.memberExpression(i, u, !0), + p = t.left + return ( + a.isVariableDeclaration(p) + ? ((p.declarations[0].init = c), l.body.body.unshift(p)) + : l.body.body.unshift( + a.expressionStatement(a.assignmentExpression("=", p, c)) + ), + e.parentPath.isLabeledStatement() && + (l = a.labeledStatement(e.parentPath.node.label, l)), + n.push(l), + n + ) + } + function r(e, t) { + var r = e.node, + n = e.scope, + s = r.left, + o = void 0, + l = void 0 + if (a.isIdentifier(s) || a.isPattern(s) || a.isMemberExpression(s)) + l = s + else { + if (!a.isVariableDeclaration(s)) + throw t.buildCodeFrameError(s, i.get("unknownForHead", s.type)) + ;(l = n.generateUidIdentifier("ref")), + (o = a.variableDeclaration(s.kind, [ + a.variableDeclarator(s.declarations[0].id, l) + ])) + } + var c = n.generateUidIdentifier("iterator"), + p = n.generateUidIdentifier("isArray"), + f = u({ + LOOP_OBJECT: c, + IS_ARRAY: p, + OBJECT: r.right, + INDEX: n.generateUidIdentifier("i"), + ID: l + }) + return o || f.body.body.shift(), { declar: o, node: f, loop: f } + } + function n(e, t) { + var r = e.node, + n = e.scope, + s = e.parent, + o = r.left, + u = void 0, + c = n.generateUidIdentifier("step"), + p = a.memberExpression(c, a.identifier("value")) + if (a.isIdentifier(o) || a.isPattern(o) || a.isMemberExpression(o)) + u = a.expressionStatement(a.assignmentExpression("=", o, p)) + else { + if (!a.isVariableDeclaration(o)) + throw t.buildCodeFrameError(o, i.get("unknownForHead", o.type)) + u = a.variableDeclaration(o.kind, [ + a.variableDeclarator(o.declarations[0].id, p) + ]) + } + var f = n.generateUidIdentifier("iterator"), + h = l({ + ITERATOR_HAD_ERROR_KEY: n.generateUidIdentifier( + "didIteratorError" + ), + ITERATOR_COMPLETION: n.generateUidIdentifier( + "iteratorNormalCompletion" + ), + ITERATOR_ERROR_KEY: n.generateUidIdentifier("iteratorError"), + ITERATOR_KEY: f, + STEP_KEY: c, + OBJECT: r.right, + BODY: null + }), + d = a.isLabeledStatement(s), + m = h[3].block.body, + y = m[0] + return ( + d && (m[0] = a.labeledStatement(s.label, y)), + { replaceParent: d, declar: u, loop: y, node: h } + ) + } + var i = e.messages, + s = e.template, + a = e.types, + o = s("\n for (var KEY = 0; KEY < ARR.length; KEY++) BODY;\n "), + u = s( + "\n for (var LOOP_OBJECT = OBJECT,\n IS_ARRAY = Array.isArray(LOOP_OBJECT),\n INDEX = 0,\n LOOP_OBJECT = IS_ARRAY ? LOOP_OBJECT : LOOP_OBJECT[Symbol.iterator]();;) {\n var ID;\n if (IS_ARRAY) {\n if (INDEX >= LOOP_OBJECT.length) break;\n ID = LOOP_OBJECT[INDEX++];\n } else {\n INDEX = LOOP_OBJECT.next();\n if (INDEX.done) break;\n ID = INDEX.value;\n }\n }\n " + ), + l = s( + "\n var ITERATOR_COMPLETION = true;\n var ITERATOR_HAD_ERROR_KEY = false;\n var ITERATOR_ERROR_KEY = undefined;\n try {\n for (var ITERATOR_KEY = OBJECT[Symbol.iterator](), STEP_KEY; !(ITERATOR_COMPLETION = (STEP_KEY = ITERATOR_KEY.next()).done); ITERATOR_COMPLETION = true) {\n }\n } catch (err) {\n ITERATOR_HAD_ERROR_KEY = true;\n ITERATOR_ERROR_KEY = err;\n } finally {\n try {\n if (!ITERATOR_COMPLETION && ITERATOR_KEY.return) {\n ITERATOR_KEY.return();\n }\n } finally {\n if (ITERATOR_HAD_ERROR_KEY) {\n throw ITERATOR_ERROR_KEY;\n }\n }\n }\n " + ) + return { + visitor: { + ForOfStatement: function(e, i) { + if (e.get("right").isArrayExpression()) + return e.replaceWithMultiple(t.call(this, e, i)) + var s = n + i.opts.loose && (s = r) + var o = e.node, + u = s(e, i), + l = u.declar, + c = u.loop, + p = c.body + e.ensureBlock(), + l && p.body.push(l), + (p.body = p.body.concat(o.body.body)), + a.inherits(c, o), + a.inherits(c.body, o.body), + u.replaceParent + ? (e.parentPath.replaceWithMultiple(u.node), e.remove()) + : e.replaceWithMultiple(u.node) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(19)["default"] + t.__esModule = !0 + var i = r(4183), + s = n(i) + ;(t["default"] = function() { + return { + visitor: { + "ArrowFunctionExpression|FunctionExpression": { + exit: function(e) { + if ("value" !== e.key && !e.parentPath.isObjectProperty()) { + var t = s["default"](e) + t && e.replaceWith(t) + } + } + }, + ObjectProperty: function(e) { + var t = e.get("value") + if (t.isFunction()) { + var r = s["default"](t) + r && t.replaceWith(r) + } + } + } + } + }), + (e.exports = t["default"]) + }, + 563, + 148, + [7480, 1777, 506, 647], + [7491, 1777, 1010, 408, 4279], + 581, + [7363, 652, 217, 4310], + 466, + 468, + [7455, 1817], + [7468, 4429], + [7471, 1028, 1029, 128], + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + visitor: { + NumericLiteral: function(e) { + var t = e.node + t.extra && /^0[ob]/i.test(t.extra.raw) && (t.extra = void 0) + }, + StringLiteral: function(e) { + var t = e.node + t.extra && /\\[u]/gi.test(t.extra.raw) && (t.extra = void 0) + } + } + } + }), + (e.exports = t["default"]) + }, + [7363, 659, 222, 4461], + 466, + 468, + [7468, 4583], + 563, + [7471, 1049, 662, 129], + [7479, 1049, 225], + [7334, 4601], + 581, + [7363, 668, 227, 4612], + 466, + 468, + 563, + 148, + [7491, 1878, 1067, 418, 4700], + [7455, 1904], + [7468, 4810], + [7471, 1077, 1078, 130], + [7455, 1930], + [7468, 4920], + [7471, 1085, 1086, 131], + 581, + [7363, 681, 234, 4945], + 466, + 468, + [7468, 5067], + 563, + [7471, 1103, 684, 132], + [7479, 1103, 237], + [7363, 688, 240, 5099], + 466, + 468, + [7468, 5221], + 563, + [7471, 1124, 691, 133], + [7479, 1124, 243], + function(e, t, r) { + "use strict" + var n = r(701)["default"], + i = r(70)["default"] + t.__esModule = !0 + var s = r(5231), + a = i(s) + ;(t["default"] = function(e) { + function t(e, t, r, n, i) { + var s = new a["default"]({ + getObjectRef: n, + methodNode: t, + methodPath: e, + isStatic: !0, + scope: r, + file: i + }) + s.replace() + } + var r = e.types, + i = n() + return { + visitor: { + Super: function(e) { + var t = e.findParent(function(e) { + return e.isObjectExpression() + }) + t && (t.node[i] = !0) + }, + ObjectExpression: { + exit: function(e, n) { + if (e.node[i]) { + for ( + var s = void 0, + a = function() { + return (s = + s || e.scope.generateUidIdentifier("obj")) + }, + o = e.get("properties"), + u = 0; + u < o.length; + u++ + ) { + var l = o[u] + l.isObjectProperty() && (l = l.get("value")), + t(l, l.node, e.scope, a, n) + } + s && + (e.scope.push({ id: s }), + e.replaceWith(r.assignmentExpression("=", s, e.node))) + } + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7330, 34], + 148, + [7480, 2019, 523, 696], + [7491, 2019, 1130, 429, 5294], + [7468, 5362], + [7491, 699, 1135, 134, 5358], + [7341, 5388], + [7363, 703, 251, 5392], + 466, + 468, + function(e, t, r) { + "use strict" + var n = r(24)["default"] + t.__esModule = !0 + var i = r(343), + s = r(5414), + a = n(s), + o = r(5413), + u = n(o), + l = r(5415), + c = n(l) + ;(t["default"] = function() { + return { + visitor: i.visitors.merge([ + { + ArrowFunctionExpression: function(e) { + for (var t = e.get("params"), r = 0; r < t.length; r++) { + var n = t[r] + if (n.isRestElement() || n.isAssignmentPattern()) { + e.arrowFunctionToShadowed() + break + } + } + } + }, + a.visitor, + c.visitor, + u.visitor + ]) + } + }), + (e.exports = t["default"]) + }, + [7363, 707, 253, 5440], + 466, + 468, + 563, + 148, + [7480, 2074, 527, 710], + [7491, 2074, 1167, 435, 5554], + [7468, 5622], + [7491, 713, 1172, 135, 5618], + function(e, t, r) { + "use strict" + var n = r(43)["default"] + t.__esModule = !0 + var i = r(60), + s = n(i) + ;(t["default"] = function() { + return { + visitor: { + ObjectMethod: function(e) { + var t = e.node + "method" === t.kind && + e.replaceWith( + s.objectProperty( + t.key, + s.functionExpression( + null, + t.params, + t.body, + t.generator, + t.async + ), + t.computed + ) + ) + }, + ObjectProperty: function(e) { + var t = e.node + t.shorthand && (t.shorthand = !1) + } + } + } + }), + (e.exports = t["default"]) + }, + [7363, 717, 259, 5652], + 466, + 468, + [7455, 2130], + [7468, 5771], + [7471, 1190, 1191, 136], + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e, t, r) { + return r.opts.loose && + !i.isIdentifier(e.argument, { name: "arguments" }) + ? e.argument + : t.toArray(e.argument, !0) + } + function r(e) { + for (var t = 0; t < e.length; t++) + if (i.isSpreadElement(e[t])) return !0 + return !1 + } + function n(e, r, n) { + function s() { + o.length && (a.push(i.arrayExpression(o)), (o = [])) + } + for (var a = [], o = [], u = 0; u < e.length; u++) { + var l = e[u] + i.isSpreadElement(l) ? (s(), a.push(t(l, r, n))) : o.push(l) + } + return s(), a + } + var i = e.types + return { + visitor: { + ArrayExpression: function(e, t) { + var s = e.node, + a = e.scope, + o = s.elements + if (r(o)) { + var u = n(o, a, t), + l = u.shift() + i.isArrayExpression(l) || + (u.unshift(l), (l = i.arrayExpression([]))), + e.replaceWith( + i.callExpression( + i.memberExpression(l, i.identifier("concat")), + u + ) + ) + } + }, + CallExpression: function(e, t) { + var s = e.node, + a = e.scope, + o = s.arguments + if (r(o)) { + var u = e.get("callee") + if (!u.isSuper()) { + var l = i.identifier("undefined") + s.arguments = [] + var c = void 0 + c = + 1 === o.length && "arguments" === o[0].argument.name + ? [o[0].argument] + : n(o, a, t) + var p = c.shift() + c.length + ? s.arguments.push( + i.callExpression( + i.memberExpression( + p, + i.identifier("concat") + ), + c + ) + ) + : s.arguments.push(p) + var f = s.callee + if (u.isMemberExpression()) { + var h = a.maybeGenerateMemoised(f.object) + h + ? ((f.object = i.assignmentExpression( + "=", + h, + f.object + )), + (l = h)) + : (l = f.object), + i.appendToMemberExpression( + f, + i.identifier("apply") + ) + } else + s.callee = i.memberExpression( + s.callee, + i.identifier("apply") + ) + i.isSuper(l) && (l = i.thisExpression()), + s.arguments.unshift(l) + } + } + }, + NewExpression: function(e, t) { + var s = e.node, + a = e.scope, + o = s.arguments + if (r(o)) { + var u = n(o, a, t), + l = i.arrayExpression([i.nullLiteral()]) + ;(o = i.callExpression( + i.memberExpression(l, i.identifier("concat")), + u + )), + e.replaceWith( + i.newExpression( + i.callExpression( + i.memberExpression( + i.memberExpression( + i.memberExpression( + i.identifier("Function"), + i.identifier("prototype") + ), + i.identifier("bind") + ), + i.identifier("apply") + ), + [s.callee, o] + ), + [] + ) + ) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(35)["default"] + t.__esModule = !0 + var i = r(5781), + s = n(i), + a = r(51), + o = n(a) + ;(t["default"] = function() { + return { + visitor: { + RegExpLiteral: function(e) { + var t = e.node + s.is(t, "y") && + e.replaceWith( + o.newExpression(o.identifier("RegExp"), [ + o.stringLiteral(t.pattern), + o.stringLiteral(t.flags) + ]) + ) + } + } + } + }), + (e.exports = t["default"]) + }, + [7363, 725, 264, 5806], + 466, + 468, + [7455, 2168], + [7468, 5925], + [7471, 1208, 1209, 137], + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e) { + return n.isLiteral(e) && "string" == typeof e.value + } + function r(e, t) { + return n.binaryExpression("+", e, t) + } + var n = e.types + return { + visitor: { + TaggedTemplateExpression: function(e, t) { + for ( + var r = e.node, + i = r.quasi, + s = [], + a = [], + o = [], + u = i.quasis, + l = 0; + l < u.length; + l++ + ) { + var c = u[l] + a.push(n.stringLiteral(c.value.cooked)), + o.push(n.stringLiteral(c.value.raw)) + } + ;(a = n.arrayExpression(a)), (o = n.arrayExpression(o)) + var p = "taggedTemplateLiteral" + t.opts.loose && (p += "Loose") + var f = t.file.addTemplateObject(p, a, o) + s.push(f), + (s = s.concat(i.expressions)), + e.replaceWith(n.callExpression(r.tag, s)) + }, + TemplateLiteral: function(e, i) { + for ( + var s = [], + a = e.get("expressions"), + o = e.node.quasis, + u = 0; + u < o.length; + u++ + ) { + var l = o[u] + s.push(n.stringLiteral(l.value.cooked)) + var c = a.shift() + c && + (!i.opts.spec || + c.isBaseType("string") || + c.isBaseType("number") + ? s.push(c.node) + : s.push( + n.callExpression(n.identifier("String"), [ + c.node + ]) + )) + } + if ( + ((s = s.filter(function(e) { + return !n.isLiteral(e, { value: "" }) + })), + t(s[0]) || t(s[1]) || s.unshift(n.stringLiteral("")), + s.length > 1) + ) { + for ( + var p = r(s.shift(), s.shift()), f = 0; + f < s.length; + f++ + ) { + var h = s[f] + p = r(p, h) + } + e.replaceWith(p) + } else e.replaceWith(s[0]) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(5935)["default"] + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types, + r = n() + return { + visitor: { + Scope: function(e) { + var t = e.scope + t.getBinding("Symbol") && t.rename("Symbol") + }, + UnaryExpression: function(e) { + var n = e.node, + i = e.parent + if ( + !n[r] && + !e.find(function(e) { + return e.node && !!e.node._generated + }) + ) { + if ( + e.parentPath.isBinaryExpression() && + t.EQUALITY_BINARY_OPERATORS.indexOf(i.operator) >= 0 + ) { + var s = e.getOpposite() + if ( + s.isLiteral() && + "symbol" !== s.node.value && + "object" !== s.node.value + ) + return + } + if ("typeof" === n.operator) { + var a = t.callExpression(this.addHelper("typeof"), [ + n.argument + ]) + if (e.get("argument").isIdentifier()) { + var o = t.stringLiteral("undefined"), + u = t.unaryExpression("typeof", n.argument) + ;(u[r] = !0), + e.replaceWith( + t.conditionalExpression( + t.binaryExpression("===", u, o), + o, + a + ) + ) + } else e.replaceWith(a) + } + } + } + } + } + }), + (e.exports = t["default"]) + }, + 466, + function(e, t, r) { + "use strict" + var n = r(71)["default"], + i = r(36)["default"] + t.__esModule = !0 + var s = r(6109), + a = n(s), + o = r(5954), + u = i(o) + ;(t["default"] = function() { + return { + visitor: { + RegExpLiteral: function(e) { + var t = e.node + u.is(t, "u") && + ((t.pattern = a["default"](t.pattern, t.flags)), + u.pullFlag(t, "u")) + } + } + } + }), + (e.exports = t["default"]) + }, + [7455, 2202], + [7468, 6055], + [7471, 1218, 1219, 138], + [7363, 738, 272, 6085], + 466, + 468, + [7468, 6258], + 563, + [7471, 1238, 741, 139], + [7479, 1238, 275], + [7488, 6224, 2236, 6240], + 581, + [7363, 747, 277, 6285], + 466, + 468, + [7455, 2287], + [7468, 6407], + [7471, 1257, 1258, 140], + [7363, 753, 282, 6438], + 466, + 468, + [7455, 2329], + [7468, 6577], + [7471, 1276, 1277, 141], + [7363, 759, 287, 6607], + 466, + 468, + [7455, 2367], + [7468, 6729], + [7471, 1295, 1296, 142], + [7363, 765, 292, 6759], + 466, + 468, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return r(6783) + }), + (e.exports = t["default"]) + }, + [7339, 6799], + [7363, 770, 294, 6805], + 466, + 468, + 148, + [7480, 2404, 548, 772], + [7491, 2404, 1320, 454, 6886], + [7468, 6954], + [7491, 775, 1325, 143, 6950], + [7363, 778, 300, 6991], + 466, + 468, + [7455, 2461], + [7468, 7110], + [7471, 1344, 1345, 144], + [7363, 784, 304, 7147], + 466, + 468, + [7455, 2498], + [7468, 7266], + [7471, 1363, 1364, 145], + function(e, t, r) { + function n(e, t) { + return h.isUndefined(t) + ? "" + t + : h.isNumber(t) && !isFinite(t) + ? t.toString() + : h.isFunction(t) || h.isRegExp(t) + ? t.toString() + : t + } + function i(e, t) { + return h.isString(e) ? (e.length < t ? e : e.slice(0, t)) : e + } + function s(e) { + return ( + i(JSON.stringify(e.actual, n), 128) + + " " + + e.operator + + " " + + i(JSON.stringify(e.expected, n), 128) + ) + } + function a(e, t, r, n, i) { + throw new y.AssertionError({ + message: r, + actual: e, + expected: t, + operator: n, + stackStartFunction: i + }) + } + function o(e, t) { + e || a(e, !0, t, "==", y.ok) + } + function u(e, t) { + if (e === t) return !0 + if (h.isBuffer(e) && h.isBuffer(t)) { + if (e.length != t.length) return !1 + for (var r = 0; r < e.length; r++) if (e[r] !== t[r]) return !1 + return !0 + } + return h.isDate(e) && h.isDate(t) + ? e.getTime() === t.getTime() + : h.isRegExp(e) && h.isRegExp(t) + ? e.source === t.source && + e.global === t.global && + e.multiline === t.multiline && + e.lastIndex === t.lastIndex && + e.ignoreCase === t.ignoreCase + : h.isObject(e) || h.isObject(t) + ? c(e, t) + : e == t + } + function l(e) { + return "[object Arguments]" == Object.prototype.toString.call(e) + } + function c(e, t) { + if (h.isNullOrUndefined(e) || h.isNullOrUndefined(t)) return !1 + if (e.prototype !== t.prototype) return !1 + if (h.isPrimitive(e) || h.isPrimitive(t)) return e === t + var r = l(e), + n = l(t) + if ((r && !n) || (!r && n)) return !1 + if (r) return (e = d.call(e)), (t = d.call(t)), u(e, t) + var i, + s, + a = v(e), + o = v(t) + if (a.length != o.length) return !1 + for (a.sort(), o.sort(), s = a.length - 1; s >= 0; s--) + if (a[s] != o[s]) return !1 + for (s = a.length - 1; s >= 0; s--) if (((i = a[s]), !u(e[i], t[i]))) return !1 + return !0 + } + function p(e, t) { + return e && t + ? "[object RegExp]" == Object.prototype.toString.call(t) + ? t.test(e) + : e instanceof t + ? !0 + : t.call({}, e) === !0 + : !1 + } + function f(e, t, r, n) { + var i + h.isString(r) && ((n = r), (r = null)) + try { + t() + } catch (s) { + i = s + } + if ( + ((n = (r && r.name ? " (" + r.name + ")." : ".") + (n ? " " + n : ".")), + e && !i && a(i, r, "Missing expected exception" + n), + !e && p(i, r) && a(i, r, "Got unwanted exception" + n), + (e && i && r && !p(i, r)) || (!e && i)) + ) + throw i + } + var h = r(22), + d = Array.prototype.slice, + m = Object.prototype.hasOwnProperty, + y = (e.exports = o) + ;(y.AssertionError = function(e) { + ;(this.name = "AssertionError"), + (this.actual = e.actual), + (this.expected = e.expected), + (this.operator = e.operator), + e.message + ? ((this.message = e.message), (this.generatedMessage = !1)) + : ((this.message = s(this)), (this.generatedMessage = !0)) + var t = e.stackStartFunction || a + if (Error.captureStackTrace) Error.captureStackTrace(this, t) + else { + var r = new Error() + if (r.stack) { + var n = r.stack, + i = t.name, + o = n.indexOf("\n" + i) + if (o >= 0) { + var u = n.indexOf("\n", o + 1) + n = n.substring(u + 1) + } + this.stack = n + } + } + }), + h.inherits(y.AssertionError, Error), + (y.fail = a), + (y.ok = o), + (y.equal = function(e, t, r) { + e != t && a(e, t, r, "==", y.equal) + }), + (y.notEqual = function(e, t, r) { + e == t && a(e, t, r, "!=", y.notEqual) + }), + (y.deepEqual = function(e, t, r) { + u(e, t) || a(e, t, r, "deepEqual", y.deepEqual) + }), + (y.notDeepEqual = function(e, t, r) { + u(e, t) && a(e, t, r, "notDeepEqual", y.notDeepEqual) + }), + (y.strictEqual = function(e, t, r) { + e !== t && a(e, t, r, "===", y.strictEqual) + }), + (y.notStrictEqual = function(e, t, r) { + e === t && a(e, t, r, "!==", y.notStrictEqual) + }), + (y["throws"] = function(e, t, r) { + f.apply(this, [!0].concat(d.call(arguments))) + }), + (y.doesNotThrow = function(e, t) { + f.apply(this, [!1].concat(d.call(arguments))) + }), + (y.ifError = function(e) { + if (e) throw e + }) + var v = + Object.keys || + function(e) { + var t = [] + for (var r in e) m.call(e, r) && t.push(r) + return t + } + }, + function(e, t, r) { + "use strict" + var n = r(374)["default"], + i = r(80)["default"], + s = r(2558)["default"] + t.__esModule = !0 + var a = (function(e) { + function t() { + i(this, t), e.call(this), (this.dynamicData = {}) + } + return ( + n(t, e), + (t.prototype.setDynamic = function(e, t) { + this.dynamicData[e] = t + }), + (t.prototype.get = function(t) { + if (this.has(t)) return e.prototype.get.call(this, t) + if (Object.prototype.hasOwnProperty.call(this.dynamicData, t)) { + var r = this.dynamicData[t]() + return this.set(t, r), r + } + }), + t + ) + })(s) + ;(t["default"] = a), (e.exports = t["default"]) + }, + function(e, t, r) { + ;(function(e) { + "use strict" + var n = r(374)["default"], + i = r(80)["default"], + s = r(796)["default"], + a = r(555)["default"], + o = r(5)["default"], + u = r(3)["default"] + t.__esModule = !0 + var l = r(1374), + c = o(l), + p = r(2509), + f = u(p), + h = r(2645), + d = o(h), + m = r(461), + y = o(m), + v = r(2513), + g = o(v), + E = r(2708), + b = o(E), + x = r(147), + A = r(1425), + D = o(A), + C = r(1372), + S = o(C), + F = r(1368), + w = o(F), + _ = r(1419), + T = o(_), + P = o(x), + B = r(2508), + k = o(B), + I = r(790), + O = o(I), + M = r(810), + R = r(795), + L = u(R), + N = r(175), + j = o(N), + U = r(16), + V = u(U), + G = r(2510), + W = o(G), + q = r(2511), + H = o(q), + Y = [[W["default"]], [H["default"]]], + J = { + enter: function(e, t) { + var r = e.node.loc + r && ((t.loc = r), e.stop()) + } + }, + K = (function(t) { + function r(e, n) { + var o = this + void 0 === e && (e = {}), + i(this, r), + t.call(this), + (this.pipeline = n), + (this.log = new k["default"](this, e.filename || "unknown")), + (this.opts = this.initOptions(e)), + (this.parserOpts = { + highlightCode: this.opts.highlightCode, + nonStandard: this.opts.nonStandard, + sourceType: this.opts.sourceType, + filename: this.opts.filename, + plugins: [] + }), + (this.pluginVisitors = []), + (this.pluginPasses = []), + this.buildPluginsForOptions(this.opts), + this.opts.passPerPreset && + ((this.perPresetOpts = []), + this.opts.presets.forEach(function(e) { + var t = s(a(o.opts), e) + o.perPresetOpts.push(t), o.buildPluginsForOptions(t) + })), + (this.metadata = { + usedHelpers: [], + marked: [], + modules: { + imports: [], + exports: { exported: [], specifiers: [] } + } + }), + (this.dynamicImportTypes = {}), + (this.dynamicImportIds = {}), + (this.dynamicImports = []), + (this.declarations = {}), + (this.usedHelpers = {}), + (this.path = null), + (this.ast = {}), + (this.code = ""), + (this.shebang = ""), + (this.hub = new x.Hub(this)) + } + return ( + n(r, t), + (r.prototype.getMetadata = function() { + for ( + var e = !1, t = this.ast.program.body, r = 0; + r < t.length; + r++ + ) { + var n = t[r] + if (V.isModuleDeclaration(n)) { + e = !0 + break + } + } + e && this.path.traverse(f, this) + }), + (r.prototype.initOptions = function(e) { + ;(e = new y["default"](this.log, this.pipeline).init(e)), + e.inputSourceMap && (e.sourceMaps = !0), + e.moduleId && (e.moduleIds = !0), + (e.basename = j["default"].basename( + e.filename, + j["default"].extname(e.filename) + )), + (e.ignore = L.arrayify(e.ignore, L.regexify)), + e.only && (e.only = L.arrayify(e.only, L.regexify)), + T["default"](e, { moduleRoot: e.sourceRoot }), + T["default"](e, { sourceRoot: e.moduleRoot }), + T["default"](e, { filenameRelative: e.filename }) + var t = j["default"].basename(e.filenameRelative) + return ( + T["default"](e, { sourceFileName: t, sourceMapTarget: t }), + e + ) + }), + (r.prototype.buildPluginsForOptions = function(e) { + if (Array.isArray(e.plugins)) { + for ( + var t = e.plugins.concat(Y), r = [], n = [], i = 0; + i < t.length; + i++ + ) { + var s = t[i], + a = s[0], + o = s[1] + r.push(a.visitor), + n.push(new g["default"](this, a, o)), + a.manipulateOptions && + a.manipulateOptions(e, this.parserOpts, this) + } + this.pluginVisitors.push(r), this.pluginPasses.push(n) + } + }), + (r.prototype.getModuleName = function() { + var e = this.opts + if (!e.moduleIds) return null + if (null != e.moduleId && !e.getModuleId) return e.moduleId + var t = e.filenameRelative, + r = "" + if ( + (null != e.moduleRoot && (r = e.moduleRoot + "/"), + !e.filenameRelative) + ) + return r + e.filename.replace(/^\//, "") + if (null != e.sourceRoot) { + var n = new RegExp("^" + e.sourceRoot + "/?") + t = t.replace(n, "") + } + return ( + (t = t.replace(/\.(\w*?)$/, "")), + (r += t), + (r = r.replace(/\\/g, "/")), + e.getModuleId ? e.getModuleId(r) || r : r + ) + }), + (r.prototype.resolveModuleSource = function o(e) { + var o = this.opts.resolveModuleSource + return o && (e = o(e, this.opts.filename)), e + }), + (r.prototype.addImport = function(e, t) { + var r = + arguments.length <= 2 || void 0 === arguments[2] + ? t + : arguments[2] + return function() { + var n = e + ":" + t, + i = this.dynamicImportIds[n] + if (!i) { + ;(e = this.resolveModuleSource(e)), + (i = this.dynamicImportIds[ + n + ] = this.scope.generateUidIdentifier(r)) + var s = [] + "*" === t + ? s.push(V.importNamespaceSpecifier(i)) + : "default" === t + ? s.push(V.importDefaultSpecifier(i)) + : s.push(V.importSpecifier(i, V.identifier(t))) + var a = V.importDeclaration(s, V.stringLiteral(e)) + ;(a._blockHoist = 3), + this.path.unshiftContainer("body", a) + } + return i + }.apply(this, arguments) + }), + (r.prototype.addHelper = function(e) { + var t = this.declarations[e] + if (t) return t + this.usedHelpers[e] || + (this.metadata.usedHelpers.push(e), + (this.usedHelpers[e] = !0)) + var r = this.get("helperGenerator"), + n = this.get("helpersNamespace") + if (r) { + var i = r(e) + if (i) return i + } else if (n) return V.memberExpression(n, V.identifier(e)) + var s = c["default"](e), + a = (this.declarations[ + e + ] = this.scope.generateUidIdentifier(e)) + return ( + V.isFunctionExpression(s) && !s.id + ? ((s.body._compact = !0), + (s._generated = !0), + (s.id = a), + (s.type = "FunctionDeclaration"), + this.path.unshiftContainer("body", s)) + : ((s._compact = !0), + this.scope.push({ id: a, init: s, unique: !0 })), + a + ) + }), + (r.prototype.addTemplateObject = function(e, t, r) { + var n = r.elements.map(function(e) { + return e.value + }), + i = e + "_" + r.elements.length + "_" + n.join(","), + s = this.declarations[i] + if (s) return s + var a = (this.declarations[ + i + ] = this.scope.generateUidIdentifier("templateObject")), + o = this.addHelper(e), + u = V.callExpression(o, [t, r]) + return ( + (u._compact = !0), + this.scope.push({ id: a, init: u, _blockHoist: 1.9 }), + a + ) + }), + (r.prototype.buildCodeFrameError = function(e, t) { + var r = + arguments.length <= 2 || void 0 === arguments[2] + ? SyntaxError + : arguments[2], + n = e && (e.loc || e._loc), + i = new r(t) + return ( + n + ? (i.loc = n.start) + : (P["default"](e, J, this.scope, i), + (i.message += + " (This is an error on an internal node. Probably an internal error"), + i.loc && + (i.message += ". Location has been estimated."), + (i.message += ")")), + i + ) + }), + (r.prototype.mergeSourceMap = function(e) { + var t = this.opts.inputSourceMap + if (!t) return e + var r = (function() { + var r = new D["default"].SourceMapConsumer(t), + n = new D["default"].SourceMapConsumer(e), + i = new D["default"].SourceMapGenerator({ + file: r.file, + sourceRoot: r.sourceRoot + }), + s = n.sources[0] + r.eachMapping(function(e) { + var t = n.generatedPositionFor({ + line: e.generatedLine, + column: e.generatedColumn, + source: s + }) + null != t.column && + i.addMapping({ + source: e.source, + original: { + line: e.originalLine, + column: e.originalColumn + }, + generated: t + }) + }) + var a = i.toJSON() + return (t.mappings = a.mappings), { v: t } + })() + return "object" == typeof r ? r.v : void 0 + }), + (r.prototype.parse = function(e) { + this.log.debug("Parse start") + var t = M.parse(e, this.parserOpts) + return this.log.debug("Parse stop"), t + }), + (r.prototype._addAst = function(e) { + ;(this.path = x.NodePath.get({ + hub: this.hub, + parentPath: null, + parent: e, + container: e, + key: "program" + }).setContext()), + (this.scope = this.path.scope), + (this.ast = e), + this.getMetadata() + }), + (r.prototype.addAst = function(e) { + this.log.debug("Start set AST"), + this._addAst(e), + this.log.debug("End set AST") + }), + (r.prototype.transform = function() { + var e = this + return ( + this.pluginPasses.forEach(function(t, r) { + e.call("pre", t), + e.log.debug("Start transform traverse"), + P["default"]( + e.ast, + P["default"].visitors.merge( + e.pluginVisitors[r], + t + ), + e.scope + ), + e.log.debug("End transform traverse"), + e.call("post", t) + }), + this.generate() + ) + }), + (r.prototype.wrap = function(t, r) { + t += "" + try { + return this.shouldIgnore() + ? this.makeResult({ code: t, ignored: !0 }) + : r() + } catch (n) { + if (n._babel) throw n + n._babel = !0 + var i = (n.message = this.opts.filename + ": " + n.message), + s = n.loc + if ( + (s && + ((n.codeFrame = w["default"]( + t, + s.line, + s.column + 1, + this.opts + )), + (i += "\n" + n.codeFrame)), + e.browser && (n.message = i), + n.stack) + ) { + var a = n.stack.replace(n.message, i) + n.stack = a + } + throw n + } + }), + (r.prototype.addCode = function(e) { + ;(e = (e || "") + ""), + (e = this.parseInputSourceMap(e)), + (this.code = e) + }), + (r.prototype.parseCode = function() { + this.parseShebang() + var e = this.parse(this.code) + this.addAst(e) + }), + (r.prototype.shouldIgnore = function() { + var e = this.opts + return L.shouldIgnore(e.filename, e.ignore, e.only) + }), + (r.prototype.call = function(e, t) { + for (var r = 0; r < t.length; r++) { + var n = t[r], + i = n.plugin, + s = i[e] + s && s.call(n, this) + } + }), + (r.prototype.parseInputSourceMap = function(e) { + var t = this.opts + if (t.inputSourceMap !== !1) { + var r = d["default"].fromSource(e) + r && + ((t.inputSourceMap = r.toObject()), + (e = d["default"].removeComments(e))) + } + return e + }), + (r.prototype.parseShebang = function() { + var e = b["default"].exec(this.code) + e && + ((this.shebang = e[0]), + (this.code = this.code.replace(b["default"], ""))) + }), + (r.prototype.makeResult = function(e) { + var t = e.code, + r = e.map, + n = e.ast, + i = e.ignored, + s = { + metadata: null, + options: this.opts, + ignored: !!i, + code: null, + ast: null, + map: r || null + } + return ( + this.opts.code && (s.code = t), + this.opts.ast && (s.ast = n), + this.opts.metadata && (s.metadata = this.metadata), + s + ) + }), + (r.prototype.generate = function() { + var e = this.opts, + t = this.ast, + r = { ast: t } + if (!e.code) return this.makeResult(r) + this.log.debug("Generation start") + var n = S["default"](t, e, this.code) + return ( + (r.code = n.code), + (r.map = n.map), + this.log.debug("Generation end"), + this.shebang && (r.code = this.shebang + "\n" + r.code), + r.map && (r.map = this.mergeSourceMap(r.map)), + ("inline" !== e.sourceMaps && "both" !== e.sourceMaps) || + (r.code += + "\n" + d["default"].fromObject(r.map).toComment()), + "inline" === e.sourceMaps && (r.map = null), + this.makeResult(r) + ) + }), + r + ) + })(O["default"]) + ;(t["default"] = K), (t.File = K) + }.call(t, r(1))) + }, + function(e, t, r) { + "use strict" + function n() { + var e = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0] + for (var t in e) { + var r = e[t] + if (null != r) { + var n = l["default"][t] + if ((n && n.alias && (n = l["default"][n.alias]), n)) { + var i = o[n.type] + i && (r = i(r)), (e[t] = r) + } + } + } + return e + } + var i = r(3)["default"], + s = r(5)["default"] + ;(t.__esModule = !0), (t.normaliseOptions = n) + var a = r(793), + o = i(a), + u = r(460), + l = s(u) + t.config = l["default"] + }, + function(e, t, r) { + "use strict" + function n(e) { + return !!e + } + function i(e) { + return p.booleanify(e) + } + function s(e) { + return p.list(e) + } + var a = r(5)["default"], + o = r(3)["default"] + ;(t.__esModule = !0), (t["boolean"] = n), (t.booleanString = i), (t.list = s) + var u = r(1421), + l = a(u), + c = r(795), + p = o(c), + f = l["default"] + t.filename = f + }, + function(e, t) { + "use strict" + e.exports = { + auxiliaryComment: { + message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`" + }, + blacklist: { + message: "Put the specific transforms you want in the `plugins` option" + }, + breakConfig: { message: "This is not a necessary option in Babel 6" }, + experimental: { + message: "Put the specific transforms you want in the `plugins` option" + }, + externalHelpers: { + message: + "Use the `external-helpers` plugin instead. Check out http://babeljs.io/docs/plugins/external-helpers/" + }, + extra: { message: "" }, + jsxPragma: { + message: + "use the `pragma` option in the `react-jsx` plugin . Check out http://babeljs.io/docs/plugins/transform-react-jsx/" + }, + loose: { + message: + "Specify the `loose` option for the relevant plugin you are using or use a preset that sets the option." + }, + metadataUsedHelpers: { + message: "Not required anymore as this is enabled by default" + }, + modules: { + message: + "Use the corresponding module transform plugin in the `plugins` option. Check out http://babeljs.io/docs/plugins/#modules" + }, + nonStandard: { + message: + "Use the `react-jsx` and `flow-strip-types` plugins to support JSX and Flow. Also check out the react preset http://babeljs.io/docs/plugins/preset-react/" + }, + optional: { + message: "Put the specific transforms you want in the `plugins` option" + }, + sourceMapName: { message: "Use the `sourceMapTarget` option" }, + stage: { + message: + "Check out the corresponding stage-x presets http://babeljs.io/docs/plugins/#presets" + }, + whitelist: { + message: "Put the specific transforms you want in the `plugins` option" + } + } + }, + function(e, t, r) { + "use strict" + function n(e, t) { + var r = t || n.EXTENSIONS, + i = F["default"].extname(e) + return b["default"](r, i) + } + function i(e) { + return e + ? Array.isArray(e) + ? e + : "string" == typeof e + ? e.split(",") + : [e] + : [] + } + function s(e) { + if (!e) return new RegExp(/.^/) + if ( + (Array.isArray(e) && (e = new RegExp(e.map(f["default"]).join("|"), "i")), + "string" == typeof e) + ) { + ;(e = _["default"](e)), + (d["default"](e, "./") || d["default"](e, "*/")) && (e = e.slice(2)), + d["default"](e, "**/") && (e = e.slice(3)) + var t = g["default"].makeRe(e, { nocase: !0 }) + return new RegExp(t.source.slice(1, -1), "i") + } + if (C["default"](e)) return e + throw new TypeError("illegal type for regexify") + } + function a(e, t) { + return e + ? y["default"](e) + ? a([e], t) + : A["default"](e) + ? a(i(e), t) + : Array.isArray(e) + ? (t && (e = e.map(t)), e) + : [e] + : [] + } + function o(e) { + return "true" === e || 1 == e ? !0 : "false" !== e && 0 != e && e ? e : !1 + } + function u(e, t, r) { + if ((void 0 === t && (t = []), (e = _["default"](e)), r)) { + for (var n = 0; n < r.length; n++) { + var i = r[n] + if (l(i, e)) return !1 + } + return !0 + } + if (t.length) + for (var s = 0; s < t.length; s++) { + var i = t[s] + if (l(i, e)) return !0 + } + return !1 + } + function l(e, t) { + return "function" == typeof e ? e(t) : e.test(t) + } + var c = r(5)["default"] + ;(t.__esModule = !0), + (t.canCompile = n), + (t.list = i), + (t.regexify = s), + (t.arrayify = a), + (t.booleanify = o), + (t.shouldIgnore = u) + var p = r(2699), + f = c(p), + h = r(2700), + d = c(h), + m = r(1414), + y = c(m), + v = r(2702), + g = c(v), + E = r(2652), + b = c(E), + x = r(819), + A = c(x), + D = r(1418), + C = c(D), + S = r(175), + F = c(S), + w = r(1421), + _ = c(w), + T = r(22) + ;(t.inherits = T.inherits), + (t.inspect = T.inspect), + (n.EXTENSIONS = [".js", ".jsx", ".es6", ".es"]) + }, + [7333, 2571], + [7341, 2580], + 581, + function(e, t) { + var r = {}.toString + e.exports = function(e) { + return r.call(e).slice(8, -1) + } + }, + function(e, t, r) { + var n = r(556), + i = r(2589), + s = r(2587), + a = r(463), + o = r(2596), + u = r(1386) + e.exports = function(e, t, r, l) { + var c, + p, + f, + h = u(e), + d = n(r, l, t ? 2 : 1), + m = 0 + if ("function" != typeof h) throw TypeError(e + " is not iterable!") + if (s(h)) + for (c = o(e.length); c > m; m++) t ? d(a((p = e[m]))[0], p[1]) : d(e[m]) + else for (f = h.call(e); !(p = f.next()).done; ) i(f, d, p.value, t) + } + }, + [7369, 1380, 177, 804, 467, 558, 468, 2590, 560, 81, 178], + [7372, 177, 98, 465], + function(e, t) { + e.exports = function(e, t) { + return { + enumerable: !(1 & e), + configurable: !(2 & e), + writable: !(4 & e), + value: t + } + } + }, + [7373, 467], + function(e, t) { + var r = 0, + n = Math.random() + e.exports = function(e) { + return "Symbol(".concat(void 0 === e ? "" : e, ")_", (++r + n).toString(36)) + } + }, + [ + 7391, + 81, + 466, + 558, + 464, + 177, + 804, + 465, + 1382, + 560, + 805, + 178, + 2591, + 1377, + 2586, + 2588, + 463, + 469, + 803, + 1380 + ], + [7393, 797, 5, 3, 1413, 565, 2695, 147, 810, 16], + [ + 7412, + 2565, + 80, + 797, + 146, + 555, + 462, + 5, + 3, + 561, + 2627, + 2623, + 147, + 1419, + 176, + 1393, + 2625, + 16 + ], + [7416, 2564], + function(e, t, r) { + var n, n + !(function(t) { + e.exports = t() + })(function() { + return (function e(t, r, i) { + function s(o, u) { + if (!r[o]) { + if (!t[o]) { + var l = "function" == typeof n && n + if (!u && l) return n(o, !0) + if (a) return a(o, !0) + var c = new Error("Cannot find module '" + o + "'") + throw ((c.code = "MODULE_NOT_FOUND"), c) + } + var p = (r[o] = { exports: {} }) + t[o][0].call( + p.exports, + function(e) { + var r = t[o][1][e] + return s(r ? r : e) + }, + p, + p.exports, + e, + t, + r, + i + ) + } + return r[o].exports + } + for (var a = "function" == typeof n && n, o = 0; o < i.length; o++) s(i[o]) + return s + })( + { + 1: [ + function(e, t, r) { + "use strict" + function n(e, t) { + return new a["default"](t, e).parse() + } + var i = e(25)["default"] + ;(r.__esModule = !0), (r.parse = n) + var s = e(5), + a = i(s) + e(10), e(9), e(7), e(4), e(8), e(6), e(3) + var o = e(17) + e(15), e(14) + var u = e(11), + l = i(u), + c = e(12), + p = i(c) + ;(s.plugins.flow = l["default"]), + (s.plugins.jsx = p["default"]), + (r.tokTypes = o.types) + }, + { + 10: 10, + 11: 11, + 12: 12, + 14: 14, + 15: 15, + 17: 17, + 25: 25, + 3: 3, + 4: 4, + 5: 5, + 6: 6, + 7: 7, + 8: 8, + 9: 9 + } + ], + 2: [ + function(e, t, r) { + "use strict" + function n(e) { + var t = {} + for (var r in i) t[r] = e && r in e ? e[r] : i[r] + return t + } + ;(r.__esModule = !0), (r.getOptions = n) + var i = { + sourceType: "script", + allowReturnOutsideFunction: !1, + allowImportExportEverywhere: !1, + allowSuperOutsideMethod: !1, + plugins: [], + strictMode: null + } + r.defaultOptions = i + }, + {} + ], + 3: [ + function(e, t, r) { + "use strict" + function n(e) { + return e[e.length - 1] + } + var i = e(25)["default"], + s = e(5), + a = i(s), + o = a["default"].prototype + ;(o.addComment = function(e) { + this.state.trailingComments.push(e), + this.state.leadingComments.push(e) + }), + (o.processComment = function(e) { + if (!("Program" === e.type && e.body.length > 0)) { + var t = this.state.commentStack, + r = void 0, + i = void 0, + s = void 0 + if (this.state.trailingComments.length > 0) + this.state.trailingComments[0].start >= e.end + ? ((i = this.state.trailingComments), + (this.state.trailingComments = [])) + : (this.state.trailingComments.length = 0) + else { + var a = n(t) + t.length > 0 && + a.trailingComments && + a.trailingComments[0].start >= e.end && + ((i = a.trailingComments), + (a.trailingComments = null)) + } + for (; t.length > 0 && n(t).start >= e.start; ) + r = t.pop() + if (r) { + if (r.leadingComments) + if ( + r !== e && + n(r.leadingComments).end <= e.start + ) + (e.leadingComments = r.leadingComments), + (r.leadingComments = null) + else + for ( + s = r.leadingComments.length - 2; + s >= 0; + --s + ) + if ( + r.leadingComments[s].end <= + e.start + ) { + e.leadingComments = r.leadingComments.splice( + 0, + s + 1 + ) + break + } + } else if (this.state.leadingComments.length > 0) + if ( + n(this.state.leadingComments).end <= e.start + ) + (e.leadingComments = this.state.leadingComments), + (this.state.leadingComments = []) + else { + for ( + s = 0; + s < this.state.leadingComments.length && + !( + this.state.leadingComments[s].end > + e.start + ); + s++ + ); + ;(e.leadingComments = this.state.leadingComments.slice( + 0, + s + )), + 0 === e.leadingComments.length && + (e.leadingComments = null), + (i = this.state.leadingComments.slice( + s + )), + 0 === i.length && (i = null) + } + i && + (i.length && + i[0].start >= e.start && + n(i).end <= e.end + ? (e.innerComments = i) + : (e.trailingComments = i)), + t.push(e) + } + }) + }, + { 25: 25, 5: 5 } + ], + 4: [ + function(e, t, r) { + "use strict" + var n = e(21)["default"], + i = e(25)["default"], + s = e(17), + a = e(5), + o = i(a), + u = e(18), + l = o["default"].prototype + ;(l.checkPropClash = function(e, t) { + if (!e.computed) { + var r = e.key, + n = void 0 + switch (r.type) { + case "Identifier": + n = r.name + break + case "StringLiteral": + case "NumericLiteral": + n = String(r.value) + break + default: + return + } + "__proto__" === n && + "init" === e.kind && + (t.proto && + this.raise( + r.start, + "Redefinition of __proto__ property" + ), + (t.proto = !0)) + } + }), + (l.parseExpression = function(e, t) { + var r = this.state.start, + n = this.state.startLoc, + i = this.parseMaybeAssign(e, t) + if (this.match(s.types.comma)) { + var a = this.startNodeAt(r, n) + for (a.expressions = [i]; this.eat(s.types.comma); ) + a.expressions.push(this.parseMaybeAssign(e, t)) + return ( + this.toReferencedList(a.expressions), + this.finishNode(a, "SequenceExpression") + ) + } + return i + }), + (l.parseMaybeAssign = function(e, t, r) { + if ( + this.match(s.types._yield) && + this.state.inGenerator + ) + return this.parseYield() + var n = void 0 + t ? (n = !1) : ((t = { start: 0 }), (n = !0)) + var i = this.state.start, + a = this.state.startLoc + ;(this.match(s.types.parenL) || + this.match(s.types.name)) && + (this.state.potentialArrowAt = this.state.start) + var o = this.parseMaybeConditional(e, t) + if ( + (r && (o = r.call(this, o, i, a)), + this.state.type.isAssign) + ) { + var u = this.startNodeAt(i, a) + if ( + ((u.operator = this.state.value), + (u.left = this.match(s.types.eq) + ? this.toAssignable(o) + : o), + (t.start = 0), + this.checkLVal(o), + o.extra && o.extra.parenthesized) + ) { + var l = void 0 + "ObjectPattern" === o.type + ? (l = "`({a}) = 0` use `({a} = 0)`") + : "ArrayPattern" === o.type && + (l = "`([a]) = 0` use `([a] = 0)`"), + l && + this.raise( + o.start, + "You're trying to assign to a parenthesized expression, eg. instead of " + + l + ) + } + return ( + this.next(), + (u.right = this.parseMaybeAssign(e)), + this.finishNode(u, "AssignmentExpression") + ) + } + return n && t.start && this.unexpected(t.start), o + }), + (l.parseMaybeConditional = function(e, t) { + var r = this.state.start, + n = this.state.startLoc, + i = this.parseExprOps(e, t) + if (t && t.start) return i + if (this.eat(s.types.question)) { + var a = this.startNodeAt(r, n) + return ( + (a.test = i), + (a.consequent = this.parseMaybeAssign()), + this.expect(s.types.colon), + (a.alternate = this.parseMaybeAssign(e)), + this.finishNode(a, "ConditionalExpression") + ) + } + return i + }), + (l.parseExprOps = function(e, t) { + var r = this.state.start, + n = this.state.startLoc, + i = this.parseMaybeUnary(t) + return t && t.start + ? i + : this.parseExprOp(i, r, n, -1, e) + }), + (l.parseExprOp = function(e, t, r, n, i) { + var a = this.state.type.binop + if ( + !(null == a || (i && this.match(s.types._in))) && + a > n + ) { + var o = this.startNodeAt(t, r) + ;(o.left = e), + (o.operator = this.state.value), + "**" === o.operator && + "UnaryExpression" === e.type && + e.extra && + !e.extra.parenthesizedArgument && + this.raise( + e.argument.start, + "Illegal expression. Wrap left hand side or entire exponentiation in parentheses." + ) + var u = this.state.type + this.next() + var l = this.state.start, + c = this.state.startLoc + return ( + (o.right = this.parseExprOp( + this.parseMaybeUnary(), + l, + c, + u.rightAssociative ? a - 1 : a, + i + )), + this.finishNode( + o, + u === s.types.logicalOR || + u === s.types.logicalAND + ? "LogicalExpression" + : "BinaryExpression" + ), + this.parseExprOp(o, t, r, n, i) + ) + } + return e + }), + (l.parseMaybeUnary = function(e) { + if (this.state.type.prefix) { + var t = this.startNode(), + r = this.match(s.types.incDec) + ;(t.operator = this.state.value), + (t.prefix = !0), + this.next() + var n = this.state.type + return ( + this.addExtra( + t, + "parenthesizedArgument", + n === s.types.parenL + ), + (t.argument = this.parseMaybeUnary()), + e && e.start && this.unexpected(e.start), + r + ? this.checkLVal(t.argument) + : this.state.strict && + "delete" === t.operator && + "Identifier" === t.argument.type && + this.raise( + t.start, + "Deleting local variable in strict mode" + ), + this.finishNode( + t, + r ? "UpdateExpression" : "UnaryExpression" + ) + ) + } + var i = this.state.start, + a = this.state.startLoc, + o = this.parseExprSubscripts(e) + if (e && e.start) return o + for ( + ; + this.state.type.postfix && + !this.canInsertSemicolon(); + + ) { + var t = this.startNodeAt(i, a) + ;(t.operator = this.state.value), + (t.prefix = !1), + (t.argument = o), + this.checkLVal(o), + this.next(), + (o = this.finishNode(t, "UpdateExpression")) + } + return o + }), + (l.parseExprSubscripts = function(e) { + var t = this.state.start, + r = this.state.startLoc, + n = this.state.potentialArrowAt, + i = this.parseExprAtom(e) + return "ArrowFunctionExpression" === i.type && + i.start === n + ? i + : e && e.start + ? i + : this.parseSubscripts(i, t, r) + }), + (l.parseSubscripts = function(e, t, r, n) { + for (;;) { + if (!n && this.eat(s.types.doubleColon)) { + var i = this.startNodeAt(t, r) + return ( + (i.object = e), + (i.callee = this.parseNoCallExpr()), + this.parseSubscripts( + this.finishNode(i, "BindExpression"), + t, + r, + n + ) + ) + } + if (this.eat(s.types.dot)) { + var i = this.startNodeAt(t, r) + ;(i.object = e), + (i.property = this.parseIdentifier(!0)), + (i.computed = !1), + (e = this.finishNode(i, "MemberExpression")) + } else if (this.eat(s.types.bracketL)) { + var i = this.startNodeAt(t, r) + ;(i.object = e), + (i.property = this.parseExpression()), + (i.computed = !0), + this.expect(s.types.bracketR), + (e = this.finishNode(i, "MemberExpression")) + } else if (!n && this.match(s.types.parenL)) { + var a = + this.state.potentialArrowAt === e.start && + "Identifier" === e.type && + "async" === e.name && + !this.canInsertSemicolon() + this.next() + var i = this.startNodeAt(t, r) + if ( + ((i.callee = e), + (i.arguments = this.parseCallExpressionArguments( + s.types.parenR, + this.hasPlugin( + "trailingFunctionCommas" + ), + a + )), + (e = this.finishNode(i, "CallExpression")), + a && this.shouldParseAsyncArrow()) + ) + return this.parseAsyncArrowFromCallExpression( + this.startNodeAt(t, r), + i + ) + this.toReferencedList(i.arguments) + } else { + if (!this.match(s.types.backQuote)) return e + var i = this.startNodeAt(t, r) + ;(i.tag = e), + (i.quasi = this.parseTemplate()), + (e = this.finishNode( + i, + "TaggedTemplateExpression" + )) + } + } + }), + (l.parseCallExpressionArguments = function(e, t, r) { + for (var n = void 0, i = [], a = !0; !this.eat(e); ) { + if (a) a = !1 + else if ( + (this.expect(s.types.comma), t && this.eat(e)) + ) + break + this.match(s.types.parenL) && + !n && + (n = this.state.start), + i.push(this.parseExprListItem()) + } + return ( + r && + n && + this.shouldParseAsyncArrow() && + this.unexpected(), + i + ) + }), + (l.shouldParseAsyncArrow = function() { + return this.match(s.types.arrow) + }), + (l.parseAsyncArrowFromCallExpression = function(e, t) { + return ( + this.hasPlugin("asyncFunctions") || + this.unexpected(), + this.expect(s.types.arrow), + this.parseArrowExpression(e, t.arguments, !0) + ) + }), + (l.parseNoCallExpr = function() { + var e = this.state.start, + t = this.state.startLoc + return this.parseSubscripts( + this.parseExprAtom(), + e, + t, + !0 + ) + }), + (l.parseExprAtom = function(e) { + var t = void 0, + r = this.state.potentialArrowAt === this.state.start + switch (this.state.type) { + case s.types._super: + return ( + this.state.inMethod || + this.options.allowSuperOutsideMethod || + this.raise( + this.state.start, + "'super' outside of function or class" + ), + (t = this.startNode()), + this.next(), + this.match(s.types.parenL) || + this.match(s.types.bracketL) || + this.match(s.types.dot) || + this.unexpected(), + this.match(s.types.parenL) && + "constructor" !== this.state.inMethod && + !this.options.allowSuperOutsideMethod && + this.raise( + t.start, + "super() outside of class constructor" + ), + this.finishNode(t, "Super") + ) + case s.types._this: + return ( + (t = this.startNode()), + this.next(), + this.finishNode(t, "ThisExpression") + ) + case s.types._yield: + this.state.inGenerator && this.unexpected() + case s.types.name: + t = this.startNode() + var n = + this.hasPlugin("asyncFunctions") && + "await" === this.state.value && + this.state.inAsync, + i = this.shouldAllowYieldIdentifier(), + a = this.parseIdentifier(n || i) + if (this.hasPlugin("asyncFunctions")) + if ("await" === a.name) { + if (this.state.inAsync || this.inModule) + return this.parseAwait(t) + } else { + if ( + "async" === a.name && + this.match(s.types._function) && + !this.canInsertSemicolon() + ) + return ( + this.next(), + this.parseFunction( + t, + !1, + !1, + !0 + ) + ) + if ( + r && + "async" === a.name && + this.match(s.types.name) + ) { + var o = [this.parseIdentifier()] + return ( + this.expect(s.types.arrow), + this.parseArrowExpression( + t, + o, + !0 + ) + ) + } + } + return r && + !this.canInsertSemicolon() && + this.eat(s.types.arrow) + ? this.parseArrowExpression(t, [a]) + : a + case s.types._do: + if (this.hasPlugin("doExpressions")) { + var u = this.startNode() + this.next() + var l = this.state.inFunction, + c = this.state.labels + return ( + (this.state.labels = []), + (this.state.inFunction = !1), + (u.body = this.parseBlock(!1, !0)), + (this.state.inFunction = l), + (this.state.labels = c), + this.finishNode(u, "DoExpression") + ) + } + case s.types.regexp: + var p = this.state.value + return ( + (t = this.parseLiteral( + p.value, + "RegExpLiteral" + )), + (t.pattern = p.pattern), + (t.flags = p.flags), + t + ) + case s.types.num: + return this.parseLiteral( + this.state.value, + "NumericLiteral" + ) + case s.types.string: + return this.parseLiteral( + this.state.value, + "StringLiteral" + ) + case s.types._null: + return ( + (t = this.startNode()), + this.next(), + this.finishNode(t, "NullLiteral") + ) + case s.types._true: + case s.types._false: + return ( + (t = this.startNode()), + (t.value = this.match(s.types._true)), + this.next(), + this.finishNode(t, "BooleanLiteral") + ) + case s.types.parenL: + return this.parseParenAndDistinguishExpression( + null, + null, + r + ) + case s.types.bracketL: + return ( + (t = this.startNode()), + this.next(), + (t.elements = this.parseExprList( + s.types.bracketR, + !0, + !0, + e + )), + this.toReferencedList(t.elements), + this.finishNode(t, "ArrayExpression") + ) + case s.types.braceL: + return this.parseObj(!1, e) + case s.types._function: + return this.parseFunctionExpression() + case s.types.at: + this.parseDecorators() + case s.types._class: + return ( + (t = this.startNode()), + this.takeDecorators(t), + this.parseClass(t, !1) + ) + case s.types._new: + return this.parseNew() + case s.types.backQuote: + return this.parseTemplate() + case s.types.doubleColon: + ;(t = this.startNode()), + this.next(), + (t.object = null) + var f = (t.callee = this.parseNoCallExpr()) + if ("MemberExpression" === f.type) + return this.finishNode(t, "BindExpression") + this.raise( + f.start, + "Binding should be performed on object property." + ) + default: + this.unexpected() + } + }), + (l.parseFunctionExpression = function() { + var e = this.startNode(), + t = this.parseIdentifier(!0) + return this.state.inGenerator && + this.eat(s.types.dot) && + this.hasPlugin("functionSent") + ? this.parseMetaProperty(e, t, "sent") + : this.parseFunction(e, !1) + }), + (l.parseMetaProperty = function(e, t, r) { + return ( + (e.meta = t), + (e.property = this.parseIdentifier(!0)), + e.property.name !== r && + this.raise( + e.property.start, + "The only valid meta property for new is " + + t.name + + "." + + r + ), + this.finishNode(e, "MetaProperty") + ) + }), + (l.parseLiteral = function(e, t) { + var r = this.startNode() + return ( + this.addExtra(r, "rawValue", e), + this.addExtra( + r, + "raw", + this.input.slice( + this.state.start, + this.state.end + ) + ), + (r.value = e), + this.next(), + this.finishNode(r, t) + ) + }), + (l.parseParenExpression = function() { + this.expect(s.types.parenL) + var e = this.parseExpression() + return this.expect(s.types.parenR), e + }), + (l.parseParenAndDistinguishExpression = function( + e, + t, + r, + n, + i + ) { + ;(e = e || this.state.start), + (t = t || this.state.startLoc) + var a = void 0 + this.next() + for ( + var o = this.state.start, + u = this.state.startLoc, + l = [], + c = !0, + p = { start: 0 }, + f = void 0, + h = void 0; + !this.match(s.types.parenR); + + ) { + if (c) c = !1 + else if ( + (this.expect(s.types.comma), + this.match(s.types.parenR) && + this.hasPlugin("trailingFunctionCommas")) + ) { + h = this.state.start + break + } + if (this.match(s.types.ellipsis)) { + var d = this.state.start, + m = this.state.startLoc + ;(f = this.state.start), + l.push( + this.parseParenItem( + this.parseRest(), + m, + d + ) + ) + break + } + l.push( + this.parseMaybeAssign( + !1, + p, + this.parseParenItem + ) + ) + } + var y = this.state.start, + v = this.state.startLoc + if ( + (this.expect(s.types.parenR), + r && + !this.canInsertSemicolon() && + this.eat(s.types.arrow)) + ) { + for (var g = 0; g < l.length; g++) { + var E = l[g] + E.extra && + E.extra.parenthesized && + this.unexpected(E.extra.parenStart) + } + return this.parseArrowExpression( + this.startNodeAt(e, t), + l, + n + ) + } + if (!l.length) { + if (n) return + this.unexpected(this.state.lastTokStart) + } + return ( + h && !i && this.unexpected(h), + f && this.unexpected(f), + p.start && this.unexpected(p.start), + l.length > 1 + ? ((a = this.startNodeAt(o, u)), + (a.expressions = l), + this.toReferencedList(a.expressions), + this.finishNodeAt( + a, + "SequenceExpression", + y, + v + )) + : (a = l[0]), + this.addExtra(a, "parenthesized", !0), + this.addExtra(a, "parenStart", e), + a + ) + }), + (l.parseParenItem = function(e) { + return e + }), + (l.parseNew = function() { + var e = this.startNode(), + t = this.parseIdentifier(!0) + return this.eat(s.types.dot) + ? this.parseMetaProperty(e, t, "target") + : ((e.callee = this.parseNoCallExpr()), + this.eat(s.types.parenL) + ? ((e.arguments = this.parseExprList( + s.types.parenR, + this.hasPlugin("trailingFunctionCommas") + )), + this.toReferencedList(e.arguments)) + : (e.arguments = []), + this.finishNode(e, "NewExpression")) + }), + (l.parseTemplateElement = function() { + var e = this.startNode() + return ( + (e.value = { + raw: this.input + .slice(this.state.start, this.state.end) + .replace(/\r\n?/g, "\n"), + cooked: this.state.value + }), + this.next(), + (e.tail = this.match(s.types.backQuote)), + this.finishNode(e, "TemplateElement") + ) + }), + (l.parseTemplate = function() { + var e = this.startNode() + this.next(), (e.expressions = []) + var t = this.parseTemplateElement() + for (e.quasis = [t]; !t.tail; ) + this.expect(s.types.dollarBraceL), + e.expressions.push(this.parseExpression()), + this.expect(s.types.braceR), + e.quasis.push((t = this.parseTemplateElement())) + return ( + this.next(), this.finishNode(e, "TemplateLiteral") + ) + }), + (l.parseObj = function(e, t) { + var r = [], + i = n(null), + a = !0, + o = this.startNode() + for ( + o.properties = [], this.next(); + !this.eat(s.types.braceR); + + ) { + if (a) a = !1 + else if ( + (this.expect(s.types.comma), + this.eat(s.types.braceR)) + ) + break + for (; this.match(s.types.at); ) + r.push(this.parseDecorator()) + var u = this.startNode(), + l = !1, + c = !1, + p = void 0, + f = void 0 + if ( + (r.length && ((u.decorators = r), (r = [])), + this.hasPlugin("objectRestSpread") && + this.match(s.types.ellipsis)) + ) + (u = this.parseSpread()), + (u.type = e + ? "RestProperty" + : "SpreadProperty"), + o.properties.push(u) + else { + if ( + ((u.method = !1), + (u.shorthand = !1), + (e || t) && + ((p = this.state.start), + (f = this.state.startLoc)), + e || (l = this.eat(s.types.star)), + !e && + this.hasPlugin("asyncFunctions") && + this.isContextual("async")) + ) { + l && this.unexpected() + var h = this.parseIdentifier() + this.match(s.types.colon) || + this.match(s.types.parenL) || + this.match(s.types.braceR) + ? (u.key = h) + : ((c = !0), + this.hasPlugin("asyncGenerators") && + (l = this.eat(s.types.star)), + this.parsePropertyName(u)) + } else this.parsePropertyName(u) + this.parseObjPropValue(u, p, f, l, c, e, t), + this.checkPropClash(u, i), + u.shorthand && + this.addExtra(u, "shorthand", !0), + o.properties.push(u) + } + } + return ( + r.length && + this.raise( + this.state.start, + "You have trailing decorators with no property" + ), + this.finishNode( + o, + e ? "ObjectPattern" : "ObjectExpression" + ) + ) + }), + (l.parseObjPropValue = function(e, t, r, n, i, a, o) { + if (i || n || this.match(s.types.parenL)) + return ( + a && this.unexpected(), + (e.kind = "method"), + (e.method = !0), + this.parseMethod(e, n, i), + this.finishNode(e, "ObjectMethod") + ) + if (this.eat(s.types.colon)) + return ( + (e.value = a + ? this.parseMaybeDefault( + this.state.start, + this.state.startLoc + ) + : this.parseMaybeAssign(!1, o)), + this.finishNode(e, "ObjectProperty") + ) + if ( + !( + e.computed || + "Identifier" !== e.key.type || + ("get" !== e.key.name && + "set" !== e.key.name) || + this.match(s.types.comma) || + this.match(s.types.braceR) + ) + ) { + ;(n || i || a) && this.unexpected(), + (e.kind = e.key.name), + this.parsePropertyName(e), + this.parseMethod(e, !1) + var l = "get" === e.kind ? 0 : 1 + if (e.params.length !== l) { + var c = e.start + "get" === e.kind + ? this.raise( + c, + "getter should have no params" + ) + : this.raise( + c, + "setter should have exactly one param" + ) + } + return this.finishNode(e, "ObjectMethod") + } + if (!e.computed && "Identifier" === e.key.type) { + if (a) { + var p = this.isKeyword(e.key.name) + !p && + this.state.strict && + (p = + u.reservedWords.strictBind( + e.key.name + ) || + u.reservedWords.strict(e.key.name)), + p && + this.raise( + e.key.start, + "Binding " + e.key.name + ), + (e.value = this.parseMaybeDefault( + t, + r, + e.key.__clone() + )) + } else + this.match(s.types.eq) && o + ? (o.start || (o.start = this.state.start), + (e.value = this.parseMaybeDefault( + t, + r, + e.key.__clone() + ))) + : (e.value = e.key.__clone()) + return ( + (e.shorthand = !0), + this.finishNode(e, "ObjectProperty") + ) + } + this.unexpected() + }), + (l.parsePropertyName = function(e) { + return this.eat(s.types.bracketL) + ? ((e.computed = !0), + (e.key = this.parseMaybeAssign()), + this.expect(s.types.bracketR), + e.key) + : ((e.computed = !1), + (e.key = + this.match(s.types.num) || + this.match(s.types.string) + ? this.parseExprAtom() + : this.parseIdentifier(!0))) + }), + (l.initFunction = function(e, t) { + ;(e.id = null), + (e.generator = !1), + (e.expression = !1), + this.hasPlugin("asyncFunctions") && (e.async = !!t) + }), + (l.parseMethod = function(e, t, r) { + var n = this.state.inMethod + return ( + (this.state.inMethod = e.kind || !0), + this.initFunction(e, r), + this.expect(s.types.parenL), + (e.params = this.parseBindingList( + s.types.parenR, + !1, + this.hasPlugin("trailingFunctionCommas") + )), + (e.generator = t), + this.parseFunctionBody(e), + (this.state.inMethod = n), + e + ) + }), + (l.parseArrowExpression = function(e, t, r) { + return ( + this.initFunction(e, r), + (e.params = this.toAssignableList(t, !0)), + this.parseFunctionBody(e, !0), + this.finishNode(e, "ArrowFunctionExpression") + ) + }), + (l.parseFunctionBody = function(e, t) { + var r = t && !this.match(s.types.braceL), + i = this.state.inAsync + if (((this.state.inAsync = e.async), r)) + (e.body = this.parseMaybeAssign()), + (e.expression = !0) + else { + var a = this.state.inFunction, + o = this.state.inGenerator, + u = this.state.labels + ;(this.state.inFunction = !0), + (this.state.inGenerator = e.generator), + (this.state.labels = []), + (e.body = this.parseBlock(!0)), + (e.expression = !1), + (this.state.inFunction = a), + (this.state.inGenerator = o), + (this.state.labels = u) + } + this.state.inAsync = i + var l = this.state.strict, + c = !1, + p = !1 + if ((t && (l = !0), !r && e.body.directives.length)) + for ( + var f = e.body.directives, h = 0; + h < f.length; + h++ + ) { + var d = f[h] + if ("use strict" === d.value.value) { + ;(p = !0), (l = !0), (c = !0) + break + } + } + if ( + (p && + e.id && + "Identifier" === e.id.type && + "yield" === e.id.name && + this.raise( + e.id.start, + "Binding yield in strict mode" + ), + l) + ) { + var m = n(null), + y = this.state.strict + c && (this.state.strict = !0), + e.id && this.checkLVal(e.id, !0) + for (var v = e.params, g = 0; g < v.length; g++) { + var E = v[g] + this.checkLVal(E, !0, m) + } + this.state.strict = y + } + }), + (l.parseExprList = function(e, t, r, n) { + for (var i = [], a = !0; !this.eat(e); ) { + if (a) a = !1 + else if ( + (this.expect(s.types.comma), t && this.eat(e)) + ) + break + i.push(this.parseExprListItem(r, n)) + } + return i + }), + (l.parseExprListItem = function(e, t) { + var r = void 0 + return (r = + e && this.match(s.types.comma) + ? null + : this.match(s.types.ellipsis) + ? this.parseSpread(t) + : this.parseMaybeAssign(!1, t)) + }), + (l.parseIdentifier = function(e) { + var t = this.startNode() + return ( + this.match(s.types.name) + ? (!e && + this.state.strict && + u.reservedWords.strict( + this.state.value + ) && + this.raise( + this.state.start, + "The keyword '" + + this.state.value + + "' is reserved" + ), + (t.name = this.state.value)) + : e && this.state.type.keyword + ? (t.name = this.state.type.keyword) + : this.unexpected(), + !e && + "await" === t.name && + this.state.inAsync && + this.raise( + t.start, + "invalid use of await inside of an async function" + ), + this.next(), + this.finishNode(t, "Identifier") + ) + }), + (l.parseAwait = function(e) { + return ( + this.state.inAsync || this.unexpected(), + this.isLineTerminator() && this.unexpected(), + this.match(s.types.star) && + this.raise( + e.start, + "await* has been removed from the async functions proposal. Use Promise.all() instead." + ), + (e.argument = this.parseMaybeUnary()), + this.finishNode(e, "AwaitExpression") + ) + }), + (l.parseYield = function() { + var e = this.startNode() + return ( + this.next(), + this.match(s.types.semi) || + this.canInsertSemicolon() || + (!this.match(s.types.star) && + !this.state.type.startsExpr) + ? ((e.delegate = !1), (e.argument = null)) + : ((e.delegate = this.eat(s.types.star)), + (e.argument = this.parseMaybeAssign())), + this.finishNode(e, "YieldExpression") + ) + }) + }, + { 17: 17, 18: 18, 21: 21, 25: 25, 5: 5 } + ], + 5: [ + function(e, t, r) { + "use strict" + var n = e(24)["default"], + i = e(23)["default"], + s = e(25)["default"] + r.__esModule = !0 + var a = e(18), + o = e(2), + u = e(15), + l = s(u), + c = {} + r.plugins = c + var p = (function(e) { + function t(r, n) { + i(this, t), + (r = o.getOptions(r)), + e.call(this, r, n), + (this.options = r), + (this.inModule = + "module" === this.options.sourceType), + (this.isReservedWord = a.reservedWords[6]), + (this.input = n), + (this.plugins = this.loadPlugins( + this.options.plugins + )), + 0 === this.state.pos && + "#" === this.input[0] && + "!" === this.input[1] && + this.skipLineComment(2) + } + return ( + n(t, e), + (t.prototype.hasPlugin = function(e) { + return !(!this.plugins["*"] && !this.plugins[e]) + }), + (t.prototype.extend = function(e, t) { + this[e] = t(this[e]) + }), + (t.prototype.loadPlugins = function(e) { + var t = {} + e.indexOf("flow") >= 0 && + ((e = e.filter(function(e) { + return "flow" !== e + })), + e.push("flow")) + for (var n = 0; n < e.length; n++) { + var i = e[n] + if (!t[i]) { + t[i] = !0 + var s = r.plugins[i] + s && s(this) + } + } + return t + }), + (t.prototype.parse = function() { + var e = this.startNode(), + t = this.startNode() + return this.nextToken(), this.parseTopLevel(e, t) + }), + t + ) + })(l["default"]) + r["default"] = p + }, + { 15: 15, 18: 18, 2: 2, 23: 23, 24: 24, 25: 25 } + ], + 6: [ + function(e, t, r) { + "use strict" + var n = e(25)["default"], + i = e(19), + s = e(5), + a = n(s), + o = a["default"].prototype + o.raise = function(e, t) { + var r = i.getLineInfo(this.input, e) + t += " (" + r.line + ":" + r.column + ")" + var n = new SyntaxError(t) + throw ((n.pos = e), (n.loc = r), n) + } + }, + { 19: 19, 25: 25, 5: 5 } + ], + 7: [ + function(e, t, r) { + "use strict" + var n = e(25)["default"], + i = e(17), + s = e(5), + a = n(s), + o = e(18), + u = a["default"].prototype + ;(u.toAssignable = function(e, t) { + if (e) + switch (e.type) { + case "Identifier": + case "ObjectPattern": + case "ArrayPattern": + case "AssignmentPattern": + break + case "ObjectExpression": + e.type = "ObjectPattern" + for ( + var r = e.properties, n = 0; + n < r.length; + n++ + ) { + var i = r[n] + "ObjectMethod" === i.type + ? "get" === i.kind || "set" === i.kind + ? this.raise( + i.key.start, + "Object pattern can't contain getter or setter" + ) + : this.raise( + i.key.start, + "Object pattern can't contain methods" + ) + : this.toAssignable(i, t) + } + break + case "ObjectProperty": + this.toAssignable(e.value, t) + break + case "SpreadProperty": + e.type = "RestProperty" + break + case "ArrayExpression": + ;(e.type = "ArrayPattern"), + this.toAssignableList(e.elements, t) + break + case "AssignmentExpression": + "=" === e.operator + ? ((e.type = "AssignmentPattern"), + delete e.operator) + : this.raise( + e.left.end, + "Only '=' operator can be used for specifying default value." + ) + break + case "MemberExpression": + if (!t) break + default: + this.raise(e.start, "Assigning to rvalue") + } + return e + }), + (u.toAssignableList = function(e, t) { + var r = e.length + if (r) { + var n = e[r - 1] + if (n && "RestElement" === n.type) --r + else if (n && "SpreadElement" === n.type) { + n.type = "RestElement" + var i = n.argument + this.toAssignable(i, t), + "Identifier" !== i.type && + "MemberExpression" !== i.type && + "ArrayPattern" !== i.type && + this.unexpected(i.start), + --r + } + } + for (var s = 0; r > s; s++) { + var a = e[s] + a && this.toAssignable(a, t) + } + return e + }), + (u.toReferencedList = function(e) { + return e + }), + (u.parseSpread = function(e) { + var t = this.startNode() + return ( + this.next(), + (t.argument = this.parseMaybeAssign(e)), + this.finishNode(t, "SpreadElement") + ) + }), + (u.parseRest = function() { + var e = this.startNode() + return ( + this.next(), + (e.argument = this.parseBindingIdentifier()), + this.finishNode(e, "RestElement") + ) + }), + (u.shouldAllowYieldIdentifier = function() { + return ( + this.match(i.types._yield) && + !this.state.strict && + !this.state.inGenerator + ) + }), + (u.parseBindingIdentifier = function() { + return this.parseIdentifier( + this.shouldAllowYieldIdentifier() + ) + }), + (u.parseBindingAtom = function() { + switch (this.state.type) { + case i.types._yield: + ;(this.state.strict || + this.state.inGenerator) && + this.unexpected() + case i.types.name: + return this.parseIdentifier(!0) + case i.types.bracketL: + var e = this.startNode() + return ( + this.next(), + (e.elements = this.parseBindingList( + i.types.bracketR, + !0, + !0 + )), + this.finishNode(e, "ArrayPattern") + ) + case i.types.braceL: + return this.parseObj(!0) + default: + this.unexpected() + } + }), + (u.parseBindingList = function(e, t, r) { + for (var n = [], s = !0; !this.eat(e); ) + if ( + (s ? (s = !1) : this.expect(i.types.comma), + t && this.match(i.types.comma)) + ) + n.push(null) + else { + if (r && this.eat(e)) break + if (this.match(i.types.ellipsis)) { + n.push( + this.parseAssignableListItemTypes( + this.parseRest() + ) + ), + this.expect(e) + break + } + var a = this.parseMaybeDefault() + this.parseAssignableListItemTypes(a), + n.push( + this.parseMaybeDefault(null, null, a) + ) + } + return n + }), + (u.parseAssignableListItemTypes = function(e) { + return e + }), + (u.parseMaybeDefault = function(e, t, r) { + if ( + ((t = t || this.state.startLoc), + (e = e || this.state.start), + (r = r || this.parseBindingAtom()), + !this.eat(i.types.eq)) + ) + return r + var n = this.startNodeAt(e, t) + return ( + (n.left = r), + (n.right = this.parseMaybeAssign()), + this.finishNode(n, "AssignmentPattern") + ) + }), + (u.checkLVal = function(e, t, r) { + switch (e.type) { + case "Identifier": + if ( + (this.state.strict && + (o.reservedWords.strictBind(e.name) || + o.reservedWords.strict(e.name)) && + this.raise( + e.start, + (t ? "Binding " : "Assigning to ") + + e.name + + " in strict mode" + ), + r) + ) { + var n = "_" + e.name + r[n] + ? this.raise( + e.start, + "Argument name clash in strict mode" + ) + : (r[n] = !0) + } + break + case "MemberExpression": + t && + this.raise( + e.start, + (t ? "Binding" : "Assigning to") + + " member expression" + ) + break + case "ObjectPattern": + for ( + var i = e.properties, s = 0; + s < i.length; + s++ + ) { + var a = i[s] + "ObjectProperty" === a.type && + (a = a.value), + this.checkLVal(a, t, r) + } + break + case "ArrayPattern": + for ( + var u = e.elements, l = 0; + l < u.length; + l++ + ) { + var c = u[l] + c && this.checkLVal(c, t, r) + } + break + case "AssignmentPattern": + this.checkLVal(e.left, t, r) + break + case "RestProperty": + case "RestElement": + this.checkLVal(e.argument, t, r) + break + default: + this.raise( + e.start, + (t ? "Binding" : "Assigning to") + " rvalue" + ) + } + }) + }, + { 17: 17, 18: 18, 25: 25, 5: 5 } + ], + 8: [ + function(e, t, r) { + "use strict" + function n(e, t, r, n) { + return ( + (e.type = t), + (e.end = r), + (e.loc.end = n), + this.processComment(e), + e + ) + } + var i = e(23)["default"], + s = e(25)["default"], + a = e(5), + o = s(a), + u = e(19), + l = o["default"].prototype, + c = (function() { + function e(t, r) { + i(this, e), + (this.type = ""), + (this.start = t), + (this.end = 0), + (this.loc = new u.SourceLocation(r)) + } + return ( + (e.prototype.__clone = function() { + var t = new e() + for (var r in this) t[r] = this[r] + return t + }), + e + ) + })() + ;(l.startNode = function() { + return new c(this.state.start, this.state.startLoc) + }), + (l.startNodeAt = function(e, t) { + return new c(e, t) + }), + (l.finishNode = function(e, t) { + return n.call( + this, + e, + t, + this.state.lastTokEnd, + this.state.lastTokEndLoc + ) + }), + (l.finishNodeAt = function(e, t, r, i) { + return n.call(this, e, t, r, i) + }) + }, + { 19: 19, 23: 23, 25: 25, 5: 5 } + ], + 9: [ + function(e, t, r) { + "use strict" + var n = e(21)["default"], + i = e(25)["default"], + s = e(17), + a = e(5), + o = i(a), + u = e(20), + l = o["default"].prototype + l.parseTopLevel = function(e, t) { + return ( + (t.sourceType = this.options.sourceType), + this.parseBlockBody(t, !0, !0, s.types.eof), + (e.program = this.finishNode(t, "Program")), + (e.comments = this.state.comments), + (e.tokens = this.state.tokens), + this.finishNode(e, "File") + ) + } + var c = { kind: "loop" }, + p = { kind: "switch" } + ;(l.stmtToDirective = function(e) { + var t = e.expression, + r = this.startNodeAt(t.start, t.loc.start), + n = this.startNodeAt(e.start, e.loc.start), + i = this.input.slice(t.start, t.end), + s = (r.value = i.slice(1, -1)) + return ( + this.addExtra(r, "raw", i), + this.addExtra(r, "rawValue", s), + (n.value = this.finishNodeAt( + r, + "DirectiveLiteral", + t.end, + t.loc.end + )), + this.finishNodeAt(n, "Directive", e.end, e.loc.end) + ) + }), + (l.parseStatement = function(e, t) { + this.match(s.types.at) && this.parseDecorators(!0) + var r = this.state.type, + n = this.startNode() + switch (r) { + case s.types._break: + case s.types._continue: + return this.parseBreakContinueStatement( + n, + r.keyword + ) + case s.types._debugger: + return this.parseDebuggerStatement(n) + case s.types._do: + return this.parseDoStatement(n) + case s.types._for: + return this.parseForStatement(n) + case s.types._function: + return ( + e || this.unexpected(), + this.parseFunctionStatement(n) + ) + case s.types._class: + return ( + e || this.unexpected(), + this.takeDecorators(n), + this.parseClass(n, !0) + ) + case s.types._if: + return this.parseIfStatement(n) + case s.types._return: + return this.parseReturnStatement(n) + case s.types._switch: + return this.parseSwitchStatement(n) + case s.types._throw: + return this.parseThrowStatement(n) + case s.types._try: + return this.parseTryStatement(n) + case s.types._let: + case s.types._const: + e || this.unexpected() + case s.types._var: + return this.parseVarStatement(n, r) + case s.types._while: + return this.parseWhileStatement(n) + case s.types._with: + return this.parseWithStatement(n) + case s.types.braceL: + return this.parseBlock() + case s.types.semi: + return this.parseEmptyStatement(n) + case s.types._export: + case s.types._import: + return ( + this.options.allowImportExportEverywhere || + (t || + this.raise( + this.state.start, + "'import' and 'export' may only appear at the top level" + ), + this.inModule || + this.raise( + this.state.start, + "'import' and 'export' may appear only with 'sourceType: module'" + )), + r === s.types._import + ? this.parseImport(n) + : this.parseExport(n) + ) + case s.types.name: + if ( + this.hasPlugin("asyncFunctions") && + "async" === this.state.value + ) { + var i = this.state.clone() + if ( + (this.next(), + this.match(s.types._function) && + !this.canInsertSemicolon()) + ) + return ( + this.expect(s.types._function), + this.parseFunction(n, !0, !1, !0) + ) + this.state = i + } + } + var a = this.state.value, + o = this.parseExpression() + return r === s.types.name && + "Identifier" === o.type && + this.eat(s.types.colon) + ? this.parseLabeledStatement(n, a, o) + : this.parseExpressionStatement(n, o) + }), + (l.takeDecorators = function(e) { + this.state.decorators.length && + ((e.decorators = this.state.decorators), + (this.state.decorators = [])) + }), + (l.parseDecorators = function(e) { + for (; this.match(s.types.at); ) + this.state.decorators.push(this.parseDecorator()) + ;(e && this.match(s.types._export)) || + this.match(s.types._class) || + this.raise( + this.state.start, + "Leading decorators must be attached to a class declaration" + ) + }), + (l.parseDecorator = function() { + this.hasPlugin("decorators") || this.unexpected() + var e = this.startNode() + return ( + this.next(), + (e.expression = this.parseMaybeAssign()), + this.finishNode(e, "Decorator") + ) + }), + (l.parseBreakContinueStatement = function(e, t) { + var r = "break" === t + this.next(), + this.isLineTerminator() + ? (e.label = null) + : this.match(s.types.name) + ? ((e.label = this.parseIdentifier()), + this.semicolon()) + : this.unexpected() + var n = void 0 + for (n = 0; n < this.state.labels.length; ++n) { + var i = this.state.labels[n] + if (null == e.label || i.name === e.label.name) { + if (null != i.kind && (r || "loop" === i.kind)) + break + if (e.label && r) break + } + } + return ( + n === this.state.labels.length && + this.raise(e.start, "Unsyntactic " + t), + this.finishNode( + e, + r ? "BreakStatement" : "ContinueStatement" + ) + ) + }), + (l.parseDebuggerStatement = function(e) { + return ( + this.next(), + this.semicolon(), + this.finishNode(e, "DebuggerStatement") + ) + }), + (l.parseDoStatement = function(e) { + return ( + this.next(), + this.state.labels.push(c), + (e.body = this.parseStatement(!1)), + this.state.labels.pop(), + this.expect(s.types._while), + (e.test = this.parseParenExpression()), + this.eat(s.types.semi), + this.finishNode(e, "DoWhileStatement") + ) + }), + (l.parseForStatement = function(e) { + if ( + (this.next(), + this.state.labels.push(c), + this.expect(s.types.parenL), + this.match(s.types.semi)) + ) + return this.parseFor(e, null) + if ( + this.match(s.types._var) || + this.match(s.types._let) || + this.match(s.types._const) + ) { + var t = this.startNode(), + r = this.state.type + return ( + this.next(), + this.parseVar(t, !0, r), + this.finishNode(t, "VariableDeclaration"), + (!this.match(s.types._in) && + !this.isContextual("of")) || + 1 !== t.declarations.length || + t.declarations[0].init + ? this.parseFor(e, t) + : this.parseForIn(e, t) + ) + } + var n = { start: 0 }, + i = this.parseExpression(!0, n) + return this.match(s.types._in) || + this.isContextual("of") + ? (this.toAssignable(i), + this.checkLVal(i), + this.parseForIn(e, i)) + : (n.start && this.unexpected(n.start), + this.parseFor(e, i)) + }), + (l.parseFunctionStatement = function(e) { + return this.next(), this.parseFunction(e, !0) + }), + (l.parseIfStatement = function(e) { + return ( + this.next(), + (e.test = this.parseParenExpression()), + (e.consequent = this.parseStatement(!1)), + (e.alternate = this.eat(s.types._else) + ? this.parseStatement(!1) + : null), + this.finishNode(e, "IfStatement") + ) + }), + (l.parseReturnStatement = function(e) { + return ( + this.state.inFunction || + this.options.allowReturnOutsideFunction || + this.raise( + this.state.start, + "'return' outside of function" + ), + this.next(), + this.isLineTerminator() + ? (e.argument = null) + : ((e.argument = this.parseExpression()), + this.semicolon()), + this.finishNode(e, "ReturnStatement") + ) + }), + (l.parseSwitchStatement = function(e) { + this.next(), + (e.discriminant = this.parseParenExpression()), + (e.cases = []), + this.expect(s.types.braceL), + this.state.labels.push(p) + for ( + var t = void 0, r = void 0; + !this.match(s.types.braceR); + + ) + if ( + this.match(s.types._case) || + this.match(s.types._default) + ) { + var n = this.match(s.types._case) + t && this.finishNode(t, "SwitchCase"), + e.cases.push((t = this.startNode())), + (t.consequent = []), + this.next(), + n + ? (t.test = this.parseExpression()) + : (r && + this.raise( + this.state.lastTokStart, + "Multiple default clauses" + ), + (r = !0), + (t.test = null)), + this.expect(s.types.colon) + } else + t + ? t.consequent.push(this.parseStatement(!0)) + : this.unexpected() + return ( + t && this.finishNode(t, "SwitchCase"), + this.next(), + this.state.labels.pop(), + this.finishNode(e, "SwitchStatement") + ) + }), + (l.parseThrowStatement = function(e) { + return ( + this.next(), + u.lineBreak.test( + this.input.slice( + this.state.lastTokEnd, + this.state.start + ) + ) && + this.raise( + this.state.lastTokEnd, + "Illegal newline after throw" + ), + (e.argument = this.parseExpression()), + this.semicolon(), + this.finishNode(e, "ThrowStatement") + ) + }) + var f = [] + ;(l.parseTryStatement = function(e) { + if ( + (this.next(), + (e.block = this.parseBlock()), + (e.handler = null), + this.match(s.types._catch)) + ) { + var t = this.startNode() + this.next(), + this.expect(s.types.parenL), + (t.param = this.parseBindingAtom()), + this.checkLVal(t.param, !0, n(null)), + this.expect(s.types.parenR), + (t.body = this.parseBlock()), + (e.handler = this.finishNode(t, "CatchClause")) + } + return ( + (e.guardedHandlers = f), + (e.finalizer = this.eat(s.types._finally) + ? this.parseBlock() + : null), + e.handler || + e.finalizer || + this.raise( + e.start, + "Missing catch or finally clause" + ), + this.finishNode(e, "TryStatement") + ) + }), + (l.parseVarStatement = function(e, t) { + return ( + this.next(), + this.parseVar(e, !1, t), + this.semicolon(), + this.finishNode(e, "VariableDeclaration") + ) + }), + (l.parseWhileStatement = function(e) { + return ( + this.next(), + (e.test = this.parseParenExpression()), + this.state.labels.push(c), + (e.body = this.parseStatement(!1)), + this.state.labels.pop(), + this.finishNode(e, "WhileStatement") + ) + }), + (l.parseWithStatement = function(e) { + return ( + this.state.strict && + this.raise( + this.state.start, + "'with' in strict mode" + ), + this.next(), + (e.object = this.parseParenExpression()), + (e.body = this.parseStatement(!1)), + this.finishNode(e, "WithStatement") + ) + }), + (l.parseEmptyStatement = function(e) { + return this.next(), this.finishNode(e, "EmptyStatement") + }), + (l.parseLabeledStatement = function(e, t, r) { + for ( + var n = this.state.labels, i = 0; + i < n.length; + i++ + ) { + var a = n[i] + a.name === t && + this.raise( + r.start, + "Label '" + t + "' is already declared" + ) + } + for ( + var o = this.state.type.isLoop + ? "loop" + : this.match(s.types._switch) + ? "switch" + : null, + u = this.state.labels.length - 1; + u >= 0; + u-- + ) { + var a = this.state.labels[u] + if (a.statementStart !== e.start) break + ;(a.statementStart = this.state.start), (a.kind = o) + } + return ( + this.state.labels.push({ + name: t, + kind: o, + statementStart: this.state.start + }), + (e.body = this.parseStatement(!0)), + this.state.labels.pop(), + (e.label = r), + this.finishNode(e, "LabeledStatement") + ) + }), + (l.parseExpressionStatement = function(e, t) { + return ( + (e.expression = t), + this.semicolon(), + this.finishNode(e, "ExpressionStatement") + ) + }), + (l.parseBlock = function(e) { + var t = this.startNode() + return ( + this.expect(s.types.braceL), + this.parseBlockBody(t, e, !1, s.types.braceR), + this.finishNode(t, "BlockStatement") + ) + }), + (l.parseBlockBody = function(e, t, r, n) { + ;(e.body = []), (e.directives = []) + for ( + var i = !1, s = void 0, a = void 0; + !this.eat(n); + + ) { + i || + !this.state.containsOctal || + a || + (a = this.state.octalPosition) + var o = this.parseStatement(!0, r) + if ( + !t || + i || + "ExpressionStatement" !== o.type || + "StringLiteral" !== o.expression.type || + o.expression.extra.parenthesized + ) + (i = !0), e.body.push(o) + else { + var u = this.stmtToDirective(o) + e.directives.push(u), + void 0 === s && + "use strict" === u.value.value && + ((s = this.state.strict), + this.setStrict(!0), + a && + this.raise( + a, + "Octal literal in strict mode" + )) + } + } + s === !1 && this.setStrict(!1) + }), + (l.parseFor = function(e, t) { + return ( + (e.init = t), + this.expect(s.types.semi), + (e.test = this.match(s.types.semi) + ? null + : this.parseExpression()), + this.expect(s.types.semi), + (e.update = this.match(s.types.parenR) + ? null + : this.parseExpression()), + this.expect(s.types.parenR), + (e.body = this.parseStatement(!1)), + this.state.labels.pop(), + this.finishNode(e, "ForStatement") + ) + }), + (l.parseForIn = function(e, t) { + var r = this.match(s.types._in) + ? "ForInStatement" + : "ForOfStatement" + return ( + this.next(), + (e.left = t), + (e.right = this.parseExpression()), + this.expect(s.types.parenR), + (e.body = this.parseStatement(!1)), + this.state.labels.pop(), + this.finishNode(e, r) + ) + }), + (l.parseVar = function(e, t, r) { + for (e.declarations = [], e.kind = r.keyword; ; ) { + var n = this.startNode() + if ( + (this.parseVarHead(n), + this.eat(s.types.eq) + ? (n.init = this.parseMaybeAssign(t)) + : r !== s.types._const || + this.match(s.types._in) || + this.isContextual("of") + ? "Identifier" === n.id.type || + (t && + (this.match(s.types._in) || + this.isContextual("of"))) + ? (n.init = null) + : this.raise( + this.state.lastTokEnd, + "Complex binding patterns require an initialization value" + ) + : this.unexpected(), + e.declarations.push( + this.finishNode(n, "VariableDeclarator") + ), + !this.eat(s.types.comma)) + ) + break + } + return e + }), + (l.parseVarHead = function(e) { + ;(e.id = this.parseBindingAtom()), + this.checkLVal(e.id, !0) + }), + (l.parseFunction = function(e, t, r, n, i) { + var a = this.state.inMethod + return ( + (this.state.inMethod = !1), + this.initFunction(e, n), + this.match(s.types.star) && + (e.async && !this.hasPlugin("asyncGenerators") + ? this.unexpected() + : ((e.generator = !0), this.next())), + !t || + i || + this.match(s.types.name) || + this.match(s.types._yield) || + this.unexpected(), + (this.match(s.types.name) || + this.match(s.types._yield)) && + (e.id = this.parseBindingIdentifier()), + this.parseFunctionParams(e), + this.parseFunctionBody(e, r), + (this.state.inMethod = a), + this.finishNode( + e, + t ? "FunctionDeclaration" : "FunctionExpression" + ) + ) + }), + (l.parseFunctionParams = function(e) { + this.expect(s.types.parenL), + (e.params = this.parseBindingList( + s.types.parenR, + !1, + this.hasPlugin("trailingFunctionCommas") + )) + }), + (l.parseClass = function(e, t, r) { + return ( + this.next(), + this.parseClassId(e, t, r), + this.parseClassSuper(e), + this.parseClassBody(e), + this.finishNode( + e, + t ? "ClassDeclaration" : "ClassExpression" + ) + ) + }), + (l.isClassProperty = function() { + return this.match(s.types.eq) || this.isLineTerminator() + }), + (l.parseClassBody = function(e) { + var t = this.state.strict + this.state.strict = !0 + var r = !1, + n = !1, + i = [], + a = this.startNode() + for ( + a.body = [], this.expect(s.types.braceL); + !this.eat(s.types.braceR); + + ) + if (!this.eat(s.types.semi)) + if (this.match(s.types.at)) + i.push(this.parseDecorator()) + else { + var o = this.startNode() + i.length && ((o.decorators = i), (i = [])) + var u = !1, + l = + this.match(s.types.name) && + "static" === this.state.value, + c = this.eat(s.types.star), + p = !1, + f = !1 + if ( + (this.parsePropertyName(o), + (o["static"] = + l && !this.match(s.types.parenL)), + o["static"] && + (c && this.unexpected(), + (c = this.eat(s.types.star)), + this.parsePropertyName(o)), + !c && + "Identifier" === o.key.type && + !o.computed) + ) { + if (this.isClassProperty()) { + a.body.push( + this.parseClassProperty(o) + ) + continue + } + this.hasPlugin( + "classConstructorCall" + ) && + "call" === o.key.name && + this.match(s.types.name) && + "constructor" === + this.state.value && + ((u = !0), + this.parsePropertyName(o)) + } + var h = + this.hasPlugin("asyncFunctions") && + !this.match(s.types.parenL) && + !o.computed && + "Identifier" === o.key.type && + "async" === o.key.name + if ( + (h && + (this.hasPlugin( + "asyncGenerators" + ) && + this.eat(s.types.star) && + (c = !0), + (f = !0), + this.parsePropertyName(o)), + (o.kind = "method"), + !o.computed) + ) { + var d = o.key + f || + c || + "Identifier" !== d.type || + this.match(s.types.parenL) || + ("get" !== d.name && + "set" !== d.name) || + ((p = !0), + (o.kind = d.name), + (d = this.parsePropertyName(o))) + var m = + !u && + !o["static"] && + (("Identifier" === d.type && + "constructor" === d.name) || + ("StringLiteral" === d.type && + "constructor" === d.value)) + m && + (n && + this.raise( + d.start, + "Duplicate constructor in the same class" + ), + p && + this.raise( + d.start, + "Constructor can't have get/set modifier" + ), + c && + this.raise( + d.start, + "Constructor can't be a generator" + ), + f && + this.raise( + d.start, + "Constructor can't be an async function" + ), + (o.kind = "constructor"), + (n = !0)) + var y = + o["static"] && + (("Identifier" === d.type && + "prototype" === d.name) || + ("StringLiteral" === d.type && + "prototype" === d.value)) + y && + this.raise( + d.start, + "Classes may not have static property named prototype" + ) + } + if ( + (u && + (r && + this.raise( + o.start, + "Duplicate constructor call in the same class" + ), + (o.kind = "constructorCall"), + (r = !0)), + ("constructor" !== o.kind && + "constructorCall" !== o.kind) || + !o.decorators || + this.raise( + o.start, + "You can't attach decorators to a class constructor" + ), + this.parseClassMethod(a, o, c, f), + p) + ) { + var v = "get" === o.kind ? 0 : 1 + if (o.params.length !== v) { + var g = o.start + "get" === o.kind + ? this.raise( + g, + "getter should have no params" + ) + : this.raise( + g, + "setter should have exactly one param" + ) + } + } + } + i.length && + this.raise( + this.state.start, + "You have trailing decorators with no method" + ), + (e.body = this.finishNode(a, "ClassBody")), + (this.state.strict = t) + }), + (l.parseClassProperty = function(e) { + return ( + this.match(s.types.eq) + ? (this.hasPlugin("classProperties") || + this.unexpected(), + this.next(), + (e.value = this.parseMaybeAssign())) + : (e.value = null), + this.semicolon(), + this.finishNode(e, "ClassProperty") + ) + }), + (l.parseClassMethod = function(e, t, r, n) { + this.parseMethod(t, r, n), + e.body.push(this.finishNode(t, "ClassMethod")) + }), + (l.parseClassId = function(e, t, r) { + this.match(s.types.name) + ? (e.id = this.parseIdentifier()) + : r || !t + ? (e.id = null) + : this.unexpected() + }), + (l.parseClassSuper = function(e) { + e.superClass = this.eat(s.types._extends) + ? this.parseExprSubscripts() + : null + }), + (l.parseExport = function(e) { + if ((this.next(), this.match(s.types.star))) { + var t = this.startNode() + if ( + (this.next(), + !this.hasPlugin("exportExtensions") || + !this.eatContextual("as")) + ) + return ( + this.parseExportFrom(e, !0), + this.finishNode(e, "ExportAllDeclaration") + ) + ;(t.exported = this.parseIdentifier()), + (e.specifiers = [ + this.finishNode( + t, + "ExportNamespaceSpecifier" + ) + ]), + this.parseExportSpecifiersMaybe(e), + this.parseExportFrom(e, !0) + } else if ( + this.hasPlugin("exportExtensions") && + this.isExportDefaultSpecifier() + ) { + var t = this.startNode() + if ( + ((t.exported = this.parseIdentifier(!0)), + (e.specifiers = [ + this.finishNode(t, "ExportDefaultSpecifier") + ]), + this.match(s.types.comma) && + this.lookahead().type === s.types.star) + ) { + this.expect(s.types.comma) + var r = this.startNode() + this.expect(s.types.star), + this.expectContextual("as"), + (r.exported = this.parseIdentifier()), + e.specifiers.push( + this.finishNode( + r, + "ExportNamespaceSpecifier" + ) + ) + } else this.parseExportSpecifiersMaybe(e) + this.parseExportFrom(e, !0) + } else { + if (this.eat(s.types._default)) { + var n = this.startNode(), + i = !1 + return ( + this.eat(s.types._function) + ? (n = this.parseFunction( + n, + !0, + !1, + !1, + !0 + )) + : this.match(s.types._class) + ? (n = this.parseClass(n, !0, !0)) + : ((i = !0), + (n = this.parseMaybeAssign())), + (e.declaration = n), + i && this.semicolon(), + this.checkExport(e), + this.finishNode( + e, + "ExportDefaultDeclaration" + ) + ) + } + this.state.type.keyword || + this.shouldParseExportDeclaration() + ? ((e.specifiers = []), + (e.source = null), + (e.declaration = this.parseExportDeclaration( + e + ))) + : ((e.declaration = null), + (e.specifiers = this.parseExportSpecifiers()), + this.parseExportFrom(e)) + } + return ( + this.checkExport(e), + this.finishNode(e, "ExportNamedDeclaration") + ) + }), + (l.parseExportDeclaration = function() { + return this.parseStatement(!0) + }), + (l.isExportDefaultSpecifier = function() { + if (this.match(s.types.name)) + return ( + "type" !== this.state.value && + "async" !== this.state.value && + "interface" !== this.state.value + ) + if (!this.match(s.types._default)) return !1 + var e = this.lookahead() + return ( + e.type === s.types.comma || + (e.type === s.types.name && "from" === e.value) + ) + }), + (l.parseExportSpecifiersMaybe = function(e) { + this.eat(s.types.comma) && + (e.specifiers = e.specifiers.concat( + this.parseExportSpecifiers() + )) + }), + (l.parseExportFrom = function(e, t) { + this.eatContextual("from") + ? ((e.source = this.match(s.types.string) + ? this.parseExprAtom() + : this.unexpected()), + this.checkExport(e)) + : t + ? this.unexpected() + : (e.source = null), + this.semicolon() + }), + (l.shouldParseExportDeclaration = function() { + return ( + this.hasPlugin("asyncFunctions") && + this.isContextual("async") + ) + }), + (l.checkExport = function(e) { + if (this.state.decorators.length) { + var t = + e.declaration && + ("ClassDeclaration" === e.declaration.type || + "ClassExpression" === e.declaration.type) + ;(e.declaration && t) || + this.raise( + e.start, + "You can only use decorators on an export when exporting a class" + ), + this.takeDecorators(e.declaration) + } + }), + (l.parseExportSpecifiers = function() { + var e = [], + t = !0, + r = void 0 + for ( + this.expect(s.types.braceL); + !this.eat(s.types.braceR); + + ) { + if (t) t = !1 + else if ( + (this.expect(s.types.comma), + this.eat(s.types.braceR)) + ) + break + var n = this.match(s.types._default) + n && !r && (r = !0) + var i = this.startNode() + ;(i.local = this.parseIdentifier(n)), + (i.exported = this.eatContextual("as") + ? this.parseIdentifier(!0) + : i.local.__clone()), + e.push(this.finishNode(i, "ExportSpecifier")) + } + return ( + r && + !this.isContextual("from") && + this.unexpected(), + e + ) + }), + (l.parseImport = function(e) { + return ( + this.next(), + this.match(s.types.string) + ? ((e.specifiers = []), + (e.source = this.parseExprAtom())) + : ((e.specifiers = []), + this.parseImportSpecifiers(e), + this.expectContextual("from"), + (e.source = this.match(s.types.string) + ? this.parseExprAtom() + : this.unexpected())), + this.semicolon(), + this.finishNode(e, "ImportDeclaration") + ) + }), + (l.parseImportSpecifiers = function(e) { + var t = !0 + if (this.match(s.types.name)) { + var r = this.state.start, + n = this.state.startLoc + if ( + (e.specifiers.push( + this.parseImportSpecifierDefault( + this.parseIdentifier(), + r, + n + ) + ), + !this.eat(s.types.comma)) + ) + return + } + if (this.match(s.types.star)) { + var i = this.startNode() + return ( + this.next(), + this.expectContextual("as"), + (i.local = this.parseIdentifier()), + this.checkLVal(i.local, !0), + void e.specifiers.push( + this.finishNode( + i, + "ImportNamespaceSpecifier" + ) + ) + ) + } + for ( + this.expect(s.types.braceL); + !this.eat(s.types.braceR); + + ) { + if (t) t = !1 + else if ( + (this.expect(s.types.comma), + this.eat(s.types.braceR)) + ) + break + var i = this.startNode() + ;(i.imported = this.parseIdentifier(!0)), + (i.local = this.eatContextual("as") + ? this.parseIdentifier() + : i.imported.__clone()), + this.checkLVal(i.local, !0), + e.specifiers.push( + this.finishNode(i, "ImportSpecifier") + ) + } + }), + (l.parseImportSpecifierDefault = function(e, t, r) { + var n = this.startNodeAt(t, r) + return ( + (n.local = e), + this.checkLVal(n.local, !0), + this.finishNode(n, "ImportDefaultSpecifier") + ) + }) + }, + { 17: 17, 20: 20, 21: 21, 25: 25, 5: 5 } + ], + 10: [ + function(e, t, r) { + "use strict" + var n = e(25)["default"], + i = e(17), + s = e(5), + a = n(s), + o = e(20), + u = a["default"].prototype + ;(u.addExtra = function(e, t, r) { + if (e) { + var n = (e.extra = e.extra || {}) + n[t] = r + } + }), + (u.isRelational = function(e) { + return ( + this.match(i.types.relational) && + this.state.value === e + ) + }), + (u.expectRelational = function(e) { + this.isRelational(e) ? this.next() : this.unexpected() + }), + (u.isContextual = function(e) { + return ( + this.match(i.types.name) && this.state.value === e + ) + }), + (u.eatContextual = function(e) { + return this.state.value === e && this.eat(i.types.name) + }), + (u.expectContextual = function(e) { + this.eatContextual(e) || this.unexpected() + }), + (u.canInsertSemicolon = function() { + return ( + this.match(i.types.eof) || + this.match(i.types.braceR) || + o.lineBreak.test( + this.input.slice( + this.state.lastTokEnd, + this.state.start + ) + ) + ) + }), + (u.isLineTerminator = function() { + return ( + this.eat(i.types.semi) || this.canInsertSemicolon() + ) + }), + (u.semicolon = function() { + this.isLineTerminator() || this.unexpected() + }), + (u.expect = function(e) { + return this.eat(e) || this.unexpected() + }), + (u.unexpected = function(e) { + this.raise( + null != e ? e : this.state.start, + "Unexpected token" + ) + }) + }, + { 17: 17, 20: 20, 25: 25, 5: 5 } + ], + 11: [ + function(e, t, r) { + "use strict" + var n = e(25)["default"] + r.__esModule = !0 + var i = e(17), + s = e(5), + a = n(s), + o = a["default"].prototype + ;(o.flowParseTypeInitialiser = function(e, t) { + var r = this.state.inType + ;(this.state.inType = !0), + this.expect(e || i.types.colon), + t && + (this.match(i.types.bitwiseAND) || + this.match(i.types.bitwiseOR)) && + this.next() + var n = this.flowParseType() + return (this.state.inType = r), n + }), + (o.flowParseDeclareClass = function(e) { + return ( + this.next(), + this.flowParseInterfaceish(e, !0), + this.finishNode(e, "DeclareClass") + ) + }), + (o.flowParseDeclareFunction = function(e) { + this.next() + var t = (e.id = this.parseIdentifier()), + r = this.startNode(), + n = this.startNode() + this.isRelational("<") + ? (r.typeParameters = this.flowParseTypeParameterDeclaration()) + : (r.typeParameters = null), + this.expect(i.types.parenL) + var s = this.flowParseFunctionTypeParams() + return ( + (r.params = s.params), + (r.rest = s.rest), + this.expect(i.types.parenR), + (r.returnType = this.flowParseTypeInitialiser()), + (n.typeAnnotation = this.finishNode( + r, + "FunctionTypeAnnotation" + )), + (t.typeAnnotation = this.finishNode( + n, + "TypeAnnotation" + )), + this.finishNode(t, t.type), + this.semicolon(), + this.finishNode(e, "DeclareFunction") + ) + }), + (o.flowParseDeclare = function(e) { + return this.match(i.types._class) + ? this.flowParseDeclareClass(e) + : this.match(i.types._function) + ? this.flowParseDeclareFunction(e) + : this.match(i.types._var) + ? this.flowParseDeclareVariable(e) + : this.isContextual("module") + ? this.flowParseDeclareModule(e) + : this.isContextual("type") + ? this.flowParseDeclareTypeAlias(e) + : this.isContextual("interface") + ? this.flowParseDeclareInterface(e) + : void this.unexpected() + }), + (o.flowParseDeclareVariable = function(e) { + return ( + this.next(), + (e.id = this.flowParseTypeAnnotatableIdentifier()), + this.semicolon(), + this.finishNode(e, "DeclareVariable") + ) + }), + (o.flowParseDeclareModule = function(e) { + this.next(), + this.match(i.types.string) + ? (e.id = this.parseExprAtom()) + : (e.id = this.parseIdentifier()) + var t = (e.body = this.startNode()), + r = (t.body = []) + for ( + this.expect(i.types.braceL); + !this.match(i.types.braceR); + + ) { + var n = this.startNode() + this.next(), r.push(this.flowParseDeclare(n)) + } + return ( + this.expect(i.types.braceR), + this.finishNode(t, "BlockStatement"), + this.finishNode(e, "DeclareModule") + ) + }), + (o.flowParseDeclareTypeAlias = function(e) { + return ( + this.next(), + this.flowParseTypeAlias(e), + this.finishNode(e, "DeclareTypeAlias") + ) + }), + (o.flowParseDeclareInterface = function(e) { + return ( + this.next(), + this.flowParseInterfaceish(e), + this.finishNode(e, "DeclareInterface") + ) + }), + (o.flowParseInterfaceish = function(e, t) { + if ( + ((e.id = this.parseIdentifier()), + this.isRelational("<") + ? (e.typeParameters = this.flowParseTypeParameterDeclaration()) + : (e.typeParameters = null), + (e["extends"] = []), + (e.mixins = []), + this.eat(i.types._extends)) + ) + do + e["extends"].push( + this.flowParseInterfaceExtends() + ) + while (this.eat(i.types.comma)) + if (this.isContextual("mixins")) { + this.next() + do e.mixins.push(this.flowParseInterfaceExtends()) + while (this.eat(i.types.comma)) + } + e.body = this.flowParseObjectType(t) + }), + (o.flowParseInterfaceExtends = function() { + var e = this.startNode() + return ( + (e.id = this.parseIdentifier()), + this.isRelational("<") + ? (e.typeParameters = this.flowParseTypeParameterInstantiation()) + : (e.typeParameters = null), + this.finishNode(e, "InterfaceExtends") + ) + }), + (o.flowParseInterface = function(e) { + return ( + this.flowParseInterfaceish(e, !1), + this.finishNode(e, "InterfaceDeclaration") + ) + }), + (o.flowParseTypeAlias = function(e) { + return ( + (e.id = this.parseIdentifier()), + this.isRelational("<") + ? (e.typeParameters = this.flowParseTypeParameterDeclaration()) + : (e.typeParameters = null), + (e.right = this.flowParseTypeInitialiser( + i.types.eq, + !0 + )), + this.semicolon(), + this.finishNode(e, "TypeAlias") + ) + }), + (o.flowParseTypeParameterDeclaration = function() { + var e = this.startNode() + for ( + e.params = [], this.expectRelational("<"); + !this.isRelational(">"); + + ) + e.params.push( + this.flowParseExistentialTypeParam() || + this.flowParseTypeAnnotatableIdentifier() + ), + this.isRelational(">") || + this.expect(i.types.comma) + return ( + this.expectRelational(">"), + this.finishNode(e, "TypeParameterDeclaration") + ) + }), + (o.flowParseExistentialTypeParam = function() { + if (this.match(i.types.star)) { + var e = this.startNode() + return ( + this.next(), + this.finishNode(e, "ExistentialTypeParam") + ) + } + }), + (o.flowParseTypeParameterInstantiation = function() { + var e = this.startNode(), + t = this.state.inType + for ( + e.params = [], + this.state.inType = !0, + this.expectRelational("<"); + !this.isRelational(">"); + + ) + e.params.push( + this.flowParseExistentialTypeParam() || + this.flowParseType() + ), + this.isRelational(">") || + this.expect(i.types.comma) + return ( + this.expectRelational(">"), + (this.state.inType = t), + this.finishNode(e, "TypeParameterInstantiation") + ) + }), + (o.flowParseObjectPropertyKey = function() { + return this.match(i.types.num) || + this.match(i.types.string) + ? this.parseExprAtom() + : this.parseIdentifier(!0) + }), + (o.flowParseObjectTypeIndexer = function(e, t) { + return ( + (e["static"] = t), + this.expect(i.types.bracketL), + (e.id = this.flowParseObjectPropertyKey()), + (e.key = this.flowParseTypeInitialiser()), + this.expect(i.types.bracketR), + (e.value = this.flowParseTypeInitialiser()), + this.flowObjectTypeSemicolon(), + this.finishNode(e, "ObjectTypeIndexer") + ) + }), + (o.flowParseObjectTypeMethodish = function(e) { + for ( + e.params = [], + e.rest = null, + e.typeParameters = null, + this.isRelational("<") && + (e.typeParameters = this.flowParseTypeParameterDeclaration()), + this.expect(i.types.parenL); + this.match(i.types.name); + + ) + e.params.push(this.flowParseFunctionTypeParam()), + this.match(i.types.parenR) || + this.expect(i.types.comma) + return ( + this.eat(i.types.ellipsis) && + (e.rest = this.flowParseFunctionTypeParam()), + this.expect(i.types.parenR), + (e.returnType = this.flowParseTypeInitialiser()), + this.finishNode(e, "FunctionTypeAnnotation") + ) + }), + (o.flowParseObjectTypeMethod = function(e, t, r, n) { + var i = this.startNodeAt(e, t) + return ( + (i.value = this.flowParseObjectTypeMethodish( + this.startNodeAt(e, t) + )), + (i["static"] = r), + (i.key = n), + (i.optional = !1), + this.flowObjectTypeSemicolon(), + this.finishNode(i, "ObjectTypeProperty") + ) + }), + (o.flowParseObjectTypeCallProperty = function(e, t) { + var r = this.startNode() + return ( + (e["static"] = t), + (e.value = this.flowParseObjectTypeMethodish(r)), + this.flowObjectTypeSemicolon(), + this.finishNode(e, "ObjectTypeCallProperty") + ) + }), + (o.flowParseObjectType = function(e) { + var t = this.startNode(), + r = void 0, + n = void 0, + s = void 0 + for ( + t.callProperties = [], + t.properties = [], + t.indexers = [], + this.expect(i.types.braceL); + !this.match(i.types.braceR); + + ) { + var a = !1, + o = this.state.start, + u = this.state.startLoc + ;(r = this.startNode()), + e && + this.isContextual("static") && + (this.next(), (s = !0)), + this.match(i.types.bracketL) + ? t.indexers.push( + this.flowParseObjectTypeIndexer(r, s) + ) + : this.match(i.types.parenL) || + this.isRelational("<") + ? t.callProperties.push( + this.flowParseObjectTypeCallProperty( + r, + e + ) + ) + : ((n = + s && this.match(i.types.colon) + ? this.parseIdentifier() + : this.flowParseObjectPropertyKey()), + this.isRelational("<") || + this.match(i.types.parenL) + ? t.properties.push( + this.flowParseObjectTypeMethod( + o, + u, + s, + n + ) + ) + : (this.eat(i.types.question) && + (a = !0), + (r.key = n), + (r.value = this.flowParseTypeInitialiser()), + (r.optional = a), + (r["static"] = s), + this.flowObjectTypeSemicolon(), + t.properties.push( + this.finishNode( + r, + "ObjectTypeProperty" + ) + ))) + } + return ( + this.expect(i.types.braceR), + this.finishNode(t, "ObjectTypeAnnotation") + ) + }), + (o.flowObjectTypeSemicolon = function() { + this.eat(i.types.semi) || + this.eat(i.types.comma) || + this.match(i.types.braceR) || + this.unexpected() + }), + (o.flowParseGenericType = function(e, t, r) { + var n = this.startNodeAt(e, t) + for ( + n.typeParameters = null, n.id = r; + this.eat(i.types.dot); + + ) { + var s = this.startNodeAt(e, t) + ;(s.qualification = n.id), + (s.id = this.parseIdentifier()), + (n.id = this.finishNode( + s, + "QualifiedTypeIdentifier" + )) + } + return ( + this.isRelational("<") && + (n.typeParameters = this.flowParseTypeParameterInstantiation()), + this.finishNode(n, "GenericTypeAnnotation") + ) + }), + (o.flowParseTypeofType = function() { + var e = this.startNode() + return ( + this.expect(i.types._typeof), + (e.argument = this.flowParsePrimaryType()), + this.finishNode(e, "TypeofTypeAnnotation") + ) + }), + (o.flowParseTupleType = function() { + var e = this.startNode() + for ( + e.types = [], this.expect(i.types.bracketL); + this.state.pos < this.input.length && + !this.match(i.types.bracketR) && + (e.types.push(this.flowParseType()), + !this.match(i.types.bracketR)); + + ) + this.expect(i.types.comma) + return ( + this.expect(i.types.bracketR), + this.finishNode(e, "TupleTypeAnnotation") + ) + }), + (o.flowParseFunctionTypeParam = function() { + var e = !1, + t = this.startNode() + return ( + (t.name = this.parseIdentifier()), + this.eat(i.types.question) && (e = !0), + (t.optional = e), + (t.typeAnnotation = this.flowParseTypeInitialiser()), + this.finishNode(t, "FunctionTypeParam") + ) + }), + (o.flowParseFunctionTypeParams = function() { + for ( + var e = { params: [], rest: null }; + this.match(i.types.name); + + ) + e.params.push(this.flowParseFunctionTypeParam()), + this.match(i.types.parenR) || + this.expect(i.types.comma) + return ( + this.eat(i.types.ellipsis) && + (e.rest = this.flowParseFunctionTypeParam()), + e + ) + }), + (o.flowIdentToTypeAnnotation = function(e, t, r, n) { + switch (n.name) { + case "any": + return this.finishNode(r, "AnyTypeAnnotation") + case "void": + return this.finishNode(r, "VoidTypeAnnotation") + case "bool": + case "boolean": + return this.finishNode( + r, + "BooleanTypeAnnotation" + ) + case "mixed": + return this.finishNode(r, "MixedTypeAnnotation") + case "number": + return this.finishNode( + r, + "NumberTypeAnnotation" + ) + case "string": + return this.finishNode( + r, + "StringTypeAnnotation" + ) + default: + return this.flowParseGenericType(e, t, n) + } + }), + (o.flowParsePrimaryType = function() { + var e = this.state.start, + t = this.state.startLoc, + r = this.startNode(), + n = void 0, + s = void 0, + a = !1 + switch (this.state.type) { + case i.types.name: + return this.flowIdentToTypeAnnotation( + e, + t, + r, + this.parseIdentifier() + ) + case i.types.braceL: + return this.flowParseObjectType() + case i.types.bracketL: + return this.flowParseTupleType() + case i.types.relational: + if ("<" === this.state.value) + return ( + (r.typeParameters = this.flowParseTypeParameterDeclaration()), + this.expect(i.types.parenL), + (n = this.flowParseFunctionTypeParams()), + (r.params = n.params), + (r.rest = n.rest), + this.expect(i.types.parenR), + this.expect(i.types.arrow), + (r.returnType = this.flowParseType()), + this.finishNode( + r, + "FunctionTypeAnnotation" + ) + ) + case i.types.parenL: + if ( + (this.next(), + !this.match(i.types.parenR) && + !this.match(i.types.ellipsis)) + ) + if (this.match(i.types.name)) { + var o = this.lookahead().type + a = + o !== i.types.question && + o !== i.types.colon + } else a = !0 + return a + ? ((s = this.flowParseType()), + this.expect(i.types.parenR), + this.eat(i.types.arrow) && + this.raise( + r, + "Unexpected token =>. It looks like you are trying to write a function type, but you ended up writing a grouped type followed by an =>, which is a syntax error. Remember, function type parameters are named so function types look like (name1: type1, name2: type2) => returnType. You probably wrote (type1) => returnType" + ), + s) + : ((n = this.flowParseFunctionTypeParams()), + (r.params = n.params), + (r.rest = n.rest), + this.expect(i.types.parenR), + this.expect(i.types.arrow), + (r.returnType = this.flowParseType()), + (r.typeParameters = null), + this.finishNode( + r, + "FunctionTypeAnnotation" + )) + case i.types.string: + return ( + (r.value = this.state.value), + this.addExtra(r, "rawValue", r.value), + this.addExtra( + r, + "raw", + this.input.slice( + this.state.start, + this.state.end + ) + ), + this.next(), + this.finishNode( + r, + "StringLiteralTypeAnnotation" + ) + ) + case i.types._true: + case i.types._false: + return ( + (r.value = this.match(i.types._true)), + this.next(), + this.finishNode( + r, + "BooleanLiteralTypeAnnotation" + ) + ) + case i.types.num: + return ( + (r.value = this.state.value), + this.addExtra(r, "rawValue", r.value), + this.addExtra( + r, + "raw", + this.input.slice( + this.state.start, + this.state.end + ) + ), + this.next(), + this.finishNode( + r, + "NumericLiteralTypeAnnotation" + ) + ) + case i.types._null: + return ( + (r.value = this.match(i.types._null)), + this.next(), + this.finishNode( + r, + "NullLiteralTypeAnnotation" + ) + ) + case i.types._this: + return ( + (r.value = this.match(i.types._this)), + this.next(), + this.finishNode(r, "ThisTypeAnnotation") + ) + default: + if ("typeof" === this.state.type.keyword) + return this.flowParseTypeofType() + } + this.unexpected() + }), + (o.flowParsePostfixType = function() { + var e = this.startNode(), + t = (e.elementType = this.flowParsePrimaryType()) + return this.match(i.types.bracketL) + ? (this.expect(i.types.bracketL), + this.expect(i.types.bracketR), + this.finishNode(e, "ArrayTypeAnnotation")) + : t + }), + (o.flowParsePrefixType = function() { + var e = this.startNode() + return this.eat(i.types.question) + ? ((e.typeAnnotation = this.flowParsePrefixType()), + this.finishNode(e, "NullableTypeAnnotation")) + : this.flowParsePostfixType() + }), + (o.flowParseIntersectionType = function() { + var e = this.startNode(), + t = this.flowParsePrefixType() + for (e.types = [t]; this.eat(i.types.bitwiseAND); ) + e.types.push(this.flowParsePrefixType()) + return 1 === e.types.length + ? t + : this.finishNode(e, "IntersectionTypeAnnotation") + }), + (o.flowParseUnionType = function() { + var e = this.startNode(), + t = this.flowParseIntersectionType() + for (e.types = [t]; this.eat(i.types.bitwiseOR); ) + e.types.push(this.flowParseIntersectionType()) + return 1 === e.types.length + ? t + : this.finishNode(e, "UnionTypeAnnotation") + }), + (o.flowParseType = function() { + var e = this.state.inType + this.state.inType = !0 + var t = this.flowParseUnionType() + return (this.state.inType = e), t + }), + (o.flowParseTypeAnnotation = function() { + var e = this.startNode() + return ( + (e.typeAnnotation = this.flowParseTypeInitialiser()), + this.finishNode(e, "TypeAnnotation") + ) + }), + (o.flowParseTypeAnnotatableIdentifier = function(e, t) { + var r = this.parseIdentifier(), + n = !1 + return ( + t && + this.eat(i.types.question) && + (this.expect(i.types.question), (n = !0)), + (e || this.match(i.types.colon)) && + ((r.typeAnnotation = this.flowParseTypeAnnotation()), + this.finishNode(r, r.type)), + n && + ((r.optional = !0), this.finishNode(r, r.type)), + r + ) + }), + (r["default"] = function(e) { + function t(e) { + return ( + (e.expression.typeAnnotation = + e.typeAnnotation), + e.expression + ) + } + e.extend("parseFunctionBody", function(e) { + return function(t, r) { + return ( + this.match(i.types.colon) && + !r && + (t.returnType = this.flowParseTypeAnnotation()), + e.call(this, t, r) + ) + } + }), + e.extend("parseStatement", function(e) { + return function(t, r) { + if ( + this.state.strict && + this.match(i.types.name) && + "interface" === this.state.value + ) { + var n = this.startNode() + return ( + this.next(), + this.flowParseInterface(n) + ) + } + return e.call(this, t, r) + } + }), + e.extend("parseExpressionStatement", function(e) { + return function(t, r) { + if ("Identifier" === r.type) + if ("declare" === r.name) { + if ( + this.match(i.types._class) || + this.match(i.types.name) || + this.match(i.types._function) || + this.match(i.types._var) + ) + return this.flowParseDeclare(t) + } else if (this.match(i.types.name)) { + if ("interface" === r.name) + return this.flowParseInterface( + t + ) + if ("type" === r.name) + return this.flowParseTypeAlias( + t + ) + } + return e.call(this, t, r) + } + }), + e.extend("shouldParseExportDeclaration", function( + e + ) { + return function() { + return ( + this.isContextual("type") || + this.isContextual("interface") || + e.call(this) + ) + } + }), + e.extend("parseParenItem", function() { + return function(e, t, r, n) { + var s = (this.state.potentialArrowAt = r) + if (this.match(i.types.colon)) { + var a = this.startNodeAt(t, r) + if ( + ((a.expression = e), + (a.typeAnnotation = this.flowParseTypeAnnotation()), + n && + !this.match(i.types.arrow) && + this.unexpected(), + s && this.eat(i.types.arrow)) + ) { + var o = + "SequenceExpression" === + e.type + ? e.expressions + : [e], + u = this.parseArrowExpression( + this.startNodeAt(t, r), + o + ) + return ( + (u.returnType = + a.typeAnnotation), + u + ) + } + return this.finishNode( + a, + "TypeCastExpression" + ) + } + return e + } + }), + e.extend("parseExport", function(e) { + return function(t) { + return ( + (t = e.call(this, t)), + "ExportNamedDeclaration" === t.type && + (t.exportKind = + t.exportKind || "value"), + t + ) + } + }), + e.extend("parseExportDeclaration", function(e) { + return function(t) { + if (this.isContextual("type")) { + t.exportKind = "type" + var r = this.startNode() + return ( + this.next(), + this.match(i.types.braceL) + ? ((t.specifiers = this.parseExportSpecifiers()), + this.parseExportFrom(t), + null) + : this.flowParseTypeAlias(r) + ) + } + if (this.isContextual("interface")) { + t.exportKind = "type" + var r = this.startNode() + return ( + this.next(), + this.flowParseInterface(r) + ) + } + return e.call(this, t) + } + }), + e.extend("parseClassId", function(e) { + return function(t) { + e.apply(this, arguments), + this.isRelational("<") && + (t.typeParameters = this.flowParseTypeParameterDeclaration()) + } + }), + e.extend("isKeyword", function(e) { + return function(t) { + return this.state.inType && "void" === t + ? !1 + : e.call(this, t) + } + }), + e.extend("readToken", function(e) { + return function(t) { + return !this.state.inType || + (62 !== t && 60 !== t) + ? e.call(this, t) + : this.finishOp(i.types.relational, 1) + } + }), + e.extend("jsx_readToken", function(e) { + return function() { + return this.state.inType + ? void 0 + : e.call(this) + } + }), + e.extend("toAssignable", function(e) { + return function(r) { + return "TypeCastExpression" === r.type + ? t(r) + : e.apply(this, arguments) + } + }), + e.extend("toAssignableList", function(e) { + return function(r, n) { + for (var i = 0; i < r.length; i++) { + var s = r[i] + s && + "TypeCastExpression" === s.type && + (r[i] = t(s)) + } + return e.call(this, r, n) + } + }), + e.extend("toReferencedList", function() { + return function(e) { + for (var t = 0; t < e.length; t++) { + var r = e[t] + r && + r._exprListItem && + "TypeCastExpression" === r.type && + this.raise( + r.start, + "Unexpected type cast" + ) + } + return e + } + }), + e.extend("parseExprListItem", function(e) { + return function(t, r) { + var n = this.startNode(), + s = e.call(this, t, r) + return this.match(i.types.colon) + ? ((n._exprListItem = !0), + (n.expression = s), + (n.typeAnnotation = this.flowParseTypeAnnotation()), + this.finishNode( + n, + "TypeCastExpression" + )) + : s + } + }), + e.extend("checkLVal", function(e) { + return function(t) { + return "TypeCastExpression" !== t.type + ? e.apply(this, arguments) + : void 0 + } + }), + e.extend("parseClassProperty", function(e) { + return function(t) { + return ( + this.match(i.types.colon) && + (t.typeAnnotation = this.flowParseTypeAnnotation()), + e.call(this, t) + ) + } + }), + e.extend("isClassProperty", function(e) { + return function() { + return ( + this.match(i.types.colon) || + e.call(this) + ) + } + }), + e.extend("parseClassMethod", function() { + return function(e, t, r, n) { + this.isRelational("<") && + (t.typeParameters = this.flowParseTypeParameterDeclaration()), + this.parseMethod(t, r, n), + e.body.push( + this.finishNode(t, "ClassMethod") + ) + } + }), + e.extend("parseClassSuper", function(e) { + return function(t, r) { + if ( + (e.call(this, t, r), + t.superClass && + this.isRelational("<") && + (t.superTypeParameters = this.flowParseTypeParameterInstantiation()), + this.isContextual("implements")) + ) { + this.next() + var n = (t["implements"] = []) + do { + var s = this.startNode() + ;(s.id = this.parseIdentifier()), + this.isRelational("<") + ? (s.typeParameters = this.flowParseTypeParameterInstantiation()) + : (s.typeParameters = null), + n.push( + this.finishNode( + s, + "ClassImplements" + ) + ) + } while (this.eat(i.types.comma)) + } + } + }), + e.extend("parseObjPropValue", function(e) { + return function(t) { + var r = void 0 + this.isRelational("<") && + ((r = this.flowParseTypeParameterDeclaration()), + this.match(i.types.parenL) || + this.unexpected()), + e.apply(this, arguments), + r && ((t.value || t).typeParameters = r) + } + }), + e.extend( + "parseAssignableListItemTypes", + function() { + return function(e) { + return ( + this.eat(i.types.question) && + (e.optional = !0), + this.match(i.types.colon) && + (e.typeAnnotation = this.flowParseTypeAnnotation()), + this.finishNode(e, e.type), + e + ) + } + } + ), + e.extend("parseImportSpecifiers", function(e) { + return function(t) { + t.importKind = "value" + var r = null + if ( + (this.match(i.types._typeof) + ? (r = "typeof") + : this.isContextual("type") && + (r = "type"), + r) + ) { + var n = this.lookahead() + ;((n.type === i.types.name && + "from" !== n.value) || + n.type === i.types.braceL || + n.type === i.types.star) && + (this.next(), (t.importKind = r)) + } + e.call(this, t) + } + }), + e.extend("parseFunctionParams", function(e) { + return function(t) { + this.isRelational("<") && + (t.typeParameters = this.flowParseTypeParameterDeclaration()), + e.call(this, t) + } + }), + e.extend("parseVarHead", function(e) { + return function(t) { + e.call(this, t), + this.match(i.types.colon) && + ((t.id.typeAnnotation = this.flowParseTypeAnnotation()), + this.finishNode(t.id, t.id.type)) + } + }), + e.extend( + "parseAsyncArrowFromCallExpression", + function(e) { + return function(t, r) { + return ( + this.match(i.types.colon) && + (t.returnType = this.flowParseTypeAnnotation()), + e.call(this, t, r) + ) + } + } + ), + e.extend("shouldParseAsyncArrow", function(e) { + return function() { + return ( + this.match(i.types.colon) || + e.call(this) + ) + } + }), + e.extend( + "parseParenAndDistinguishExpression", + function(e) { + return function(t, r, n, s) { + if ( + ((t = t || this.state.start), + (r = r || this.state.startLoc), + n && + this.lookahead().type === + i.types.parenR) + ) { + this.expect(i.types.parenL), + this.expect(i.types.parenR) + var a = this.startNodeAt(t, r) + return ( + this.match(i.types.colon) && + (a.returnType = this.flowParseTypeAnnotation()), + this.expect(i.types.arrow), + this.parseArrowExpression( + a, + [], + s + ) + ) + } + var a = e.call( + this, + t, + r, + n, + s, + this.hasPlugin( + "trailingFunctionCommas" + ) + ) + if (!this.match(i.types.colon)) return a + var o = this.state.clone() + try { + return this.parseParenItem( + a, + t, + r, + !0 + ) + } catch (u) { + if (u instanceof SyntaxError) + return (this.state = o), a + throw u + } + } + } + ) + }), + (t.exports = r["default"]) + }, + { 17: 17, 25: 25, 5: 5 } + ], + 12: [ + function(e, t, r) { + "use strict" + function n(e) { + return "JSXIdentifier" === e.type + ? e.name + : "JSXNamespacedName" === e.type + ? e.namespace.name + ":" + e.name.name + : "JSXMemberExpression" === e.type + ? n(e.object) + "." + n(e.property) + : void 0 + } + var i = e(25)["default"] + r.__esModule = !0 + var s = e(13), + a = i(s), + o = e(17), + u = e(14), + l = e(5), + c = i(l), + p = e(18), + f = e(20), + h = /^[\da-fA-F]+$/, + d = /^\d+$/ + ;(u.types.j_oTag = new u.TokContext("...", + !0, + !0 + )), + (o.types.jsxName = new o.TokenType("jsxName")), + (o.types.jsxText = new o.TokenType("jsxText", { + beforeExpr: !0 + })), + (o.types.jsxTagStart = new o.TokenType("jsxTagStart")), + (o.types.jsxTagEnd = new o.TokenType("jsxTagEnd")), + (o.types.jsxTagStart.updateContext = function() { + this.state.context.push(u.types.j_expr), + this.state.context.push(u.types.j_oTag), + (this.state.exprAllowed = !1) + }), + (o.types.jsxTagEnd.updateContext = function(e) { + var t = this.state.context.pop() + ;(t === u.types.j_oTag && e === o.types.slash) || + t === u.types.j_cTag + ? (this.state.context.pop(), + (this.state.exprAllowed = + this.curContext() === u.types.j_expr)) + : (this.state.exprAllowed = !0) + }) + var m = c["default"].prototype + ;(m.jsxReadToken = function() { + for (var e = "", t = this.state.pos; ; ) { + this.state.pos >= this.input.length && + this.raise( + this.state.start, + "Unterminated JSX contents" + ) + var r = this.input.charCodeAt(this.state.pos) + switch (r) { + case 60: + case 123: + return this.state.pos === this.state.start + ? 60 === r && this.state.exprAllowed + ? (++this.state.pos, + this.finishToken(o.types.jsxTagStart)) + : this.getTokenFromCode(r) + : ((e += this.input.slice( + t, + this.state.pos + )), + this.finishToken(o.types.jsxText, e)) + case 38: + ;(e += this.input.slice(t, this.state.pos)), + (e += this.jsxReadEntity()), + (t = this.state.pos) + break + default: + f.isNewLine(r) + ? ((e += this.input.slice( + t, + this.state.pos + )), + (e += this.jsxReadNewLine(!0)), + (t = this.state.pos)) + : ++this.state.pos + } + } + }), + (m.jsxReadNewLine = function(e) { + var t = this.input.charCodeAt(this.state.pos), + r = void 0 + return ( + ++this.state.pos, + 13 === t && + 10 === this.input.charCodeAt(this.state.pos) + ? (++this.state.pos, (r = e ? "\n" : "\r\n")) + : (r = String.fromCharCode(t)), + ++this.state.curLine, + (this.state.lineStart = this.state.pos), + r + ) + }), + (m.jsxReadString = function(e) { + for (var t = "", r = ++this.state.pos; ; ) { + this.state.pos >= this.input.length && + this.raise( + this.state.start, + "Unterminated string constant" + ) + var n = this.input.charCodeAt(this.state.pos) + if (n === e) break + 38 === n + ? ((t += this.input.slice(r, this.state.pos)), + (t += this.jsxReadEntity()), + (r = this.state.pos)) + : f.isNewLine(n) + ? ((t += this.input.slice(r, this.state.pos)), + (t += this.jsxReadNewLine(!1)), + (r = this.state.pos)) + : ++this.state.pos + } + return ( + (t += this.input.slice(r, this.state.pos++)), + this.finishToken(o.types.string, t) + ) + }), + (m.jsxReadEntity = function() { + for ( + var e = "", + t = 0, + r = void 0, + n = this.input[this.state.pos], + i = ++this.state.pos; + this.state.pos < this.input.length && t++ < 10; + + ) { + if ( + ((n = this.input[this.state.pos++]), ";" === n) + ) { + "#" === e[0] + ? "x" === e[1] + ? ((e = e.substr(2)), + h.test(e) && + (r = String.fromCharCode( + parseInt(e, 16) + ))) + : ((e = e.substr(1)), + d.test(e) && + (r = String.fromCharCode( + parseInt(e, 10) + ))) + : (r = a["default"][e]) + break + } + e += n + } + return r ? r : ((this.state.pos = i), "&") + }), + (m.jsxReadWord = function() { + var e = void 0, + t = this.state.pos + do e = this.input.charCodeAt(++this.state.pos) + while (p.isIdentifierChar(e) || 45 === e) + return this.finishToken( + o.types.jsxName, + this.input.slice(t, this.state.pos) + ) + }), + (m.jsxParseIdentifier = function() { + var e = this.startNode() + return ( + this.match(o.types.jsxName) + ? (e.name = this.state.value) + : this.state.type.keyword + ? (e.name = this.state.type.keyword) + : this.unexpected(), + this.next(), + this.finishNode(e, "JSXIdentifier") + ) + }), + (m.jsxParseNamespacedName = function() { + var e = this.state.start, + t = this.state.startLoc, + r = this.jsxParseIdentifier() + if (!this.eat(o.types.colon)) return r + var n = this.startNodeAt(e, t) + return ( + (n.namespace = r), + (n.name = this.jsxParseIdentifier()), + this.finishNode(n, "JSXNamespacedName") + ) + }), + (m.jsxParseElementName = function() { + for ( + var e = this.state.start, + t = this.state.startLoc, + r = this.jsxParseNamespacedName(); + this.eat(o.types.dot); + + ) { + var n = this.startNodeAt(e, t) + ;(n.object = r), + (n.property = this.jsxParseIdentifier()), + (r = this.finishNode(n, "JSXMemberExpression")) + } + return r + }), + (m.jsxParseAttributeValue = function() { + var e = void 0 + switch (this.state.type) { + case o.types.braceL: + if ( + ((e = this.jsxParseExpressionContainer()), + "JSXEmptyExpression" !== e.expression.type) + ) + return e + this.raise( + e.start, + "JSX attributes must only be assigned a non-empty expression" + ) + case o.types.jsxTagStart: + case o.types.string: + return ( + (e = this.parseExprAtom()), + (e.extra = null), + e + ) + default: + this.raise( + this.state.start, + "JSX value should be either an expression or a quoted JSX text" + ) + } + }), + (m.jsxParseEmptyExpression = function() { + var e = this.startNodeAt( + this.lastTokEnd, + this.lastTokEndLoc + ) + return this.finishNodeAt( + e, + "JSXEmptyExpression", + this.start, + this.startLoc + ) + }), + (m.jsxParseExpressionContainer = function() { + var e = this.startNode() + return ( + this.next(), + this.match(o.types.braceR) + ? (e.expression = this.jsxParseEmptyExpression()) + : (e.expression = this.parseExpression()), + this.expect(o.types.braceR), + this.finishNode(e, "JSXExpressionContainer") + ) + }), + (m.jsxParseAttribute = function() { + var e = this.startNode() + return this.eat(o.types.braceL) + ? (this.expect(o.types.ellipsis), + (e.argument = this.parseMaybeAssign()), + this.expect(o.types.braceR), + this.finishNode(e, "JSXSpreadAttribute")) + : ((e.name = this.jsxParseNamespacedName()), + (e.value = this.eat(o.types.eq) + ? this.jsxParseAttributeValue() + : null), + this.finishNode(e, "JSXAttribute")) + }), + (m.jsxParseOpeningElementAt = function(e, t) { + var r = this.startNodeAt(e, t) + for ( + r.attributes = [], + r.name = this.jsxParseElementName(); + !this.match(o.types.slash) && + !this.match(o.types.jsxTagEnd); + + ) + r.attributes.push(this.jsxParseAttribute()) + return ( + (r.selfClosing = this.eat(o.types.slash)), + this.expect(o.types.jsxTagEnd), + this.finishNode(r, "JSXOpeningElement") + ) + }), + (m.jsxParseClosingElementAt = function(e, t) { + var r = this.startNodeAt(e, t) + return ( + (r.name = this.jsxParseElementName()), + this.expect(o.types.jsxTagEnd), + this.finishNode(r, "JSXClosingElement") + ) + }), + (m.jsxParseElementAt = function(e, t) { + var r = this.startNodeAt(e, t), + i = [], + s = this.jsxParseOpeningElementAt(e, t), + a = null + if (!s.selfClosing) { + e: for (;;) + switch (this.state.type) { + case o.types.jsxTagStart: + if ( + ((e = this.state.start), + (t = this.state.startLoc), + this.next(), + this.eat(o.types.slash)) + ) { + a = this.jsxParseClosingElementAt( + e, + t + ) + break e + } + i.push(this.jsxParseElementAt(e, t)) + break + case o.types.jsxText: + i.push(this.parseExprAtom()) + break + case o.types.braceL: + i.push( + this.jsxParseExpressionContainer() + ) + break + default: + this.unexpected() + } + n(a.name) !== n(s.name) && + this.raise( + a.start, + "Expected corresponding JSX closing tag for <" + + n(s.name) + + ">" + ) + } + return ( + (r.openingElement = s), + (r.closingElement = a), + (r.children = i), + this.match(o.types.relational) && + "<" === this.state.value && + this.raise( + this.state.start, + "Adjacent JSX elements must be wrapped in an enclosing tag" + ), + this.finishNode(r, "JSXElement") + ) + }), + (m.jsxParseElement = function() { + var e = this.state.start, + t = this.state.startLoc + return this.next(), this.jsxParseElementAt(e, t) + }), + (r["default"] = function(e) { + e.extend("parseExprAtom", function(e) { + return function(t) { + if (this.match(o.types.jsxText)) { + var r = this.parseLiteral( + this.state.value, + "JSXText" + ) + return (r.extra = null), r + } + return this.match(o.types.jsxTagStart) + ? this.jsxParseElement() + : e.call(this, t) + } + }), + e.extend("readToken", function(e) { + return function(t) { + var r = this.curContext() + if (r === u.types.j_expr) + return this.jsxReadToken() + if ( + r === u.types.j_oTag || + r === u.types.j_cTag + ) { + if (p.isIdentifierStart(t)) + return this.jsxReadWord() + if (62 === t) + return ( + ++this.state.pos, + this.finishToken( + o.types.jsxTagEnd + ) + ) + if ( + (34 === t || 39 === t) && + r === u.types.j_oTag + ) + return this.jsxReadString(t) + } + return 60 === t && this.state.exprAllowed + ? (++this.state.pos, + this.finishToken(o.types.jsxTagStart)) + : e.call(this, t) + } + }), + e.extend("updateContext", function(e) { + return function(t) { + if (this.match(o.types.braceL)) { + var r = this.curContext() + r === u.types.j_oTag + ? this.state.context.push( + u.types.b_expr + ) + : r === u.types.j_expr + ? this.state.context.push( + u.types.b_tmpl + ) + : e.call(this, t), + (this.state.exprAllowed = !0) + } else { + if ( + !this.match(o.types.slash) || + t !== o.types.jsxTagStart + ) + return e.call(this, t) + ;(this.state.context.length -= 2), + this.state.context.push( + u.types.j_cTag + ), + (this.state.exprAllowed = !1) + } + } + }) + }), + (t.exports = r["default"]) + }, + { 13: 13, 14: 14, 17: 17, 18: 18, 20: 20, 25: 25, 5: 5 } + ], + 13: [ + function(e, t, r) { + "use strict" + ;(r.__esModule = !0), + (r["default"] = { + quot: '"', + amp: "&", + apos: "'", + lt: "<", + gt: ">", + nbsp: " ", + iexcl: "¡", + cent: "¢", + pound: "£", + curren: "¤", + yen: "¥", + brvbar: "¦", + sect: "§", + uml: "¨", + copy: "©", + ordf: "ª", + laquo: "«", + not: "¬", + shy: "­", + reg: "®", + macr: "¯", + deg: "°", + plusmn: "±", + sup2: "²", + sup3: "³", + acute: "´", + micro: "µ", + para: "¶", + middot: "·", + cedil: "¸", + sup1: "¹", + ordm: "º", + raquo: "»", + frac14: "¼", + frac12: "½", + frac34: "¾", + iquest: "¿", + Agrave: "À", + Aacute: "Á", + Acirc: "Â", + Atilde: "Ã", + Auml: "Ä", + Aring: "Å", + AElig: "Æ", + Ccedil: "Ç", + Egrave: "È", + Eacute: "É", + Ecirc: "Ê", + Euml: "Ë", + Igrave: "Ì", + Iacute: "Í", + Icirc: "Î", + Iuml: "Ï", + ETH: "Ð", + Ntilde: "Ñ", + Ograve: "Ò", + Oacute: "Ó", + Ocirc: "Ô", + Otilde: "Õ", + Ouml: "Ö", + times: "×", + Oslash: "Ø", + Ugrave: "Ù", + Uacute: "Ú", + Ucirc: "Û", + Uuml: "Ü", + Yacute: "Ý", + THORN: "Þ", + szlig: "ß", + agrave: "à", + aacute: "á", + acirc: "â", + atilde: "ã", + auml: "ä", + aring: "å", + aelig: "æ", + ccedil: "ç", + egrave: "è", + eacute: "é", + ecirc: "ê", + euml: "ë", + igrave: "ì", + iacute: "í", + icirc: "î", + iuml: "ï", + eth: "ð", + ntilde: "ñ", + ograve: "ò", + oacute: "ó", + ocirc: "ô", + otilde: "õ", + ouml: "ö", + divide: "÷", + oslash: "ø", + ugrave: "ù", + uacute: "ú", + ucirc: "û", + uuml: "ü", + yacute: "ý", + thorn: "þ", + yuml: "ÿ", + OElig: "Œ", + oelig: "œ", + Scaron: "Š", + scaron: "š", + Yuml: "Ÿ", + fnof: "ƒ", + circ: "ˆ", + tilde: "˜", + Alpha: "Α", + Beta: "Β", + Gamma: "Γ", + Delta: "Δ", + Epsilon: "Ε", + Zeta: "Ζ", + Eta: "Η", + Theta: "Θ", + Iota: "Ι", + Kappa: "Κ", + Lambda: "Λ", + Mu: "Μ", + Nu: "Ν", + Xi: "Ξ", + Omicron: "Ο", + Pi: "Π", + Rho: "Ρ", + Sigma: "Σ", + Tau: "Τ", + Upsilon: "Υ", + Phi: "Φ", + Chi: "Χ", + Psi: "Ψ", + Omega: "Ω", + alpha: "α", + beta: "β", + gamma: "γ", + delta: "δ", + epsilon: "ε", + zeta: "ζ", + eta: "η", + theta: "θ", + iota: "ι", + kappa: "κ", + lambda: "λ", + mu: "μ", + nu: "ν", + xi: "ξ", + omicron: "ο", + pi: "π", + rho: "ρ", + sigmaf: "ς", + sigma: "σ", + tau: "τ", + upsilon: "υ", + phi: "φ", + chi: "χ", + psi: "ψ", + omega: "ω", + thetasym: "ϑ", + upsih: "ϒ", + piv: "ϖ", + ensp: " ", + emsp: " ", + thinsp: " ", + zwnj: "‌", + zwj: "‍", + lrm: "‎", + rlm: "‏", + ndash: "–", + mdash: "—", + lsquo: "‘", + rsquo: "’", + sbquo: "‚", + ldquo: "“", + rdquo: "”", + bdquo: "„", + dagger: "†", + Dagger: "‡", + bull: "•", + hellip: "…", + permil: "‰", + prime: "′", + Prime: "″", + lsaquo: "‹", + rsaquo: "›", + oline: "‾", + frasl: "⁄", + euro: "€", + image: "ℑ", + weierp: "℘", + real: "ℜ", + trade: "™", + alefsym: "ℵ", + larr: "←", + uarr: "↑", + rarr: "→", + darr: "↓", + harr: "↔", + crarr: "↵", + lArr: "⇐", + uArr: "⇑", + rArr: "⇒", + dArr: "⇓", + hArr: "⇔", + forall: "∀", + part: "∂", + exist: "∃", + empty: "∅", + nabla: "∇", + isin: "∈", + notin: "∉", + ni: "∋", + prod: "∏", + sum: "∑", + minus: "−", + lowast: "∗", + radic: "√", + prop: "∝", + infin: "∞", + ang: "∠", + and: "∧", + or: "∨", + cap: "∩", + cup: "∪", + int: "∫", + there4: "∴", + sim: "∼", + cong: "≅", + asymp: "≈", + ne: "≠", + equiv: "≡", + le: "≤", + ge: "≥", + sub: "⊂", + sup: "⊃", + nsub: "⊄", + sube: "⊆", + supe: "⊇", + oplus: "⊕", + otimes: "⊗", + perp: "⊥", + sdot: "⋅", + lceil: "⌈", + rceil: "⌉", + lfloor: "⌊", + rfloor: "⌋", + lang: "〈", + rang: "〉", + loz: "◊", + spades: "♠", + clubs: "♣", + hearts: "♥", + diams: "♦" + }), + (t.exports = r["default"]) + }, + {} + ], + 14: [ + function(e, t, r) { + "use strict" + var n = e(23)["default"] + r.__esModule = !0 + var i = e(17), + s = e(20), + a = function u(e, t, r, i) { + n(this, u), + (this.token = e), + (this.isExpr = !!t), + (this.preserveSpace = !!r), + (this.override = i) + } + r.TokContext = a + var o = { + b_stat: new a("{", !1), + b_expr: new a("{", !0), + b_tmpl: new a("${", !0), + p_stat: new a("(", !1), + p_expr: new a("(", !0), + q_tmpl: new a("`", !0, !0, function(e) { + return e.readTmplToken() + }), + f_expr: new a("function", !0) + } + ;(r.types = o), + (i.types.parenR.updateContext = i.types.braceR.updateContext = function() { + if (1 === this.state.context.length) + return void (this.state.exprAllowed = !0) + var e = this.state.context.pop() + e === o.b_stat && this.curContext() === o.f_expr + ? (this.state.context.pop(), + (this.state.exprAllowed = !1)) + : e === o.b_tmpl + ? (this.state.exprAllowed = !0) + : (this.state.exprAllowed = !e.isExpr) + }), + (i.types.name.updateContext = function(e) { + ;(this.state.exprAllowed = !1), + (e !== i.types._let && + e !== i.types._const && + e !== i.types._var) || + (s.lineBreak.test( + this.input.slice(this.state.end) + ) && + (this.state.exprAllowed = !0)) + }), + (i.types.braceL.updateContext = function(e) { + this.state.context.push( + this.braceIsBlock(e) ? o.b_stat : o.b_expr + ), + (this.state.exprAllowed = !0) + }), + (i.types.dollarBraceL.updateContext = function() { + this.state.context.push(o.b_tmpl), + (this.state.exprAllowed = !0) + }), + (i.types.parenL.updateContext = function(e) { + var t = + e === i.types._if || + e === i.types._for || + e === i.types._with || + e === i.types._while + this.state.context.push(t ? o.p_stat : o.p_expr), + (this.state.exprAllowed = !0) + }), + (i.types.incDec.updateContext = function() {}), + (i.types._function.updateContext = function() { + this.curContext() !== o.b_stat && + this.state.context.push(o.f_expr), + (this.state.exprAllowed = !1) + }), + (i.types.backQuote.updateContext = function() { + this.curContext() === o.q_tmpl + ? this.state.context.pop() + : this.state.context.push(o.q_tmpl), + (this.state.exprAllowed = !1) + }) + }, + { 17: 17, 20: 20, 23: 23 } + ], + 15: [ + function(e, t, r) { + "use strict" + function n(e) { + return 65535 >= e + ? String.fromCharCode(e) + : String.fromCharCode( + ((e - 65536) >> 10) + 55296, + ((e - 65536) & 1023) + 56320 + ) + } + var i = e(23)["default"], + s = e(25)["default"] + r.__esModule = !0 + var a = e(18), + o = e(17), + u = e(14), + l = e(19), + c = e(20), + p = e(16), + f = s(p), + h = function m(e) { + i(this, m), + (this.type = e.type), + (this.value = e.value), + (this.start = e.start), + (this.end = e.end), + (this.loc = new l.SourceLocation( + e.startLoc, + e.endLoc + )) + } + r.Token = h + var d = (function() { + function e(t, r) { + i(this, e), + (this.state = new f["default"]()), + this.state.init(t, r) + } + return ( + (e.prototype.next = function() { + this.isLookahead || + this.state.tokens.push(new h(this.state)), + (this.state.lastTokEnd = this.state.end), + (this.state.lastTokStart = this.state.start), + (this.state.lastTokEndLoc = this.state.endLoc), + (this.state.lastTokStartLoc = this.state.startLoc), + this.nextToken() + }), + (e.prototype.eat = function(e) { + return this.match(e) ? (this.next(), !0) : !1 + }), + (e.prototype.match = function(e) { + return this.state.type === e + }), + (e.prototype.isKeyword = function(e) { + return a.isKeyword(e) + }), + (e.prototype.lookahead = function() { + var e = this.state + ;(this.state = e.clone(!0)), + (this.isLookahead = !0), + this.next(), + (this.isLookahead = !1) + var t = this.state.clone(!0) + return (this.state = e), t + }), + (e.prototype.setStrict = function(e) { + if ( + ((this.state.strict = e), + this.match(o.types.num) || + this.match(o.types.string)) + ) { + for ( + this.state.pos = this.state.start; + this.state.pos < this.state.lineStart; + + ) + (this.state.lineStart = + this.input.lastIndexOf( + "\n", + this.state.lineStart - 2 + ) + 1), + --this.state.curLine + this.nextToken() + } + }), + (e.prototype.curContext = function() { + return this.state.context[ + this.state.context.length - 1 + ] + }), + (e.prototype.nextToken = function() { + var e = this.curContext() + return ( + (e && e.preserveSpace) || this.skipSpace(), + (this.state.containsOctal = !1), + (this.state.octalPosition = null), + (this.state.start = this.state.pos), + (this.state.startLoc = this.state.curPosition()), + this.state.pos >= this.input.length + ? this.finishToken(o.types.eof) + : e.override + ? e.override(this) + : this.readToken(this.fullCharCodeAtPos()) + ) + }), + (e.prototype.readToken = function(e) { + return a.isIdentifierStart(e) || 92 === e + ? this.readWord() + : this.getTokenFromCode(e) + }), + (e.prototype.fullCharCodeAtPos = function() { + var e = this.input.charCodeAt(this.state.pos) + if (55295 >= e || e >= 57344) return e + var t = this.input.charCodeAt(this.state.pos + 1) + return (e << 10) + t - 56613888 + }), + (e.prototype.pushComment = function(e, t, r, n, i, s) { + var a = { + type: e ? "CommentBlock" : "CommentLine", + value: t, + start: r, + end: n, + loc: new l.SourceLocation(i, s) + } + this.isLookahead || + (this.state.tokens.push(a), + this.state.comments.push(a)), + this.addComment(a) + }), + (e.prototype.skipBlockComment = function() { + var e = this.state.curPosition(), + t = this.state.pos, + r = this.input.indexOf( + "*/", + (this.state.pos += 2) + ) + ;-1 === r && + this.raise( + this.state.pos - 2, + "Unterminated comment" + ), + (this.state.pos = r + 2), + (c.lineBreakG.lastIndex = t) + for ( + var n = void 0; + (n = c.lineBreakG.exec(this.input)) && + n.index < this.state.pos; + + ) + ++this.state.curLine, + (this.state.lineStart = + n.index + n[0].length) + this.pushComment( + !0, + this.input.slice(t + 2, r), + t, + this.state.pos, + e, + this.state.curPosition() + ) + }), + (e.prototype.skipLineComment = function(e) { + for ( + var t = this.state.pos, + r = this.state.curPosition(), + n = this.input.charCodeAt( + (this.state.pos += e) + ); + this.state.pos < this.input.length && + 10 !== n && + 13 !== n && + 8232 !== n && + 8233 !== n; + + ) + ++this.state.pos, + (n = this.input.charCodeAt(this.state.pos)) + this.pushComment( + !1, + this.input.slice(t + e, this.state.pos), + t, + this.state.pos, + r, + this.state.curPosition() + ) + }), + (e.prototype.skipSpace = function() { + e: for (; this.state.pos < this.input.length; ) { + var e = this.input.charCodeAt(this.state.pos) + switch (e) { + case 32: + case 160: + ++this.state.pos + break + case 13: + 10 === + this.input.charCodeAt( + this.state.pos + 1 + ) && ++this.state.pos + case 10: + case 8232: + case 8233: + ++this.state.pos, + ++this.state.curLine, + (this.state.lineStart = this.state.pos) + break + case 47: + switch ( + this.input.charCodeAt( + this.state.pos + 1 + ) + ) { + case 42: + this.skipBlockComment() + break + case 47: + this.skipLineComment(2) + break + default: + break e + } + break + default: + if ( + !( + (e > 8 && 14 > e) || + (e >= 5760 && + c.nonASCIIwhitespace.test( + String.fromCharCode(e) + )) + ) + ) + break e + ++this.state.pos + } + } + }), + (e.prototype.finishToken = function(e, t) { + ;(this.state.end = this.state.pos), + (this.state.endLoc = this.state.curPosition()) + var r = this.state.type + ;(this.state.type = e), + (this.state.value = t), + this.updateContext(r) + }), + (e.prototype.readToken_dot = function() { + var e = this.input.charCodeAt(this.state.pos + 1) + if (e >= 48 && 57 >= e) return this.readNumber(!0) + var t = this.input.charCodeAt(this.state.pos + 2) + return 46 === e && 46 === t + ? ((this.state.pos += 3), + this.finishToken(o.types.ellipsis)) + : (++this.state.pos, + this.finishToken(o.types.dot)) + }), + (e.prototype.readToken_slash = function() { + if (this.state.exprAllowed) + return ++this.state.pos, this.readRegexp() + var e = this.input.charCodeAt(this.state.pos + 1) + return 61 === e + ? this.finishOp(o.types.assign, 2) + : this.finishOp(o.types.slash, 1) + }), + (e.prototype.readToken_mult_modulo = function(e) { + var t = 42 === e ? o.types.star : o.types.modulo, + r = 1, + n = this.input.charCodeAt(this.state.pos + 1) + return ( + 42 === n && + this.hasPlugin("exponentiationOperator") && + (r++, + (n = this.input.charCodeAt( + this.state.pos + 2 + )), + (t = o.types.exponent)), + 61 === n && (r++, (t = o.types.assign)), + this.finishOp(t, r) + ) + }), + (e.prototype.readToken_pipe_amp = function(e) { + var t = this.input.charCodeAt(this.state.pos + 1) + return t === e + ? this.finishOp( + 124 === e + ? o.types.logicalOR + : o.types.logicalAND, + 2 + ) + : 61 === t + ? this.finishOp(o.types.assign, 2) + : this.finishOp( + 124 === e + ? o.types.bitwiseOR + : o.types.bitwiseAND, + 1 + ) + }), + (e.prototype.readToken_caret = function() { + var e = this.input.charCodeAt(this.state.pos + 1) + return 61 === e + ? this.finishOp(o.types.assign, 2) + : this.finishOp(o.types.bitwiseXOR, 1) + }), + (e.prototype.readToken_plus_min = function(e) { + var t = this.input.charCodeAt(this.state.pos + 1) + return t === e + ? 45 === t && + 62 === + this.input.charCodeAt( + this.state.pos + 2 + ) && + c.lineBreak.test( + this.input.slice( + this.state.lastTokEnd, + this.state.pos + ) + ) + ? (this.skipLineComment(3), + this.skipSpace(), + this.nextToken()) + : this.finishOp(o.types.incDec, 2) + : 61 === t + ? this.finishOp(o.types.assign, 2) + : this.finishOp(o.types.plusMin, 1) + }), + (e.prototype.readToken_lt_gt = function(e) { + var t = this.input.charCodeAt(this.state.pos + 1), + r = 1 + return t === e + ? ((r = + 62 === e && + 62 === + this.input.charCodeAt( + this.state.pos + 2 + ) + ? 3 + : 2), + 61 === + this.input.charCodeAt(this.state.pos + r) + ? this.finishOp(o.types.assign, r + 1) + : this.finishOp(o.types.bitShift, r)) + : 33 === t && + 60 === e && + 45 === + this.input.charCodeAt( + this.state.pos + 2 + ) && + 45 === + this.input.charCodeAt(this.state.pos + 3) + ? (this.inModule && this.unexpected(), + this.skipLineComment(4), + this.skipSpace(), + this.nextToken()) + : (61 === t && (r = 2), + this.finishOp(o.types.relational, r)) + }), + (e.prototype.readToken_eq_excl = function(e) { + var t = this.input.charCodeAt(this.state.pos + 1) + return 61 === t + ? this.finishOp( + o.types.equality, + 61 === + this.input.charCodeAt( + this.state.pos + 2 + ) + ? 3 + : 2 + ) + : 61 === e && 62 === t + ? ((this.state.pos += 2), + this.finishToken(o.types.arrow)) + : this.finishOp( + 61 === e ? o.types.eq : o.types.prefix, + 1 + ) + }), + (e.prototype.getTokenFromCode = function(e) { + switch (e) { + case 46: + return this.readToken_dot() + case 40: + return ( + ++this.state.pos, + this.finishToken(o.types.parenL) + ) + case 41: + return ( + ++this.state.pos, + this.finishToken(o.types.parenR) + ) + case 59: + return ( + ++this.state.pos, + this.finishToken(o.types.semi) + ) + case 44: + return ( + ++this.state.pos, + this.finishToken(o.types.comma) + ) + case 91: + return ( + ++this.state.pos, + this.finishToken(o.types.bracketL) + ) + case 93: + return ( + ++this.state.pos, + this.finishToken(o.types.bracketR) + ) + case 123: + return ( + ++this.state.pos, + this.finishToken(o.types.braceL) + ) + case 125: + return ( + ++this.state.pos, + this.finishToken(o.types.braceR) + ) + case 58: + return this.hasPlugin("functionBind") && + 58 === + this.input.charCodeAt( + this.state.pos + 1 + ) + ? this.finishOp(o.types.doubleColon, 2) + : (++this.state.pos, + this.finishToken(o.types.colon)) + case 63: + return ( + ++this.state.pos, + this.finishToken(o.types.question) + ) + case 64: + return ( + ++this.state.pos, + this.finishToken(o.types.at) + ) + case 96: + return ( + ++this.state.pos, + this.finishToken(o.types.backQuote) + ) + case 48: + var t = this.input.charCodeAt( + this.state.pos + 1 + ) + if (120 === t || 88 === t) + return this.readRadixNumber(16) + if (111 === t || 79 === t) + return this.readRadixNumber(8) + if (98 === t || 66 === t) + return this.readRadixNumber(2) + case 49: + case 50: + case 51: + case 52: + case 53: + case 54: + case 55: + case 56: + case 57: + return this.readNumber(!1) + case 34: + case 39: + return this.readString(e) + case 47: + return this.readToken_slash() + case 37: + case 42: + return this.readToken_mult_modulo(e) + case 124: + case 38: + return this.readToken_pipe_amp(e) + case 94: + return this.readToken_caret() + case 43: + case 45: + return this.readToken_plus_min(e) + case 60: + case 62: + return this.readToken_lt_gt(e) + case 61: + case 33: + return this.readToken_eq_excl(e) + case 126: + return this.finishOp(o.types.prefix, 1) + } + this.raise( + this.state.pos, + "Unexpected character '" + n(e) + "'" + ) + }), + (e.prototype.finishOp = function(e, t) { + var r = this.input.slice( + this.state.pos, + this.state.pos + t + ) + return (this.state.pos += t), this.finishToken(e, r) + }), + (e.prototype.readRegexp = function() { + for ( + var e = void 0, t = void 0, r = this.state.pos; + ; + + ) { + this.state.pos >= this.input.length && + this.raise( + r, + "Unterminated regular expression" + ) + var n = this.input.charAt(this.state.pos) + if ( + (c.lineBreak.test(n) && + this.raise( + r, + "Unterminated regular expression" + ), + e) + ) + e = !1 + else { + if ("[" === n) t = !0 + else if ("]" === n && t) t = !1 + else if ("/" === n && !t) break + e = "\\" === n + } + ++this.state.pos + } + var i = this.input.slice(r, this.state.pos) + ++this.state.pos + var s = this.readWord1() + if (s) { + var a = /^[gmsiyu]*$/ + a.test(s) || + this.raise( + r, + "Invalid regular expression flag" + ) + } + return this.finishToken(o.types.regexp, { + pattern: i, + flags: s + }) + }), + (e.prototype.readInt = function(e, t) { + for ( + var r = this.state.pos, + n = 0, + i = 0, + s = null == t ? 1 / 0 : t; + s > i; + ++i + ) { + var a = this.input.charCodeAt(this.state.pos), + o = void 0 + if ( + ((o = + a >= 97 + ? a - 97 + 10 + : a >= 65 + ? a - 65 + 10 + : a >= 48 && 57 >= a + ? a - 48 + : 1 / 0), + o >= e) + ) + break + ++this.state.pos, (n = n * e + o) + } + return this.state.pos === r || + (null != t && this.state.pos - r !== t) + ? null + : n + }), + (e.prototype.readRadixNumber = function(e) { + this.state.pos += 2 + var t = this.readInt(e) + return ( + null == t && + this.raise( + this.state.start + 2, + "Expected number in radix " + e + ), + a.isIdentifierStart(this.fullCharCodeAtPos()) && + this.raise( + this.state.pos, + "Identifier directly after number" + ), + this.finishToken(o.types.num, t) + ) + }), + (e.prototype.readNumber = function(e) { + var t = this.state.pos, + r = !1, + n = 48 === this.input.charCodeAt(this.state.pos) + e || + null !== this.readInt(10) || + this.raise(t, "Invalid number") + var i = this.input.charCodeAt(this.state.pos) + 46 === i && + (++this.state.pos, + this.readInt(10), + (r = !0), + (i = this.input.charCodeAt(this.state.pos))), + (69 !== i && 101 !== i) || + ((i = this.input.charCodeAt( + ++this.state.pos + )), + (43 !== i && 45 !== i) || ++this.state.pos, + null === this.readInt(10) && + this.raise(t, "Invalid number"), + (r = !0)), + a.isIdentifierStart(this.fullCharCodeAtPos()) && + this.raise( + this.state.pos, + "Identifier directly after number" + ) + var s = this.input.slice(t, this.state.pos), + u = void 0 + return ( + r + ? (u = parseFloat(s)) + : n && 1 !== s.length + ? /[89]/.test(s) || this.state.strict + ? this.raise(t, "Invalid number") + : (u = parseInt(s, 8)) + : (u = parseInt(s, 10)), + this.finishToken(o.types.num, u) + ) + }), + (e.prototype.readCodePoint = function() { + var e = this.input.charCodeAt(this.state.pos), + t = void 0 + if (123 === e) { + var r = ++this.state.pos + ;(t = this.readHexChar( + this.input.indexOf("}", this.state.pos) - + this.state.pos + )), + ++this.state.pos, + t > 1114111 && + this.raise( + r, + "Code point out of bounds" + ) + } else t = this.readHexChar(4) + return t + }), + (e.prototype.readString = function(e) { + for (var t = "", r = ++this.state.pos; ; ) { + this.state.pos >= this.input.length && + this.raise( + this.state.start, + "Unterminated string constant" + ) + var n = this.input.charCodeAt(this.state.pos) + if (n === e) break + 92 === n + ? ((t += this.input.slice( + r, + this.state.pos + )), + (t += this.readEscapedChar(!1)), + (r = this.state.pos)) + : (c.isNewLine(n) && + this.raise( + this.state.start, + "Unterminated string constant" + ), + ++this.state.pos) + } + return ( + (t += this.input.slice(r, this.state.pos++)), + this.finishToken(o.types.string, t) + ) + }), + (e.prototype.readTmplToken = function() { + for (var e = "", t = this.state.pos; ; ) { + this.state.pos >= this.input.length && + this.raise( + this.state.start, + "Unterminated template" + ) + var r = this.input.charCodeAt(this.state.pos) + if ( + 96 === r || + (36 === r && + 123 === + this.input.charCodeAt( + this.state.pos + 1 + )) + ) + return this.state.pos === + this.state.start && + this.match(o.types.template) + ? 36 === r + ? ((this.state.pos += 2), + this.finishToken( + o.types.dollarBraceL + )) + : (++this.state.pos, + this.finishToken( + o.types.backQuote + )) + : ((e += this.input.slice( + t, + this.state.pos + )), + this.finishToken(o.types.template, e)) + if (92 === r) + (e += this.input.slice(t, this.state.pos)), + (e += this.readEscapedChar(!0)), + (t = this.state.pos) + else if (c.isNewLine(r)) { + switch ( + ((e += this.input.slice( + t, + this.state.pos + )), + ++this.state.pos, + r) + ) { + case 13: + 10 === + this.input.charCodeAt( + this.state.pos + ) && ++this.state.pos + case 10: + e += "\n" + break + default: + e += String.fromCharCode(r) + } + ++this.state.curLine, + (this.state.lineStart = this.state.pos), + (t = this.state.pos) + } else ++this.state.pos + } + }), + (e.prototype.readEscapedChar = function(e) { + var t = this.input.charCodeAt(++this.state.pos) + switch ((++this.state.pos, t)) { + case 110: + return "\n" + case 114: + return "\r" + case 120: + return String.fromCharCode( + this.readHexChar(2) + ) + case 117: + return n(this.readCodePoint()) + case 116: + return " " + case 98: + return "\b" + case 118: + return "\x0B" + case 102: + return "\f" + case 13: + 10 === + this.input.charCodeAt(this.state.pos) && + ++this.state.pos + case 10: + return ( + (this.state.lineStart = this.state.pos), + ++this.state.curLine, + "" + ) + default: + if (t >= 48 && 55 >= t) { + var r = this.input + .substr(this.state.pos - 1, 3) + .match(/^[0-7]+/)[0], + i = parseInt(r, 8) + return ( + i > 255 && + ((r = r.slice(0, -1)), + (i = parseInt(r, 8))), + i > 0 && + (this.state.containsOctal || + ((this.state.containsOctal = !0), + (this.state.octalPosition = + this.state.pos - 2)), + (this.state.strict || e) && + this.raise( + this.state.pos - 2, + "Octal literal in strict mode" + )), + (this.state.pos += r.length - 1), + String.fromCharCode(i) + ) + } + return String.fromCharCode(t) + } + }), + (e.prototype.readHexChar = function(e) { + var t = this.state.pos, + r = this.readInt(16, e) + return ( + null === r && + this.raise( + t, + "Bad character escape sequence" + ), + r + ) + }), + (e.prototype.readWord1 = function() { + this.state.containsEsc = !1 + for ( + var e = "", t = !0, r = this.state.pos; + this.state.pos < this.input.length; + + ) { + var i = this.fullCharCodeAtPos() + if (a.isIdentifierChar(i)) + this.state.pos += 65535 >= i ? 1 : 2 + else { + if (92 !== i) break + ;(this.state.containsEsc = !0), + (e += this.input.slice( + r, + this.state.pos + )) + var s = this.state.pos + 117 !== + this.input.charCodeAt( + ++this.state.pos + ) && + this.raise( + this.state.pos, + "Expecting Unicode escape sequence \\uXXXX" + ), + ++this.state.pos + var o = this.readCodePoint() + ;(t + ? a.isIdentifierStart + : a.isIdentifierChar)(o, !0) || + this.raise(s, "Invalid Unicode escape"), + (e += n(o)), + (r = this.state.pos) + } + t = !1 + } + return e + this.input.slice(r, this.state.pos) + }), + (e.prototype.readWord = function() { + var e = this.readWord1(), + t = o.types.name + return ( + !this.state.containsEsc && + this.isKeyword(e) && + (t = o.keywords[e]), + this.finishToken(t, e) + ) + }), + (e.prototype.braceIsBlock = function(e) { + if (e === o.types.colon) { + var t = this.curContext() + if ( + t === u.types.b_stat || + t === u.types.b_expr + ) + return !t.isExpr + } + return e === o.types._return + ? c.lineBreak.test( + this.input.slice( + this.state.lastTokEnd, + this.state.start + ) + ) + : e === o.types._else || + e === o.types.semi || + e === o.types.eof || + e === o.types.parenR + ? !0 + : e === o.types.braceL + ? this.curContext() === u.types.b_stat + : !this.state.exprAllowed + }), + (e.prototype.updateContext = function(e) { + var t = void 0, + r = this.state.type + r.keyword && e === o.types.dot + ? (this.state.exprAllowed = !1) + : (t = r.updateContext) + ? t.call(this, e) + : (this.state.exprAllowed = r.beforeExpr) + }), + e + ) + })() + r["default"] = d + }, + { 14: 14, 16: 16, 17: 17, 18: 18, 19: 19, 20: 20, 23: 23, 25: 25 } + ], + 16: [ + function(e, t, r) { + "use strict" + var n = e(23)["default"] + r.__esModule = !0 + var i = e(19), + s = e(14), + a = e(17), + o = (function() { + function e() { + n(this, e) + } + return ( + (e.prototype.init = function(e, t) { + return ( + (this.strict = + e.strictMode === !1 + ? !1 + : "module" === e.sourceType), + (this.input = t), + (this.potentialArrowAt = -1), + (this.inMethod = this.inFunction = this.inGenerator = this.inAsync = !1), + (this.labels = []), + (this.decorators = []), + (this.tokens = []), + (this.comments = []), + (this.trailingComments = []), + (this.leadingComments = []), + (this.commentStack = []), + (this.pos = this.lineStart = 0), + (this.curLine = 1), + (this.type = a.types.eof), + (this.value = null), + (this.start = this.end = this.pos), + (this.startLoc = this.endLoc = this.curPosition()), + (this.lastTokEndLoc = this.lastTokStartLoc = null), + (this.lastTokStart = this.lastTokEnd = this.pos), + (this.context = [s.types.b_stat]), + (this.exprAllowed = !0), + (this.containsEsc = this.containsOctal = !1), + (this.octalPosition = null), + this + ) + }), + (e.prototype.curPosition = function() { + return new i.Position( + this.curLine, + this.pos - this.lineStart + ) + }), + (e.prototype.clone = function(t) { + var r = new e() + for (var n in this) { + var i = this[n] + ;(t && "context" !== n) || + !Array.isArray(i) || + (i = i.slice()), + (r[n] = i) + } + return r + }), + e + ) + })() + ;(r["default"] = o), (t.exports = r["default"]) + }, + { 14: 14, 17: 17, 19: 19, 23: 23 } + ], + 17: [ + function(e, t, r) { + "use strict" + function n(e, t) { + return new a(e, { beforeExpr: !0, binop: t }) + } + function i(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? {} + : arguments[1] + ;(t.keyword = e), (c[e] = l["_" + e] = new a(e, t)) + } + var s = e(23)["default"] + r.__esModule = !0 + var a = function p(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? {} + : arguments[1] + s(this, p), + (this.label = e), + (this.keyword = t.keyword), + (this.beforeExpr = !!t.beforeExpr), + (this.startsExpr = !!t.startsExpr), + (this.rightAssociative = !!t.rightAssociative), + (this.isLoop = !!t.isLoop), + (this.isAssign = !!t.isAssign), + (this.prefix = !!t.prefix), + (this.postfix = !!t.postfix), + (this.binop = t.binop || null), + (this.updateContext = null) + } + r.TokenType = a + var o = { beforeExpr: !0 }, + u = { startsExpr: !0 }, + l = { + num: new a("num", u), + regexp: new a("regexp", u), + string: new a("string", u), + name: new a("name", u), + eof: new a("eof"), + bracketL: new a("[", { + beforeExpr: !0, + startsExpr: !0 + }), + bracketR: new a("]"), + braceL: new a("{", { beforeExpr: !0, startsExpr: !0 }), + braceR: new a("}"), + parenL: new a("(", { beforeExpr: !0, startsExpr: !0 }), + parenR: new a(")"), + comma: new a(",", o), + semi: new a(";", o), + colon: new a(":", o), + doubleColon: new a("::", o), + dot: new a("."), + question: new a("?", o), + arrow: new a("=>", o), + template: new a("template"), + ellipsis: new a("...", o), + backQuote: new a("`", u), + dollarBraceL: new a("${", { + beforeExpr: !0, + startsExpr: !0 + }), + at: new a("@"), + eq: new a("=", { beforeExpr: !0, isAssign: !0 }), + assign: new a("_=", { beforeExpr: !0, isAssign: !0 }), + incDec: new a("++/--", { + prefix: !0, + postfix: !0, + startsExpr: !0 + }), + prefix: new a("prefix", { + beforeExpr: !0, + prefix: !0, + startsExpr: !0 + }), + logicalOR: n("||", 1), + logicalAND: n("&&", 2), + bitwiseOR: n("|", 3), + bitwiseXOR: n("^", 4), + bitwiseAND: n("&", 5), + equality: n("==/!=", 6), + relational: n("", 7), + bitShift: n("<>", 8), + plusMin: new a("+/-", { + beforeExpr: !0, + binop: 9, + prefix: !0, + startsExpr: !0 + }), + modulo: n("%", 10), + star: n("*", 10), + slash: n("/", 10), + exponent: new a("**", { + beforeExpr: !0, + binop: 11, + rightAssociative: !0 + }) + } + r.types = l + var c = {} + ;(r.keywords = c), + i("break"), + i("case", o), + i("catch"), + i("continue"), + i("debugger"), + i("default", o), + i("do", { isLoop: !0, beforeExpr: !0 }), + i("else", o), + i("finally"), + i("for", { isLoop: !0 }), + i("function", u), + i("if"), + i("return", o), + i("switch"), + i("throw", o), + i("try"), + i("var"), + i("let"), + i("const"), + i("while", { isLoop: !0 }), + i("with"), + i("new", { beforeExpr: !0, startsExpr: !0 }), + i("this", u), + i("super", u), + i("class"), + i("extends", o), + i("export"), + i("import"), + i("yield", { beforeExpr: !0, startsExpr: !0 }), + i("null", u), + i("true", u), + i("false", u), + i("in", { beforeExpr: !0, binop: 7 }), + i("instanceof", { beforeExpr: !0, binop: 7 }), + i("typeof", { beforeExpr: !0, prefix: !0, startsExpr: !0 }), + i("void", { beforeExpr: !0, prefix: !0, startsExpr: !0 }), + i("delete", { beforeExpr: !0, prefix: !0, startsExpr: !0 }) + }, + { 23: 23 } + ], + 18: [ + function(e, t, r) { + "use strict" + function n(e) { + return ( + (e = e.split(" ")), + function(t) { + return e.indexOf(t) >= 0 + } + ) + } + function i(e, t) { + for (var r = 65536, n = 0; n < t.length; n += 2) { + if (((r += t[n]), r > e)) return !1 + if (((r += t[n + 1]), r >= e)) return !0 + } + } + function s(e) { + return 65 > e + ? 36 === e + : 91 > e + ? !0 + : 97 > e + ? 95 === e + : 123 > e + ? !0 + : 65535 >= e + ? e >= 170 && p.test(String.fromCharCode(e)) + : i(e, h) + } + function a(e) { + return 48 > e + ? 36 === e + : 58 > e + ? !0 + : 65 > e + ? !1 + : 91 > e + ? !0 + : 97 > e + ? 95 === e + : 123 > e + ? !0 + : 65535 >= e + ? e >= 170 && f.test(String.fromCharCode(e)) + : i(e, h) || i(e, d) + } + ;(r.__esModule = !0), + (r.isIdentifierStart = s), + (r.isIdentifierChar = a) + var o = { + 6: n("enum await"), + strict: n( + "implements interface let package private protected public static yield" + ), + strictBind: n("eval arguments") + } + r.reservedWords = o + var u = n( + "break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this let const class extends export import yield super" + ) + r.isKeyword = u + var l = + "ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙա-ևא-תװ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࢠ-ࢲऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᧁ-ᧇᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᳵᳶᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ", + c = + "‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣤ-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ଁ-ଃ଼ା-ୄେୈୋ-୍ୖୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఃా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഁ-ഃാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ංඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ູົຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜔ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠐-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏ᦰ-ᧀᧈᧉ᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭ᳲ-᳴᳸᳹᷀-᷵᷼-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧꢀꢁꢴ-꣄꣐-꣙꣠-꣱꤀-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︭︳︴﹍-﹏0-9_", + p = new RegExp("[" + l + "]"), + f = new RegExp("[" + l + c + "]") + l = c = null + var h = [ + 0, + 11, + 2, + 25, + 2, + 18, + 2, + 1, + 2, + 14, + 3, + 13, + 35, + 122, + 70, + 52, + 268, + 28, + 4, + 48, + 48, + 31, + 17, + 26, + 6, + 37, + 11, + 29, + 3, + 35, + 5, + 7, + 2, + 4, + 43, + 157, + 99, + 39, + 9, + 51, + 157, + 310, + 10, + 21, + 11, + 7, + 153, + 5, + 3, + 0, + 2, + 43, + 2, + 1, + 4, + 0, + 3, + 22, + 11, + 22, + 10, + 30, + 98, + 21, + 11, + 25, + 71, + 55, + 7, + 1, + 65, + 0, + 16, + 3, + 2, + 2, + 2, + 26, + 45, + 28, + 4, + 28, + 36, + 7, + 2, + 27, + 28, + 53, + 11, + 21, + 11, + 18, + 14, + 17, + 111, + 72, + 955, + 52, + 76, + 44, + 33, + 24, + 27, + 35, + 42, + 34, + 4, + 0, + 13, + 47, + 15, + 3, + 22, + 0, + 38, + 17, + 2, + 24, + 133, + 46, + 39, + 7, + 3, + 1, + 3, + 21, + 2, + 6, + 2, + 1, + 2, + 4, + 4, + 0, + 32, + 4, + 287, + 47, + 21, + 1, + 2, + 0, + 185, + 46, + 82, + 47, + 21, + 0, + 60, + 42, + 502, + 63, + 32, + 0, + 449, + 56, + 1288, + 920, + 104, + 110, + 2962, + 1070, + 13266, + 568, + 8, + 30, + 114, + 29, + 19, + 47, + 17, + 3, + 32, + 20, + 6, + 18, + 881, + 68, + 12, + 0, + 67, + 12, + 16481, + 1, + 3071, + 106, + 6, + 12, + 4, + 8, + 8, + 9, + 5991, + 84, + 2, + 70, + 2, + 1, + 3, + 0, + 3, + 1, + 3, + 3, + 2, + 11, + 2, + 0, + 2, + 6, + 2, + 64, + 2, + 3, + 3, + 7, + 2, + 6, + 2, + 27, + 2, + 3, + 2, + 4, + 2, + 0, + 4, + 6, + 2, + 339, + 3, + 24, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 30, + 2, + 24, + 2, + 7, + 4149, + 196, + 1340, + 3, + 2, + 26, + 2, + 1, + 2, + 0, + 3, + 0, + 2, + 9, + 2, + 3, + 2, + 0, + 2, + 0, + 7, + 0, + 5, + 0, + 2, + 0, + 2, + 0, + 2, + 2, + 2, + 1, + 2, + 0, + 3, + 0, + 2, + 0, + 2, + 0, + 2, + 0, + 2, + 0, + 2, + 1, + 2, + 0, + 3, + 3, + 2, + 6, + 2, + 3, + 2, + 3, + 2, + 0, + 2, + 9, + 2, + 16, + 6, + 2, + 2, + 4, + 2, + 16, + 4421, + 42710, + 42, + 4148, + 12, + 221, + 16355, + 541 + ], + d = [ + 509, + 0, + 227, + 0, + 150, + 4, + 294, + 9, + 1368, + 2, + 2, + 1, + 6, + 3, + 41, + 2, + 5, + 0, + 166, + 1, + 1306, + 2, + 54, + 14, + 32, + 9, + 16, + 3, + 46, + 10, + 54, + 9, + 7, + 2, + 37, + 13, + 2, + 9, + 52, + 0, + 13, + 2, + 49, + 13, + 16, + 9, + 83, + 11, + 168, + 11, + 6, + 9, + 8, + 2, + 57, + 0, + 2, + 6, + 3, + 1, + 3, + 2, + 10, + 0, + 11, + 1, + 3, + 6, + 4, + 4, + 316, + 19, + 13, + 9, + 214, + 6, + 3, + 8, + 112, + 16, + 16, + 9, + 82, + 12, + 9, + 9, + 535, + 9, + 20855, + 9, + 135, + 4, + 60, + 6, + 26, + 9, + 1016, + 45, + 17, + 3, + 19723, + 1, + 5319, + 4, + 4, + 5, + 9, + 7, + 3, + 6, + 31, + 3, + 149, + 2, + 1418, + 49, + 4305, + 6, + 792618, + 239 + ] + }, + {} + ], + 19: [ + function(e, t, r) { + "use strict" + function n(e, t) { + for (var r = 1, n = 0; ; ) { + s.lineBreakG.lastIndex = n + var i = s.lineBreakG.exec(e) + if (!(i && i.index < t)) return new a(r, t - n) + ++r, (n = i.index + i[0].length) + } + } + var i = e(23)["default"] + ;(r.__esModule = !0), (r.getLineInfo = n) + var s = e(20), + a = function u(e, t) { + i(this, u), (this.line = e), (this.column = t) + } + r.Position = a + var o = function l(e, t) { + i(this, l), (this.start = e), (this.end = t) + } + r.SourceLocation = o + }, + { 20: 20, 23: 23 } + ], + 20: [ + function(e, t, r) { + "use strict" + function n(e) { + return 10 === e || 13 === e || 8232 === e || 8233 === e + } + ;(r.__esModule = !0), (r.isNewLine = n) + var i = /\r\n?|\n|\u2028|\u2029/ + r.lineBreak = i + var s = new RegExp(i.source, "g") + r.lineBreakG = s + var a = /[\u1680\u180e\u2000-\u200a\u202f\u205f\u3000\ufeff]/ + r.nonASCIIwhitespace = a + }, + {} + ], + 21: [ + function(e, t, r) { + t.exports = { default: e(26), __esModule: !0 } + }, + { 26: 26 } + ], + 22: [ + function(e, t, r) { + t.exports = { default: e(27), __esModule: !0 } + }, + { 27: 27 } + ], + 23: [ + function(e, t, r) { + "use strict" + ;(r["default"] = function(e, t) { + if (!(e instanceof t)) + throw new TypeError("Cannot call a class as a function") + }), + (r.__esModule = !0) + }, + {} + ], + 24: [ + function(e, t, r) { + "use strict" + var n = e(21)["default"], + i = e(22)["default"] + ;(r["default"] = function(e, t) { + if ("function" != typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function, not " + + typeof t + ) + ;(e.prototype = n(t && t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0 + } + })), + t && (i ? i(e, t) : (e.__proto__ = t)) + }), + (r.__esModule = !0) + }, + { 21: 21, 22: 22 } + ], + 25: [ + function(e, t, r) { + "use strict" + ;(r["default"] = function(e) { + return e && e.__esModule ? e : { default: e } + }), + (r.__esModule = !0) + }, + {} + ], + 26: [ + function(e, t, r) { + var n = e(35) + t.exports = function(e, t) { + return n.create(e, t) + } + }, + { 35: 35 } + ], + 27: [ + function(e, t, r) { + e(37), (t.exports = e(30).Object.setPrototypeOf) + }, + { 30: 30, 37: 37 } + ], + 28: [ + function(e, t, r) { + t.exports = function(e) { + if ("function" != typeof e) + throw TypeError(e + " is not a function!") + return e + } + }, + {} + ], + 29: [ + function(e, t, r) { + var n = e(34) + t.exports = function(e) { + if (!n(e)) throw TypeError(e + " is not an object!") + return e + } + }, + { 34: 34 } + ], + 30: [ + function(e, t, r) { + var n = (t.exports = { version: "1.2.6" }) + "number" == typeof __e && (__e = n) + }, + {} + ], + 31: [ + function(e, t, r) { + var n = e(28) + t.exports = function(e, t, r) { + if ((n(e), void 0 === t)) return e + switch (r) { + case 1: + return function(r) { + return e.call(t, r) + } + case 2: + return function(r, n) { + return e.call(t, r, n) + } + case 3: + return function(r, n, i) { + return e.call(t, r, n, i) + } + } + return function() { + return e.apply(t, arguments) + } + } + }, + { 28: 28 } + ], + 32: [ + function(e, t, r) { + var n = e(33), + i = e(30), + s = e(31), + a = "prototype", + o = function(e, t, r) { + var u, + l, + c, + p = e & o.F, + f = e & o.G, + h = e & o.S, + d = e & o.P, + m = e & o.B, + y = e & o.W, + v = f ? i : i[t] || (i[t] = {}), + g = f ? n : h ? n[t] : (n[t] || {})[a] + f && (r = t) + for (u in r) + (l = !p && g && u in g), + (l && u in v) || + ((c = l ? g[u] : r[u]), + (v[u] = + f && "function" != typeof g[u] + ? r[u] + : m && l + ? s(c, n) + : y && g[u] == c + ? (function(e) { + var t = function(t) { + return this instanceof e + ? new e(t) + : e(t) + } + return (t[a] = e[a]), t + })(c) + : d && "function" == typeof c + ? s(Function.call, c) + : c), + d && ((v[a] || (v[a] = {}))[u] = c)) + } + ;(o.F = 1), + (o.G = 2), + (o.S = 4), + (o.P = 8), + (o.B = 16), + (o.W = 32), + (t.exports = o) + }, + { 30: 30, 31: 31, 33: 33 } + ], + 33: [ + function(e, t, r) { + var n = (t.exports = + "undefined" != typeof window && window.Math == Math + ? window + : "undefined" != typeof self && self.Math == Math + ? self + : Function("return this")()) + "number" == typeof __g && (__g = n) + }, + {} + ], + 34: [ + function(e, t, r) { + t.exports = function(e) { + return "object" == typeof e + ? null !== e + : "function" == typeof e + } + }, + {} + ], + 35: [ + function(e, t, r) { + var n = Object + t.exports = { + create: n.create, + getProto: n.getPrototypeOf, + isEnum: {}.propertyIsEnumerable, + getDesc: n.getOwnPropertyDescriptor, + setDesc: n.defineProperty, + setDescs: n.defineProperties, + getKeys: n.keys, + getNames: n.getOwnPropertyNames, + getSymbols: n.getOwnPropertySymbols, + each: [].forEach + } + }, + {} + ], + 36: [ + function(e, t, r) { + var n = e(35).getDesc, + i = e(34), + s = e(29), + a = function(e, t) { + if ((s(e), !i(t) && null !== t)) + throw TypeError(t + ": can't set as prototype!") + } + t.exports = { + set: + Object.setPrototypeOf || + ("__proto__" in {} + ? (function(t, r, i) { + try { + ;(i = e(31)( + Function.call, + n(Object.prototype, "__proto__").set, + 2 + )), + i(t, []), + (r = !(t instanceof Array)) + } catch (s) { + r = !0 + } + return function(e, t) { + return ( + a(e, t), + r ? (e.__proto__ = t) : i(e, t), + e + ) + } + })({}, !1) + : void 0), + check: a + } + }, + { 29: 29, 31: 31, 34: 34, 35: 35 } + ], + 37: [ + function(e, t, r) { + var n = e(32) + n(n.S, "Object", { setPrototypeOf: e(36).set }) + }, + { 32: 32, 36: 36 } + ] + }, + {}, + [1] + )(1) + }) + }, + [7434, 2653], + function(e, t) { + function r(e, t) { + for (var r = -1, n = e.length; ++r < n && t(e[r], r, e) !== !1; ); + return e + } + e.exports = r + }, + [7440, 2665, 2666, 470, 1420, 2701], + [7446, 181], + function(e, t) { + function r(e) { + return null == e ? "" : e + "" + } + e.exports = r + }, + [7466, 1409], + [7472, 94, 181], + [7476, 815, 94], + [7486, 148], + [7487, 180, 148], + [7492, 472, 94, 563, 180, 99], + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("flow") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("jsx") + } + } + }), + (e.exports = t["default"]) + }, + [7470, 2738, 474], + 148, + [7475, 377], + [7479, 824, 825], + [7491, 1439, 824, 377, 2744], + [ + 7412, + 2897, + 311, + 841, + 186, + 1469, + 840, + 48, + 29, + 831, + 1453, + 2769, + 378, + 2820, + 830, + 1443, + 2793, + 33 + ], + [7330, 29], + [7436, 2803, 1449, 570, 834, 475, 2819, 2822], + [7470, 1449, 475], + 563, + [7471, 832, 833, 379], + [7416, 2896], + [7455, 1468], + [7470, 1462, 380], + 563, + [7479, 837, 183], + [7339, 2908], + [7341, 2910], + 799, + 557, + 558, + [7365, 95, 847, 1473], + [7372, 476, 157, 574], + 803, + [7375, 95, 844, 381], + [ + 7391, + 95, + 575, + 844, + 1473, + 476, + 1478, + 574, + 1479, + 848, + 1481, + 381, + 2920, + 1474, + 2915, + 2916, + 1472, + 477, + 847, + 1477 + ], + [7470, 2956, 478], + 148, + [7475, 383], + [7479, 850, 851], + [7491, 1485, 850, 383, 2962], + [ + 7412, + 1502, + 86, + 482, + 85, + 861, + 481, + 17, + 6, + 857, + 1499, + 2987, + 479, + 3038, + 856, + 1489, + 3011, + 11 + ], + [7330, 6], + [7436, 3021, 1495, 579, 860, 480, 3037, 3040], + [7470, 1495, 480], + 563, + [7471, 858, 859, 384], + [7334, 3054], + 799, + 557, + 558, + [7365, 96, 867, 1504], + [7372, 483, 158, 582], + 803, + [7375, 96, 864, 385], + [ + 7391, + 96, + 583, + 864, + 1504, + 483, + 1509, + 582, + 1510, + 868, + 1512, + 385, + 3071, + 1505, + 3066, + 3067, + 1503, + 484, + 867, + 1508 + ], + [7416, 3048], + [ + 7412, + 1502, + 86, + 482, + 85, + 861, + 481, + 17, + 6, + 873, + 1519, + 3113, + 485, + 3189, + 872, + 1517, + 3134, + 11 + ], + [7330, 6], + [7436, 1528, 874, 159, 587, 314, 1535, 3191], + [7466, 1530], + [7470, 874, 314], + 563, + [7479, 875, 188], + [7339, 3209], + 799, + 557, + 465, + 558, + [7365, 100, 885, 1544], + [7372, 589, 191, 881], + 803, + [7375, 100, 882, 387], + [ + 7391, + 100, + 590, + 882, + 1544, + 589, + 1548, + 881, + 1549, + 886, + 1550, + 387, + 3222, + 1545, + 3216, + 3218, + 1543, + 486, + 885, + 1547 + ], + [ + 7412, + 3199, + 315, + 588, + 190, + 1540, + 878, + 66, + 38, + 891, + 1557, + 3253, + 388, + 3342, + 889, + 1554, + 3276, + 54 + ], + [7330, 38], + [7416, 3198], + [7436, 1568, 893, 149, 594, 193, 1574, 3345], + [7446, 195], + [7466, 1570], + [7470, 893, 193], + [7472, 149, 195], + [7476, 3313, 149], + [7488, 3303, 1564, 3319], + 98, + 466, + [7365, 597, 1582, 3354], + [7339, 3391], + [7341, 3393], + 799, + 557, + 465, + 558, + [7365, 101, 909, 1588], + [7372, 598, 197, 905], + 803, + [7375, 101, 906, 390], + [ + 7391, + 101, + 599, + 906, + 1588, + 598, + 1592, + 905, + 1593, + 910, + 1594, + 390, + 3404, + 1589, + 3398, + 3400, + 1587, + 489, + 909, + 1591 + ], + [ + 7412, + 3381, + 317, + 902, + 196, + 1584, + 901, + 73, + 39, + 915, + 1601, + 3434, + 391, + 3523, + 913, + 1598, + 3457, + 55 + ], + [7330, 39], + [7416, 3380], + [7436, 1612, 917, 150, 603, 199, 1618, 3526], + [7446, 201], + [7466, 1614], + [7470, 917, 199], + [7472, 150, 201], + [7476, 3494, 150], + [7488, 3484, 1608, 3500], + 799, + 557, + 465, + 558, + [7365, 102, 928, 1626], + [7372, 607, 202, 924], + 803, + [7375, 102, 925, 393], + [ + 7391, + 102, + 608, + 925, + 1626, + 607, + 1630, + 924, + 1631, + 929, + 1632, + 393, + 3556, + 1627, + 3550, + 3552, + 1625, + 493, + 928, + 1629 + ], + [ + 7412, + 1624, + 87, + 492, + 83, + 605, + 491, + 18, + 7, + 933, + 1639, + 3587, + 494, + 3644, + 932, + 1636, + 3610, + 13 + ], + [7330, 7], + [7436, 3623, 1644, 320, 936, 394, 3643, 3647], + [7455, 3648], + [7470, 1644, 394], + [7471, 935, 610, 395], + [7475, 395], + [7479, 935, 611], + [7488, 3618, 1642, 3629], + [7416, 3533], + [ + 7412, + 1624, + 87, + 492, + 83, + 605, + 491, + 18, + 7, + 943, + 1652, + 3676, + 495, + 3752, + 942, + 1650, + 3697, + 13 + ], + [7330, 7], + [7436, 1661, 944, 160, 615, 322, 1668, 3754], + [7466, 1663], + [7470, 944, 322], + 563, + [7479, 945, 204], + [7334, 3768], + [7339, 3773], + 799, + 557, + 465, + 558, + [7365, 103, 956, 1676], + [7372, 620, 208, 952], + 803, + [7375, 103, 953, 397], + [ + 7391, + 103, + 621, + 953, + 1676, + 620, + 1680, + 952, + 1681, + 957, + 1682, + 397, + 3786, + 1677, + 3780, + 3782, + 1675, + 496, + 956, + 1679 + ], + [ + 7412, + 3763, + 207, + 619, + 206, + 948, + 949, + 67, + 31, + 962, + 1689, + 3818, + 323, + 3908, + 960, + 1686, + 3842, + 40 + ], + [7330, 31], + [7416, 3762], + [7436, 1699, 964, 151, 625, 210, 1705, 1707], + [7446, 212], + [7466, 1701], + [7470, 964, 210], + [7472, 151, 212], + [7476, 3879, 151], + 563, + 148, + [7479, 1712, 969], + [7497, 32, 23, 3939, 1725, 26], + [7334, 3953], + [7339, 3958], + [7358, 1719], + 799, + 557, + 465, + 558, + [7365, 97, 981, 1717], + [7372, 499, 162, 977], + 803, + [7375, 97, 978, 401], + [ + 7391, + 97, + 632, + 978, + 1717, + 499, + 1722, + 977, + 1723, + 982, + 1724, + 401, + 3970, + 1718, + 3965, + 3967, + 974, + 500, + 981, + 1721 + ], + [7470, 4003, 501], + 148, + [7475, 403], + [7479, 984, 985], + [7491, 1728, 984, 403, 4009], + [ + 7412, + 3947, + 152, + 498, + 161, + 972, + 973, + 32, + 23, + 990, + 1742, + 4034, + 325, + 4085, + 631, + 1732, + 4058, + 26 + ], + [7436, 4068, 1738, 636, 993, 502, 4084, 4087], + [7470, 1738, 502], + 563, + [7471, 991, 992, 404], + [7416, 3946], + [7455, 1757], + [7470, 1751, 405], + 563, + [7479, 996, 214], + 98, + 466, + [7365, 642, 1762, 4163], + [7470, 4203, 504], + 148, + [7475, 407], + [7479, 1002, 1003], + [7491, 1766, 1002, 407, 4209], + [ + 7412, + 1783, + 89, + 508, + 88, + 1013, + 507, + 19, + 8, + 1009, + 1780, + 4234, + 505, + 4285, + 1008, + 1770, + 4258, + 14 + ], + [7330, 8], + [7436, 4268, 1776, 648, 1012, 506, 4284, 4287], + [7470, 1776, 506], + 563, + [7471, 1010, 1011, 408], + [7334, 4299], + 799, + 557, + 465, + 558, + [7365, 104, 1020, 1785], + [7372, 651, 217, 1016], + 803, + [7375, 104, 1017, 409], + [ + 7391, + 104, + 652, + 1017, + 1785, + 651, + 1789, + 1016, + 1790, + 1021, + 1791, + 409, + 4317, + 1786, + 4311, + 4313, + 1784, + 509, + 1020, + 1788 + ], + [7416, 4294], + [ + 7412, + 1783, + 89, + 508, + 88, + 1013, + 507, + 19, + 8, + 1026, + 1798, + 4358, + 510, + 4434, + 1025, + 1796, + 4379, + 14 + ], + [7330, 8], + [7436, 1807, 1027, 163, 656, 329, 1814, 4436], + [7466, 1809], + [7470, 1027, 329], + 563, + [7479, 1028, 219], + [7334, 4450], + [7339, 4455], + [7341, 4457], + 799, + 557, + 465, + 558, + [7365, 105, 1040, 1822], + [7372, 658, 222, 1036], + 803, + [7375, 105, 1037, 411], + [ + 7391, + 105, + 659, + 1037, + 1822, + 658, + 1826, + 1036, + 1827, + 1041, + 1828, + 411, + 4468, + 1823, + 4462, + 4464, + 1821, + 511, + 1040, + 1825 + ], + [ + 7412, + 4445, + 330, + 1033, + 221, + 1031, + 1032, + 68, + 41, + 1046, + 1835, + 4499, + 412, + 4588, + 1044, + 1832, + 4522, + 56 + ], + [7330, 41], + [7416, 4444], + [7436, 1846, 1048, 153, 663, 224, 1852, 4591], + [7446, 226], + [7466, 1848], + [7470, 1048, 224], + [7472, 153, 226], + [7476, 4559, 153], + [7488, 4549, 1842, 4565], + function(e, t, r) { + "use strict" + var n = r(415)["default"], + i = r(84)["default"], + s = r(665)["default"], + a = r(414)["default"], + o = r(21)["default"], + u = r(9)["default"] + t.__esModule = !0 + var l = r(175), + c = r(4633), + p = o(c), + f = r(15), + h = u(f), + d = p["default"]("\n require($0);\n"), + m = p["default"]( + '\n Object.defineProperty(exports, "__esModule", {\n value: true\n });\n' + ), + y = p["default"]( + "\n Object.defineProperty(exports, $0, {\n enumerable: true,\n get: function () {\n return $1;\n }\n });\n" + ), + v = p["default"]("\n exports.__esModule = true;\n"), + g = p["default"]("\n exports.$0 = $1;\n"), + E = p["default"]( + '\n Object.keys(OBJECT).forEach(function (key) {\n if (key === "default") return;\n Object.defineProperty(exports, key, {\n enumerable: true,\n get: function () {\n return OBJECT[key];\n }\n });\n });\n' + ), + b = [ + "FunctionExpression", + "FunctionDeclaration", + "ClassProperty", + "ClassMethod", + "ObjectMethod" + ] + ;(t["default"] = function() { + var e = n(), + t = { + ReferencedIdentifier: function(e) { + var t = e.node.name, + r = this.remaps[t] + r && + this.scope.getBinding(t) === e.scope.getBinding(t) && + (e.parentPath.isCallExpression({ callee: e.node }) + ? e.replaceWith( + h.sequenceExpression([h.numericLiteral(0), r]) + ) + : e.replaceWith(r), + this.requeueInParent(e)) + }, + AssignmentExpression: function(t) { + var r = t.node + if (!r[e]) { + var n = t.get("left") + if (n.isIdentifier()) { + var s = n.node.name, + a = this.exports[s] + if ( + a && + this.scope.getBinding(s) === t.scope.getBinding(s) + ) { + r[e] = !0 + for ( + var o = a, + u = Array.isArray(o), + l = 0, + o = u ? o : i(o); + ; + + ) { + var c + if (u) { + if (l >= o.length) break + c = o[l++] + } else { + if (((l = o.next()), l.done)) break + c = l.value + } + var p = c + r = g(p, r).expression + } + t.replaceWith(r), this.requeueInParent(t) + } + } + } + }, + UpdateExpression: function(e) { + var t = e.get("argument") + if (t.isIdentifier()) { + var r = t.node.name, + n = this.exports[r] + if (n && this.scope.getBinding(r) === e.scope.getBinding(r)) { + var s = h.assignmentExpression( + e.node.operator[0] + "=", + t.node, + h.numericLiteral(1) + ) + if ( + (e.parentPath.isExpressionStatement() && + !e.isCompletionRecord()) || + e.node.prefix + ) + return e.replaceWith(s), void this.requeueInParent(e) + var a = [] + a.push(s) + var o = void 0 + ;(o = "--" === e.node.operator ? "+" : "-"), + a.push( + h.binaryExpression(o, t.node, h.numericLiteral(1)) + ) + for ( + var u = e.replaceWithMultiple(h.sequenceExpression(a)), + l = u, + c = Array.isArray(l), + p = 0, + l = c ? l : i(l); + ; + + ) { + var f + if (c) { + if (p >= l.length) break + f = l[p++] + } else { + if (((p = l.next()), p.done)) break + f = p.value + } + var d = f + this.requeueInParent(d) + } + } + } + } + } + return { + inherits: r(1328), + visitor: { + ThisExpression: function(e, t) { + this.ranCommonJS || + t.opts.allowTopLevelThis === !0 || + e.findParent(function(e) { + return !e.is("shadow") && b.indexOf(e.type) >= 0 + }) || + e.replaceWith(h.identifier("undefined")) + }, + Program: { + exit: function(e) { + function r(t, r) { + var n = S[t] + if (n) return n + var i = e.scope.generateUidIdentifier( + l.basename(t, l.extname(t)) + ), + s = h.variableDeclaration("var", [ + h.variableDeclarator( + i, + d(h.stringLiteral(t)).expression + ) + ]) + return ( + "number" == typeof r && r > 0 && (s._blockHoist = r), + D.push(s), + (S[t] = i) + ) + } + function n(e, t, r) { + var n = e[t] || [] + e[t] = n.concat(r) + } + this.ranCommonJS = !0 + var o = !!this.opts.strict, + u = e.scope + u.rename("module"), u.rename("exports"), u.rename("require") + for ( + var c = !1, + p = !1, + f = e.get("body"), + b = s(null), + x = s(null), + A = s(null), + D = [], + C = s(null), + S = s(null), + F = 0; + F < f.length; + F++ + ) { + var w = f[F] + if (w.isExportDeclaration()) { + c = !0 + for ( + var _ = [].concat( + w.get("declaration"), + w.get("specifiers") + ), + T = _, + P = Array.isArray(T), + B = 0, + T = P ? T : i(T); + ; + + ) { + var k + if (P) { + if (B >= T.length) break + k = T[B++] + } else { + if (((B = T.next()), B.done)) break + k = B.value + } + var I = k, + O = I.getBindingIdentifiers() + if (O.__esModule) + throw I.buildCodeFrameError( + 'Illegal export "__esModule"' + ) + } + } + if (w.isImportDeclaration()) { + var M + p = !0 + var R = w.node.source.value, + L = b[R] || { specifiers: [], maxBlockHoist: 0 } + ;(M = L.specifiers).push.apply(M, w.node.specifiers), + "number" == typeof w.node._blockHoist && + (L.maxBlockHoist = Math.max( + w.node._blockHoist, + L.maxBlockHoist + )), + (b[R] = L), + w.remove() + } else if (w.isExportDefaultDeclaration()) { + var N = w.get("declaration") + if (N.isFunctionDeclaration()) { + var j = N.node.id, + U = h.identifier("default") + j + ? (n(x, j.name, U), + D.push(g(U, j)), + w.replaceWith(N.node)) + : (D.push(g(U, h.toExpression(N.node))), + w.remove()) + } else if (N.isClassDeclaration()) { + var j = N.node.id, + U = h.identifier("default") + j + ? (n(x, j.name, U), + w.replaceWithMultiple([N.node, g(U, j)])) + : w.replaceWith(g(U, h.toExpression(N.node))) + } else + w.replaceWith(g(h.identifier("default"), N.node)), + w.parentPath.requeue(w.get("expression.left")) + } else if (w.isExportNamedDeclaration()) { + var N = w.get("declaration") + if (N.node) { + if (N.isFunctionDeclaration()) { + var j = N.node.id + n(x, j.name, j), + D.push(g(j, j)), + w.replaceWith(N.node) + } else if (N.isClassDeclaration()) { + var j = N.node.id + n(x, j.name, j), + w.replaceWithMultiple([N.node, g(j, j)]), + (A[j.name] = !0) + } else if (N.isVariableDeclaration()) { + for ( + var V = N.get("declarations"), + G = V, + W = Array.isArray(G), + q = 0, + G = W ? G : i(G); + ; + + ) { + var H + if (W) { + if (q >= G.length) break + H = G[q++] + } else { + if (((q = G.next()), q.done)) break + H = q.value + } + var Y = H, + j = Y.get("id"), + J = Y.get("init") + J.node || + J.replaceWith( + h.identifier("undefined") + ), + j.isIdentifier() && + (n(x, j.node.name, j.node), + J.replaceWith( + g(j.node, J.node).expression + ), + (A[j.node.name] = !0)) + } + w.replaceWith(N.node) + } + continue + } + var _ = w.get("specifiers") + if (_.length) { + var K = [], + X = w.node.source + if (X) + for ( + var z = r(X.value, w.node._blockHoist), + $ = _, + Q = Array.isArray($), + Z = 0, + $ = Q ? $ : i($); + ; + + ) { + var ee + if (Q) { + if (Z >= $.length) break + ee = $[Z++] + } else { + if (((Z = $.next()), Z.done)) break + ee = Z.value + } + var I = ee + I.isExportNamespaceSpecifier() || + I.isExportDefaultSpecifier() || + (I.isExportSpecifier() && + ("default" === I.node.local.name + ? D.push( + y( + h.stringLiteral( + I.node.exported + .name + ), + h.memberExpression( + h.callExpression( + this.addHelper( + "interopRequireDefault" + ), + [z] + ), + I.node.local + ) + ) + ) + : D.push( + y( + h.stringLiteral( + I.node.exported + .name + ), + h.memberExpression( + z, + I.node.local + ) + ) + ), + (A[I.node.exported.name] = !0))) + } + else + for ( + var te = _, + re = Array.isArray(te), + ne = 0, + te = re ? te : i(te); + ; + + ) { + var ie + if (re) { + if (ne >= te.length) break + ie = te[ne++] + } else { + if (((ne = te.next()), ne.done)) break + ie = ne.value + } + var I = ie + I.isExportSpecifier() && + (n( + x, + I.node.local.name, + I.node.exported + ), + (A[I.node.exported.name] = !0), + K.push( + g(I.node.exported, I.node.local) + )) + } + w.replaceWithMultiple(K) + } + } else + w.isExportAllDeclaration() && + (D.push( + E({ + OBJECT: r( + w.node.source.value, + w.node._blockHoist + ) + }) + ), + w.remove()) + } + for (var X in b) { + var se = b[X], + _ = se.specifiers, + ae = se.maxBlockHoist + if (_.length) { + for ( + var oe = r(X, ae), ue = void 0, le = 0; + le < _.length; + le++ + ) { + var I = _[le] + if (h.isImportNamespaceSpecifier(I)) { + if (o) C[I.local.name] = oe + else { + var ce = h.variableDeclaration("var", [ + h.variableDeclarator( + I.local, + h.callExpression( + this.addHelper( + "interopRequireWildcard" + ), + [oe] + ) + ) + ]) + ae > 0 && (ce._blockHoist = ae), D.push(ce) + } + ue = I.local + } else + h.isImportDefaultSpecifier(I) && + (_[le] = h.importSpecifier( + I.local, + h.identifier("default") + )) + } + for ( + var pe = _, + fe = Array.isArray(pe), + he = 0, + pe = fe ? pe : i(pe); + ; + + ) { + var de + if (fe) { + if (he >= pe.length) break + de = pe[he++] + } else { + if (((he = pe.next()), he.done)) break + de = he.value + } + var I = de + if (h.isImportSpecifier(I)) { + var me = oe + if ("default" === I.imported.name) + if (ue) me = ue + else { + me = ue = e.scope.generateUidIdentifier( + oe.name + ) + var ce = h.variableDeclaration("var", [ + h.variableDeclarator( + me, + h.callExpression( + this.addHelper( + "interopRequireDefault" + ), + [oe] + ) + ) + ]) + ae > 0 && (ce._blockHoist = ae), + D.push(ce) + } + C[I.local.name] = h.memberExpression( + me, + h.cloneWithoutLoc(I.imported) + ) + } + } + } else D.push(d(h.stringLiteral(X))) + } + if (p && a(A).length) { + var ye = h.identifier("undefined") + for (var ve in A) ye = g(h.identifier(ve), ye).expression + var ge = h.expressionStatement(ye) + ;(ge._blockHoist = 3), D.unshift(ge) + } + if (c && !o) { + var Ee = m + this.opts.loose && (Ee = v) + var be = Ee() + ;(be._blockHoist = 3), D.unshift(be) + } + e.unshiftContainer("body", D), + e.traverse(t, { + remaps: C, + scope: u, + exports: x, + requeueInParent: function(t) { + return e.requeue(t) + } + }) + } + } + } + } + }), + (e.exports = t["default"]) + }, + 799, + 557, + 465, + 558, + [7365, 106, 1060, 1859], + [7372, 667, 227, 1056], + 803, + [7375, 106, 1057, 416], + [ + 7391, + 106, + 668, + 1057, + 1859, + 667, + 1863, + 1056, + 1864, + 1061, + 1865, + 416, + 4619, + 1860, + 4613, + 4615, + 1858, + 513, + 1060, + 1862 + ], + [ + 7412, + 1857, + 90, + 415, + 84, + 665, + 414, + 21, + 9, + 1065, + 1872, + 4650, + 514, + 4707, + 1064, + 1869, + 4673, + 15 + ], + [7330, 9], + [7436, 4686, 1877, 333, 1068, 417, 4706, 4710], + [7455, 4711], + [7470, 1877, 417], + [7471, 1067, 670, 418], + [7475, 418], + [7479, 1067, 671], + [7488, 4681, 1875, 4692], + [7416, 4596], + [ + 7412, + 1857, + 90, + 415, + 84, + 665, + 414, + 21, + 9, + 1075, + 1885, + 4739, + 515, + 4815, + 1074, + 1883, + 4760, + 15 + ], + [7330, 9], + [7436, 1894, 1076, 164, 675, 335, 1901, 4817], + [7466, 1896], + [7470, 1076, 335], + 563, + [7479, 1077, 229], + [7416, 1934], + [ + 7412, + 1935, + 91, + 422, + 82, + 517, + 421, + 10, + 2, + 1083, + 1911, + 4849, + 516, + 4925, + 1082, + 1909, + 4870, + 57 + ], + [7330, 2], + [7436, 1920, 1084, 165, 678, 337, 1927, 4927], + [7466, 1922], + [7470, 1084, 337], + 563, + [7479, 1085, 232], + 799, + 557, + 465, + 558, + [7365, 107, 1094, 1939], + [7372, 680, 234, 1090], + 803, + [7375, 107, 1091, 423], + [ + 7391, + 107, + 681, + 1091, + 1939, + 680, + 1943, + 1090, + 1944, + 1095, + 1945, + 423, + 4952, + 1940, + 4946, + 4948, + 1938, + 518, + 1094, + 1942 + ], + [ + 7412, + 1935, + 91, + 422, + 82, + 517, + 421, + 10, + 2, + 1100, + 1952, + 4983, + 424, + 5072, + 1098, + 1949, + 5006, + 58 + ], + [7330, 2], + [7416, 1934], + [7436, 1963, 1102, 154, 685, 236, 1969, 5075], + [7446, 238], + [7466, 1965], + [7470, 1102, 236], + [7472, 154, 238], + [7476, 5043, 154], + [7488, 5033, 1959, 5049], + [7339, 5093], + [7341, 5095], + 799, + 557, + 465, + 558, + [7365, 108, 1115, 1976], + [7372, 687, 240, 1111], + 803, + [7375, 108, 1112, 426], + [ + 7391, + 108, + 688, + 1112, + 1976, + 687, + 1980, + 1111, + 1981, + 1116, + 1982, + 426, + 5106, + 1977, + 5100, + 5102, + 1975, + 520, + 1115, + 1979 + ], + [ + 7412, + 5083, + 339, + 1108, + 239, + 1972, + 1107, + 69, + 42, + 1121, + 1989, + 5137, + 427, + 5226, + 1119, + 1986, + 5160, + 59 + ], + [7330, 42], + [7416, 5082], + [7436, 2e3, 1123, 155, 692, 242, 2006, 5229], + [7446, 244], + [7466, 2002], + [7470, 1123, 242], + [7472, 155, 244], + [7476, 5197, 155], + [7488, 5187, 1996, 5203], + [ + 7412, + 5376, + 250, + 701, + 249, + 2038, + 1138, + 70, + 34, + 1129, + 2022, + 5249, + 522, + 5300, + 695, + 2012, + 5273, + 49 + ], + [7436, 5283, 2018, 697, 1132, 523, 5299, 5302], + [7470, 2018, 523], + 563, + [7471, 1130, 1131, 429], + [7416, 5375], + [7455, 2037], + [7470, 2031, 430], + 563, + [7479, 1135, 246], + [7339, 5386], + 799, + 557, + 465, + 558, + [7365, 109, 1145, 2042], + [7372, 702, 251, 1141], + 803, + [7375, 109, 1142, 431], + [ + 7391, + 109, + 703, + 1142, + 2042, + 702, + 2046, + 1141, + 2047, + 1146, + 2048, + 431, + 5399, + 2043, + 5393, + 5395, + 2041, + 524, + 1145, + 2045 + ], + [7339, 5434], + [7341, 5436], + 799, + 557, + 465, + 558, + [7365, 110, 1156, 2053], + [7372, 706, 253, 1152], + 803, + [7375, 110, 1153, 432], + [ + 7391, + 110, + 707, + 1153, + 2053, + 706, + 2057, + 1152, + 2058, + 1157, + 2059, + 432, + 5447, + 2054, + 5441, + 5443, + 2052, + 525, + 1156, + 2056 + ], + [7470, 5478, 526], + 148, + [7475, 434], + [7479, 1159, 1160], + [7491, 2063, 1159, 434, 5484], + [ + 7412, + 5424, + 342, + 1149, + 252, + 2049, + 1148, + 50, + 24, + 1166, + 2077, + 5509, + 343, + 5560, + 1165, + 2067, + 5533, + 28 + ], + [7330, 24], + [7436, 5543, 2073, 711, 1169, 527, 5559, 5562], + [7470, 2073, 527], + 563, + [7471, 1167, 1168, 435], + [7416, 5423], + [7455, 2092], + [7470, 2086, 436], + 563, + [7479, 1172, 255], + [7339, 5646], + 799, + 557, + 465, + 558, + [7365, 111, 1182, 2098], + [7372, 716, 259, 1178], + 803, + [7375, 111, 1179, 437], + [ + 7391, + 111, + 717, + 1179, + 2098, + 716, + 2102, + 1178, + 2103, + 1183, + 2104, + 437, + 5659, + 2099, + 5653, + 5655, + 2097, + 528, + 1182, + 2101 + ], + [7416, 5635], + [ + 7412, + 5636, + 345, + 2095, + 258, + 2093, + 1175, + 77, + 43, + 1188, + 2111, + 5700, + 529, + 5776, + 1187, + 2109, + 5721, + 60 + ], + [7330, 43], + [7436, 2120, 1189, 166, 721, 347, 2127, 5778], + [7466, 2122], + [7470, 1189, 347], + 563, + [7479, 1190, 261], + [7339, 5800], + 799, + 557, + 465, + 558, + [7365, 112, 1200, 2136], + [7372, 724, 264, 1196], + 803, + [7375, 112, 1197, 439], + [ + 7391, + 112, + 725, + 1197, + 2136, + 724, + 2140, + 1196, + 2141, + 1201, + 2142, + 439, + 5813, + 2137, + 5807, + 5809, + 2135, + 530, + 1200, + 2139 + ], + [7416, 5789], + [ + 7412, + 5790, + 348, + 2133, + 263, + 2131, + 1193, + 74, + 35, + 1206, + 2149, + 5854, + 531, + 5930, + 1205, + 2147, + 5875, + 51 + ], + [7330, 35], + [7436, 2158, 1207, 167, 729, 350, 2165, 5932], + [7466, 2160], + [7470, 1207, 350], + 563, + [7479, 1208, 266], + [7378, 5945, 5940], + [7416, 6068], + [ + 7412, + 6069, + 353, + 2205, + 271, + 2203, + 1221, + 71, + 36, + 1215, + 2184, + 5982, + 532, + 6060, + 1214, + 2182, + 6003, + 61 + ], + [7330, 36], + [7436, 1216, 1217, 168, 736, 352, 2199, 6062], + [7447, 6048], + [7466, 2194], + [7470, 1217, 352], + 563, + [7479, 1218, 269], + [7339, 6079], + 799, + 557, + 465, + 558, + [7365, 113, 1228, 2208], + [7372, 737, 272, 1224], + 803, + [7375, 113, 1225, 443], + [ + 7391, + 113, + 738, + 1225, + 2208, + 737, + 2212, + 1224, + 2213, + 1229, + 2214, + 443, + 6092, + 2209, + 6086, + 6088, + 2207, + 533, + 1228, + 2211 + ], + [ + 7412, + 2252, + 93, + 538, + 92, + 1242, + 537, + 20, + 4, + 444, + 2222, + 6134, + 534, + 2246, + 1232, + 2219, + 6158, + 12 + ], + [7330, 4], + [7416, 6269], + [ + 7412, + 2252, + 93, + 538, + 92, + 1242, + 537, + 20, + 4, + 444, + 2229, + 6189, + 535, + 2246, + 1235, + 2227, + 6210, + 12 + ], + [7330, 4], + [7446, 276], + [7466, 2242], + [7470, 1237, 274], + [7472, 156, 276], + [7476, 6234, 156], + [7477, 2237, 536, 742], + [7334, 6274], + 799, + 557, + 465, + 558, + [7365, 114, 1249, 2254], + [7372, 746, 277, 1245], + 803, + [7375, 114, 1246, 446], + [ + 7391, + 114, + 747, + 1246, + 2254, + 746, + 2258, + 1245, + 2259, + 1250, + 2260, + 446, + 6292, + 2255, + 6286, + 6288, + 2253, + 539, + 1249, + 2257 + ], + [7416, 6421], + [ + 7412, + 6422, + 358, + 2290, + 281, + 2288, + 1260, + 72, + 37, + 1255, + 2268, + 6336, + 540, + 6412, + 1254, + 2266, + 6357, + 52 + ], + [7330, 37], + [7436, 2277, 1256, 169, 751, 357, 2284, 6414], + [7466, 2279], + [7470, 1256, 357], + 563, + [7479, 1257, 279], + [7339, 6432], + 799, + 557, + 465, + 558, + [7365, 115, 1267, 2293], + [7372, 752, 282, 1263], + 803, + [7375, 115, 1264, 448], + [ + 7391, + 115, + 753, + 1264, + 2293, + 752, + 2297, + 1263, + 2298, + 1268, + 2299, + 448, + 6445, + 2294, + 6439, + 6441, + 2292, + 541, + 1267, + 2296 + ], + [7416, 6590], + [ + 7412, + 6591, + 361, + 2332, + 286, + 2330, + 1279, + 75, + 44, + 1274, + 2311, + 6505, + 542, + 6582, + 1272, + 2309, + 6526, + 62 + ], + [7330, 44], + [7326, 6531, 2312, 6532], + [7436, 2319, 1275, 170, 757, 360, 2326, 6584], + [7466, 2321], + [7470, 1275, 360], + 563, + [7479, 1276, 284], + [7339, 6601], + 799, + 557, + 465, + 558, + [7365, 116, 1286, 2335], + [7372, 758, 287, 1282], + 803, + [7375, 116, 1283, 450], + [ + 7391, + 116, + 759, + 1283, + 2335, + 758, + 2339, + 1282, + 2340, + 1287, + 2341, + 450, + 6614, + 2336, + 6608, + 6610, + 2334, + 543, + 1286, + 2338 + ], + [7416, 6742], + [ + 7412, + 6743, + 364, + 2370, + 291, + 2368, + 1298, + 76, + 45, + 1293, + 2349, + 6657, + 544, + 6734, + 1291, + 2347, + 6678, + 63 + ], + [7330, 45], + [7326, 6683, 2350, 6684], + [7436, 2357, 1294, 171, 763, 363, 2364, 6736], + [7466, 2359], + [7470, 1294, 363], + 563, + [7479, 1295, 289], + [7339, 6753], + 799, + 557, + 465, + 558, + [7365, 117, 1305, 2373], + [7372, 764, 292, 1301], + 803, + [7375, 117, 1302, 452], + [ + 7391, + 117, + 765, + 1302, + 2373, + 764, + 2377, + 1301, + 2378, + 1306, + 2379, + 452, + 6766, + 2374, + 6760, + 6762, + 2372, + 545, + 1305, + 2376 + ], + 799, + 557, + 465, + 558, + [7365, 118, 1314, 2387], + [7372, 769, 294, 1310], + 803, + [7375, 118, 1311, 453], + [ + 7391, + 118, + 770, + 1311, + 2387, + 769, + 2391, + 1310, + 2392, + 1315, + 2393, + 453, + 6812, + 2388, + 6806, + 6808, + 2386, + 546, + 1314, + 2390 + ], + [ + 7412, + 6789, + 365, + 2384, + 293, + 2382, + 768, + 53, + 27, + 1319, + 2407, + 6842, + 547, + 6892, + 1318, + 2397, + 6865, + 30 + ], + [7330, 27], + [7436, 6875, 2403, 773, 1322, 548, 6891, 6894], + [7470, 2403, 548], + 563, + [7471, 1320, 1321, 454], + [7416, 6788], + [7455, 2422], + [7470, 2416, 455], + 563, + [7479, 1325, 296], + function(e, t, r) { + "use strict" + var n = r(46)["default"] + t.__esModule = !0 + var i = r(64), + s = n(i) + ;(t["default"] = function() { + return { + visitor: { + Program: function(e, t) { + if (t.opts.strict !== !1) { + for ( + var r = e.node, n = r.directives, i = 0; + i < n.length; + i++ + ) { + var a = n[i] + if ("use strict" === a.value.value) return + } + e.unshiftContainer( + "directives", + s.directive(s.directiveLiteral("use strict")) + ) + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7339, 6985], + 799, + 557, + 465, + 558, + [7365, 119, 1336, 2429], + [7372, 777, 300, 1332], + 803, + [7375, 119, 1333, 456], + [ + 7391, + 119, + 778, + 1333, + 2429, + 777, + 2433, + 1332, + 2434, + 1337, + 2435, + 456, + 6998, + 2430, + 6992, + 6994, + 2428, + 549, + 1336, + 2432 + ], + [7416, 6974], + [ + 7412, + 6975, + 367, + 2426, + 299, + 2424, + 1329, + 78, + 46, + 1342, + 2442, + 7039, + 550, + 7115, + 1341, + 2440, + 7060, + 64 + ], + [7330, 46], + [7436, 2451, 1343, 172, 782, 369, 2458, 7117], + [7466, 2453], + [7470, 1343, 369], + 563, + [7479, 1344, 302], + [7334, 7136], + [7339, 7141], + 799, + 557, + 465, + 558, + [7365, 120, 1355, 2466], + [7372, 783, 304, 1351], + 803, + [7375, 120, 1352, 458], + [ + 7391, + 120, + 784, + 1352, + 2466, + 783, + 2470, + 1351, + 2471, + 1356, + 2472, + 458, + 7154, + 2467, + 7148, + 7150, + 2465, + 551, + 1355, + 2469 + ], + [7416, 7130], + [ + 7412, + 7131, + 370, + 2463, + 173, + 1347, + 1348, + 79, + 47, + 1361, + 2479, + 7195, + 552, + 7271, + 1360, + 2477, + 7216, + 65 + ], + [7330, 47], + [7436, 2488, 1362, 174, 788, 372, 2495, 7273], + [7466, 2490], + [7470, 1362, 372], + 563, + [7479, 1363, 306], + function(e, t, r) { + "use strict" + function n(e) { + throw new Error("The (" + e + ") Babel 5 plugin is being run with Babel 6.") + } + function i(e, t, r) { + c["default"](t) && ((r = t), (t = {})), + (t.filename = e), + f["default"].readFile(e, function(e, n) { + var i = void 0 + if (!e) + try { + i = k(n, t) + } catch (s) { + e = s + } + e ? r(e) : r(null, i) + }) + } + function s(e) { + var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1] + return (t.filename = e), k(f["default"].readFileSync(e, "utf8"), t) + } + var a = r(5)["default"], + o = r(3)["default"], + u = r(798)["default"] + ;(t.__esModule = !0), + (t.Plugin = n), + (t.transformFile = i), + (t.transformFileSync = s) + var l = r(1415), + c = a(l), + p = r(373), + f = a(p), + h = r(795), + d = o(h), + m = r(176), + y = o(m), + v = r(16), + g = o(v), + E = r(147), + b = a(E), + x = r(461), + A = a(x), + D = r(2512), + C = a(D), + S = r(791) + t.File = u(S) + var F = r(460) + t.options = u(F) + var w = r(2507) + t.buildExternalHelpers = u(w) + var _ = r(807) + t.template = u(_) + var T = r(7279) + ;(t.version = T.version), + (t.util = d), + (t.messages = y), + (t.types = g), + (t.traverse = b["default"]), + (t.OptionManager = A["default"]), + (t.Pipeline = C["default"]) + var P = new C["default"](), + B = P.analyse.bind(P) + t.analyse = B + var k = P.transform.bind(P) + t.transform = k + var I = P.transformFromAst.bind(P) + t.transformFromAst = I + }, + function(e, t, r) { + function n(e) { + return r(i(e)) + } + function i(e) { + return ( + s[e] || + (function() { + throw new Error("Cannot find module '" + e + "'.") + })() + ) + } + var s = { + "./config": 460, + "./config.js": 460, + "./index": 792, + "./index.js": 792, + "./option-manager": 461, + "./option-manager.js": 461, + "./parsers": 793, + "./parsers.js": 793, + "./removed": 794, + "./removed.js": 794 + } + ;(n.keys = function() { + return Object.keys(s) + }), + (n.resolve = i), + (e.exports = n), + (n.id = 1367) + }, + [7317, 5, 2529, 2531, 2528, 2527, 2514], + [7320, 2516], + function(e, t) { + !(function() { + "use strict" + function t(e) { + return e >= 48 && 57 >= e + } + function r(e) { + return (e >= 48 && 57 >= e) || (e >= 97 && 102 >= e) || (e >= 65 && 70 >= e) + } + function n(e) { + return e >= 48 && 55 >= e + } + function i(e) { + return ( + 32 === e || + 9 === e || + 11 === e || + 12 === e || + 160 === e || + (e >= 5760 && h.indexOf(e) >= 0) + ) + } + function s(e) { + return 10 === e || 13 === e || 8232 === e || 8233 === e + } + function a(e) { + if (65535 >= e) return String.fromCharCode(e) + var t = String.fromCharCode(Math.floor((e - 65536) / 1024) + 55296), + r = String.fromCharCode(((e - 65536) % 1024) + 56320) + return t + r + } + function o(e) { + return 128 > e ? d[e] : f.NonAsciiIdentifierStart.test(a(e)) + } + function u(e) { + return 128 > e ? m[e] : f.NonAsciiIdentifierPart.test(a(e)) + } + function l(e) { + return 128 > e ? d[e] : p.NonAsciiIdentifierStart.test(a(e)) + } + function c(e) { + return 128 > e ? m[e] : p.NonAsciiIdentifierPart.test(a(e)) + } + var p, f, h, d, m, y + for ( + f = { + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/, + NonAsciiIdentifierPart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19D9\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u2E2F\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099\u309A\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]/ + }, + p = { + NonAsciiIdentifierStart: /[\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0-\u08B2\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC03-\uDC37\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDE00-\uDE11\uDE13-\uDE2B\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF5D-\uDF61]|\uD805[\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDE00-\uDE2F\uDE44\uDE80-\uDEAA]|\uD806[\uDCA0-\uDCDF\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50\uDF93-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]/, + NonAsciiIdentifierPart: /[\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0561-\u0587\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05F0-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u0800-\u082D\u0840-\u085B\u08A0-\u08B2\u08E4-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C03\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58\u0C59\u0C60-\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D01-\u0D03\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D57\u0D60-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D82\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB9\u0EBB-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u170C\u170E-\u1714\u1720-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u1810-\u1819\u1820-\u1877\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1B00-\u1B4B\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1CD0-\u1CD2\u1CD4-\u1CF6\u1CF8\u1CF9\u1D00-\u1DF5\u1DFC-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA69D\uA69F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA7AD\uA7B0\uA7B1\uA7F7-\uA827\uA840-\uA873\uA880-\uA8C4\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA900-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB5F\uAB64\uAB65\uABC0-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2D\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF30-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE33\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48]|\uD804[\uDC00-\uDC46\uDC66-\uDC6F\uDC7F-\uDCBA\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDD0-\uDDDA\uDE00-\uDE11\uDE13-\uDE37\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF01-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB7\uDEC0-\uDEC9]|\uD806[\uDCA0-\uDCE9\uDCFF\uDEC0-\uDEF8]|\uD808[\uDC00-\uDF98]|\uD809[\uDC00-\uDC6E]|[\uD80C\uD840-\uD868\uD86A-\uD86C][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF44\uDF50-\uDF7E\uDF8F-\uDF9F]|\uD82C[\uDC00\uDC01]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDED6\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF34\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D]|\uD87E[\uDC00-\uDE1D]|\uDB40[\uDD00-\uDDEF]/ + }, + h = [ + 5760, + 6158, + 8192, + 8193, + 8194, + 8195, + 8196, + 8197, + 8198, + 8199, + 8200, + 8201, + 8202, + 8239, + 8287, + 12288, + 65279 + ], + d = new Array(128), + y = 0; + 128 > y; + ++y + ) + d[y] = (y >= 97 && 122 >= y) || (y >= 65 && 90 >= y) || 36 === y || 95 === y + for (m = new Array(128), y = 0; 128 > y; ++y) + m[y] = + (y >= 97 && 122 >= y) || + (y >= 65 && 90 >= y) || + (y >= 48 && 57 >= y) || + 36 === y || + 95 === y + e.exports = { + isDecimalDigit: t, + isHexDigit: r, + isOctalDigit: n, + isWhiteSpace: i, + isLineTerminator: s, + isIdentifierStartES5: o, + isIdentifierPartES5: u, + isIdentifierStartES6: l, + isIdentifierPartES6: c + } + })() + }, + function(e, t, r) { + "use strict" + function n(e) { + this.push(e.name) + } + function i(e) { + this.push("..."), this.print(e.argument, e) + } + function s(e) { + var t = e.properties + this.push("{"), + this.printInnerComments(e), + t.length && + (this.space(), this.printList(t, e, { indent: !0 }), this.space()), + this.push("}") + } + function a(e) { + this.printJoin(e.decorators, e, { separator: "" }), this._method(e) + } + function o(e) { + if ((this.printJoin(e.decorators, e, { separator: "" }), e.computed)) + this.push("["), this.print(e.key, e), this.push("]") + else { + if ( + v.isAssignmentPattern(e.value) && + v.isIdentifier(e.key) && + e.key.name === e.value.left.name + ) + return void this.print(e.value, e) + if ( + (this.print(e.key, e), + e.shorthand && + v.isIdentifier(e.key) && + v.isIdentifier(e.value) && + e.key.name === e.value.name) + ) + return + } + this.push(":"), this.space(), this.print(e.value, e) + } + function u(e) { + var t = e.elements, + r = t.length + this.push("["), this.printInnerComments(e) + for (var n = 0; n < t.length; n++) { + var i = t[n] + i + ? (n > 0 && this.space(), this.print(i, e), r - 1 > n && this.push(",")) + : this.push(",") + } + this.push("]") + } + function l(e) { + this.push("/" + e.pattern + "/" + e.flags) + } + function c(e) { + this.push(e.value ? "true" : "false") + } + function p() { + this.push("null") + } + function f(e) { + this.push(e.value + "") + } + function h(e, t) { + this.push(this._stringLiteral(e.value, t)) + } + function d(e, t) { + return ( + (e = JSON.stringify(e)), + (e = e.replace(/[\u000A\u000D\u2028\u2029]/g, function(e) { + return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4) + })), + "single" !== this.format.quotes || + v.isJSX(t) || + ((e = e.slice(1, -1)), + (e = e.replace(/\\"/g, '"')), + (e = e.replace(/'/g, "\\'")), + (e = "'" + e + "'")), + e + ) + } + var m = r(3)["default"] + ;(t.__esModule = !0), + (t.Identifier = n), + (t.RestElement = i), + (t.ObjectExpression = s), + (t.ObjectMethod = a), + (t.ObjectProperty = o), + (t.ArrayExpression = u), + (t.RegExpLiteral = l), + (t.BooleanLiteral = c), + (t.NullLiteral = p), + (t.NumericLiteral = f), + (t.StringLiteral = h), + (t._stringLiteral = d) + var y = r(16), + v = m(y) + ;(t.SpreadElement = i), + (t.SpreadProperty = i), + (t.RestProperty = i), + (t.ObjectPattern = s), + (t.ArrayPattern = u) + }, + function(e, t, r) { + "use strict" + var n = r(374)["default"], + i = r(80)["default"], + s = r(5)["default"], + a = r(3)["default"] + t.__esModule = !0 + var o = r(2550), + u = s(o), + l = r(2549), + c = s(l), + p = r(2548), + f = s(p), + h = r(2546), + d = s(h), + m = r(176), + y = a(m), + v = r(2547), + g = s(v), + E = (function(e) { + function t(r, n, s) { + i(this, t), (n = n || {}) + var a = r.comments || [], + o = r.tokens || [], + u = t.normalizeOptions(s, n, o), + l = new d["default"]() + e.call(this, l, u), + (this.comments = a), + (this.position = l), + (this.tokens = o), + (this.format = u), + (this.opts = n), + (this.ast = r), + (this._inForStatementInitCounter = 0), + (this.whitespace = new c["default"](o)), + (this.map = new f["default"](l, n, s)) + } + return ( + n(t, e), + (t.normalizeOptions = function(e, r, n) { + var i = " " + if (e) { + var s = u["default"](e).indent + s && " " !== s && (i = s) + } + var a = { + auxiliaryCommentBefore: r.auxiliaryCommentBefore, + auxiliaryCommentAfter: r.auxiliaryCommentAfter, + shouldPrintComment: r.shouldPrintComment, + retainLines: r.retainLines, + comments: null == r.comments || r.comments, + compact: r.compact, + minified: r.minified, + concise: r.concise, + quotes: r.quotes || t.findCommonStringDelimiter(e, n), + indent: { adjustMultilineComment: !0, style: i, base: 0 } + } + return ( + a.minified && (a.compact = !0), + "auto" === a.compact && + ((a.compact = e.length > 1e5), + a.compact && + console.error( + "[BABEL] " + + y.get("codeGeneratorDeopt", r.filename, "100KB") + )), + a.compact && (a.indent.adjustMultilineComment = !1), + a + ) + }), + (t.findCommonStringDelimiter = function(e, t) { + for ( + var r = { single: 0, double: 0 }, n = 0, i = 0; + i < t.length; + i++ + ) { + var s = t[i] + if ("string" === s.type.label) { + var a = e.slice(s.start, s.end) + if ( + ("'" === a[0] ? r.single++ : r["double"]++, n++, n >= 3) + ) + break + } + } + return r.single > r["double"] ? "single" : "double" + }), + (t.prototype.generate = function() { + return ( + this.print(this.ast), + this.printAuxAfterComment(), + { map: this.map.get(), code: this.get() } + ) + }), + t + ) + })(g["default"]) + ;(t.CodeGenerator = E), + (t["default"] = function(e, t, r) { + var n = new E(e, t, r) + return n.generate() + }) + }, + function(e, t, r) { + "use strict" + function n(e, t, r, n) { + if (e) { + for (var i = void 0, s = c(e), a = 0; a < s.length; a++) { + var o = s[a] + if (g.is(o, t)) { + var u = e[o] + if (((i = u(t, r, n)), null != i)) break + } + } + return i + } + } + function i(e) { + return g.isCallExpression(e) + ? !0 + : g.isMemberExpression(e) + ? i(e.object) || (!e.computed && i(e.property)) + : !1 + } + function s(e) { + return g.isUserWhitespacable(e) + } + function a(e, t, r) { + if (!e) return 0 + g.isExpressionStatement(e) && (e = e.expression) + var i = n(d["default"].nodes, e, t) + if (!i) { + var s = n(d["default"].list, e, t) + if (s) for (var o = 0; o < s.length && !(i = a(s[o], e, r)); o++); + } + return (i && i[r]) || 0 + } + function o(e, t) { + return a(e, t, "before") + } + function u(e, t) { + return a(e, t, "after") + } + function l(e, t, r) { + return t + ? g.isNewExpression(t) && t.callee === e && i(e) + ? !0 + : n(y, e, t, r) + : !1 + } + var c = r(462)["default"], + p = r(5)["default"], + f = r(3)["default"] + ;(t.__esModule = !0), + (t.isUserWhitespacable = s), + (t.needsWhitespace = a), + (t.needsWhitespaceBefore = o), + (t.needsWhitespaceAfter = u), + (t.needsParens = l) + var h = r(2545), + d = p(h), + m = r(2544), + y = f(m), + v = r(16), + g = f(v) + }, + function(e, t, r) { + "use strict" + function n(e) { + var t = o["default"][e] + if (!t) throw new ReferenceError("Unknown helper " + e) + return t().expression + } + var i = r(462)["default"], + s = r(5)["default"] + ;(t.__esModule = !0), (t.get = n) + var a = r(2557), + o = s(a), + u = i(o["default"]) + .map(function(e) { + return "_" === e[0] ? e.slice(1) : e + }) + .filter(function(e) { + return "__esModule" !== e + }) + ;(t.list = u), (t["default"] = n) + }, + [7335, 2573], + [7359, 799, 178], + [7364, 469, 81], + [7366, 799], + function(e, t) { + e.exports = function(e, t) { + return { value: t, done: !!e } + } + }, + function(e, t) { + e.exports = !0 + }, + function(e, t, r) { + var n = r(804) + e.exports = function(e, t) { + for (var r in t) n(e, r, t[r]) + return e + } + }, + [7376, 466], + function(e, t) { + e.exports = function(e, t, r) { + if (!(e instanceof t)) throw TypeError(r + ": use the 'new' operator!") + return e + } + }, + function(e, t) { + var r = Math.ceil, + n = Math.floor + e.exports = function(e) { + return isNaN((e = +e)) ? 0 : (e > 0 ? n : r)(e) + } + }, + [7379, 557], + [7381, 1376, 178, 468, 98], + 373, + [7390, 2595, 801], + [7392, 2598, 468], + [7395, 80], + function(e, t) { + "use strict" + t.__esModule = !0 + var r = "_paths" + t.PATH_CACHE_KEY = r + }, + [7407, 3, 16], + [7411, 80], + [7429, 555, 3, 16], + 1370, + [7432, 2648], + function(e, t) { + function r(e) { + var t = e ? e.length : 0 + return t ? e[t - 1] : void 0 + } + e.exports = r + }, + function(e, t) { + function r(e, t) { + if ("function" != typeof e) throw new TypeError(n) + return ( + (t = i(void 0 === t ? e.length - 1 : +t || 0, 0)), + function() { + for ( + var r = arguments, n = -1, s = i(r.length - t, 0), a = Array(s); + ++n < s; + + ) + a[n] = r[t + n] + switch (t) { + case 0: + return e.call(this, a) + case 1: + return e.call(this, r[0], a) + case 2: + return e.call(this, r[0], r[1], a) + } + var o = Array(t + 1) + for (n = -1; ++n < t; ) o[n] = r[n] + return (o[t] = a), e.apply(this, o) + } + ) + } + var n = "Expected a function", + i = Math.max + e.exports = r + }, + function(e, t) { + function r(e, t) { + var r = -1, + n = e.length + for (t || (t = Array(n)); ++r < n; ) t[r] = e[r] + return t + } + e.exports = r + }, + [7439, 1402, 309], + [7441, 1399, 812, 1400, 1405, 2688, 2689, 2690, 94, 99], + function(e, t) { + function r(e, t, r) { + r || (r = {}) + for (var n = -1, i = t.length; ++n < i; ) { + var s = t[n] + r[s] = e[s] + } + return r + } + e.exports = r + }, + [7442, 1405, 2677], + [7443, 2678], + [7445, 1404, 309], + [7447, 2687], + [7448, 2663, 99, 148], + function(e, t, r) { + function n(e, t) { + var r = -1, + n = s(e) ? Array(e.length) : [] + return ( + i(e, function(e, i, s) { + n[++r] = t(e, i, s) + }), + n + ) + } + var i = r(1403), + s = r(375) + e.exports = n + }, + function(e, t) { + function r(e) { + return function(t) { + return null == t ? void 0 : t[e] + } + } + e.exports = r + }, + function(e, t) { + function r(e, t, r) { + var n = -1, + i = e.length + ;(t = null == t ? 0 : +t || 0), + 0 > t && (t = -t > i ? 0 : i + t), + (r = void 0 === r || r > i ? i : +r || 0), + 0 > r && (r += i), + (i = t > r ? 0 : (r - t) >>> 0), + (t >>>= 0) + for (var s = Array(i); ++n < i; ) s[n] = e[n + t] + return s + } + e.exports = r + }, + [7458, 470, 471, 1398], + [7473, 99], + [7478, 1401, 470], + function(e, t, r) { + function n(e) { + return e === !0 || e === !1 || (i(e) && o.call(e) == s) + } + var i = r(148), + s = "[object Boolean]", + a = Object.prototype, + o = a.toString + e.exports = n + }, + [7481, 99], + [7483, 148], + [7484, 2662, 472, 148], + [7485, 99], + [7489, 565, 2659, 2680], + function(e, t) { + function r(e) { + return e + } + e.exports = r + }, + function(e, t) { + "use strict" + e.exports = function(e) { + var t = /^\\\\\?\\/.test(e), + r = /[^\x00-\x80]+/.test(e) + return t || r ? e : e.replace(/\\/g, "/") + } + }, + function(e, t, r) { + function n() { + ;(this._array = []), (this._set = {}) + } + var i = r(473) + ;(n.fromArray = function(e, t) { + for (var r = new n(), i = 0, s = e.length; s > i; i++) r.add(e[i], t) + return r + }), + (n.prototype.size = function() { + return Object.getOwnPropertyNames(this._set).length + }), + (n.prototype.add = function(e, t) { + var r = i.toSetString(e), + n = this._set.hasOwnProperty(r), + s = this._array.length + ;(n && !t) || this._array.push(e), n || (this._set[r] = s) + }), + (n.prototype.has = function(e) { + var t = i.toSetString(e) + return this._set.hasOwnProperty(t) + }), + (n.prototype.indexOf = function(e) { + var t = i.toSetString(e) + if (this._set.hasOwnProperty(t)) return this._set[t] + throw new Error('"' + e + '" is not in the set.') + }), + (n.prototype.at = function(e) { + if (e >= 0 && e < this._array.length) return this._array[e] + throw new Error("No element indexed by " + e) + }), + (n.prototype.toArray = function() { + return this._array.slice() + }), + (t.ArraySet = n) + }, + function(e, t, r) { + function n(e) { + return 0 > e ? (-e << 1) + 1 : (e << 1) + 0 + } + function i(e) { + var t = 1 === (1 & e), + r = e >> 1 + return t ? -r : r + } + var s = r(2709), + a = 5, + o = 1 << a, + u = o - 1, + l = o + ;(t.encode = function(e) { + var t, + r = "", + i = n(e) + do (t = i & u), (i >>>= a), i > 0 && (t |= l), (r += s.encode(t)) + while (i > 0) + return r + }), + (t.decode = function(e, t, r) { + var n, + o, + c = e.length, + p = 0, + f = 0 + do { + if (t >= c) + throw new Error("Expected more digits in base 64 VLQ value.") + if (((o = s.decode(e.charCodeAt(t++))), -1 === o)) + throw new Error("Invalid base64 digit: " + e.charAt(t - 1)) + ;(n = !!(o & l)), (o &= u), (p += o << f), (f += a) + } while (n) + ;(r.value = i(p)), (r.rest = t) + }) + }, + function(e, t, r) { + function n(e) { + e || (e = {}), + (this._file = s.getArg(e, "file", null)), + (this._sourceRoot = s.getArg(e, "sourceRoot", null)), + (this._skipValidation = s.getArg(e, "skipValidation", !1)), + (this._sources = new a()), + (this._names = new a()), + (this._mappings = new o()), + (this._sourcesContents = null) + } + var i = r(1423), + s = r(473), + a = r(1422).ArraySet, + o = r(2711).MappingList + ;(n.prototype._version = 3), + (n.fromSourceMap = function(e) { + var t = e.sourceRoot, + r = new n({ file: e.file, sourceRoot: t }) + return ( + e.eachMapping(function(e) { + var n = { + generated: { line: e.generatedLine, column: e.generatedColumn } + } + null != e.source && + ((n.source = e.source), + null != t && (n.source = s.relative(t, n.source)), + (n.original = { + line: e.originalLine, + column: e.originalColumn + }), + null != e.name && (n.name = e.name)), + r.addMapping(n) + }), + e.sources.forEach(function(t) { + var n = e.sourceContentFor(t) + null != n && r.setSourceContent(t, n) + }), + r + ) + }), + (n.prototype.addMapping = function(e) { + var t = s.getArg(e, "generated"), + r = s.getArg(e, "original", null), + n = s.getArg(e, "source", null), + i = s.getArg(e, "name", null) + this._skipValidation || this._validateMapping(t, r, n, i), + null == n || this._sources.has(n) || this._sources.add(n), + null == i || this._names.has(i) || this._names.add(i), + this._mappings.add({ + generatedLine: t.line, + generatedColumn: t.column, + originalLine: null != r && r.line, + originalColumn: null != r && r.column, + source: n, + name: i + }) + }), + (n.prototype.setSourceContent = function(e, t) { + var r = e + null != this._sourceRoot && (r = s.relative(this._sourceRoot, r)), + null != t + ? (this._sourcesContents || (this._sourcesContents = {}), + (this._sourcesContents[s.toSetString(r)] = t)) + : this._sourcesContents && + (delete this._sourcesContents[s.toSetString(r)], + 0 === Object.keys(this._sourcesContents).length && + (this._sourcesContents = null)) + }), + (n.prototype.applySourceMap = function(e, t, r) { + var n = t + if (null == t) { + if (null == e.file) + throw new Error( + 'SourceMapGenerator.prototype.applySourceMap requires either an explicit source file, or the source map\'s "file" property. Both were omitted.' + ) + n = e.file + } + var i = this._sourceRoot + null != i && (n = s.relative(i, n)) + var o = new a(), + u = new a() + this._mappings.unsortedForEach(function(t) { + if (t.source === n && null != t.originalLine) { + var a = e.originalPositionFor({ + line: t.originalLine, + column: t.originalColumn + }) + null != a.source && + ((t.source = a.source), + null != r && (t.source = s.join(r, t.source)), + null != i && (t.source = s.relative(i, t.source)), + (t.originalLine = a.line), + (t.originalColumn = a.column), + null != a.name && (t.name = a.name)) + } + var l = t.source + null == l || o.has(l) || o.add(l) + var c = t.name + null == c || u.has(c) || u.add(c) + }, this), + (this._sources = o), + (this._names = u), + e.sources.forEach(function(t) { + var n = e.sourceContentFor(t) + null != n && + (null != r && (t = s.join(r, t)), + null != i && (t = s.relative(i, t)), + this.setSourceContent(t, n)) + }, this) + }), + (n.prototype._validateMapping = function(e, t, r, n) { + if ( + (!(e && "line" in e && "column" in e && e.line > 0 && e.column >= 0) || + t || + r || + n) && + !( + e && + "line" in e && + "column" in e && + t && + "line" in t && + "column" in t && + e.line > 0 && + e.column >= 0 && + t.line > 0 && + t.column >= 0 && + r + ) + ) + throw new Error( + "Invalid mapping: " + + JSON.stringify({ + generated: e, + source: r, + original: t, + name: n + }) + ) + }), + (n.prototype._serializeMappings = function() { + for ( + var e, + t, + r, + n = 0, + a = 1, + o = 0, + u = 0, + l = 0, + c = 0, + p = "", + f = this._mappings.toArray(), + h = 0, + d = f.length; + d > h; + h++ + ) { + if (((e = f[h]), e.generatedLine !== a)) + for (n = 0; e.generatedLine !== a; ) (p += ";"), a++ + else if (h > 0) { + if (!s.compareByGeneratedPositionsInflated(e, f[h - 1])) continue + p += "," + } + ;(p += i.encode(e.generatedColumn - n)), + (n = e.generatedColumn), + null != e.source && + ((r = this._sources.indexOf(e.source)), + (p += i.encode(r - c)), + (c = r), + (p += i.encode(e.originalLine - 1 - u)), + (u = e.originalLine - 1), + (p += i.encode(e.originalColumn - o)), + (o = e.originalColumn), + null != e.name && + ((t = this._names.indexOf(e.name)), + (p += i.encode(t - l)), + (l = t))) + } + return p + }), + (n.prototype._generateSourcesContent = function(e, t) { + return e.map(function(e) { + if (!this._sourcesContents) return null + null != t && (e = s.relative(t, e)) + var r = s.toSetString(e) + return Object.prototype.hasOwnProperty.call(this._sourcesContents, r) + ? this._sourcesContents[r] + : null + }, this) + }), + (n.prototype.toJSON = function() { + var e = { + version: this._version, + sources: this._sources.toArray(), + names: this._names.toArray(), + mappings: this._serializeMappings() + } + return ( + null != this._file && (e.file = this._file), + null != this._sourceRoot && (e.sourceRoot = this._sourceRoot), + this._sourcesContents && + (e.sourcesContent = this._generateSourcesContent( + e.sources, + e.sourceRoot + )), + e + ) + }), + (n.prototype.toString = function() { + return JSON.stringify(this.toJSON()) + }), + (t.SourceMapGenerator = n) + }, + function(e, t, r) { + ;(t.SourceMapGenerator = r(1424).SourceMapGenerator), + (t.SourceMapConsumer = r(2713).SourceMapConsumer), + (t.SourceNode = r(2714).SourceNode) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("classConstructorCall") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("classProperties") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("decorators") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("doExpressions") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("exponentiationOperator") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("exportExtensions") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("functionBind") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("objectRestSpread") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("trailingFunctionCommas") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(48)["default"] + t.__esModule = !0 + var i = r(2718), + s = n(i) + ;(t["default"] = function() { + return { + inherits: r(567), + visitor: { + Function: function(e, t) { + e.node.async && + !e.node.generator && + s["default"](e, t.addHelper("asyncToGenerator")) + } + } + } + }), + (e.exports = t["default"]) + }, + [7393, 841, 48, 29, 2746, 2749, 2750, 378, 2721, 33], + [7439, 2728, 828], + [7455, 2752], + [7468, 2748], + [7395, 311], + 1391, + [7407, 29, 33], + [7411, 311], + [7320, 2774], + 1370, + 1398, + [7439, 2800, 571], + [7455, 2823], + [7466, 2804], + [7468, 2818], + [7479, 832, 569], + [7488, 2798, 1447, 2807], + [7328, 2824], + [7429, 1469, 29, 33], + 1370, + 812, + [7443, 2867], + [7445, 1457, 573], + [7446, 184], + [7448, 2855, 121, 183], + 1409, + [7466, 1461], + [7471, 837, 838, 121], + [7472, 185, 184], + [7473, 121], + [7476, 2861, 185], + [7492, 839, 185, 838, 380, 121], + 1420, + [7334, 2903], + [7335, 2904], + 581, + [7358, 2917], + [7361, 574], + [7364, 477, 95], + [7366, 842], + [7369, 1477, 476, 1478, 845, 844, 576, 2918, 848, 95, 381], + 1380, + [7373, 845], + [7376, 575], + [7379, 843], + 805, + [7393, 482, 17, 6, 2964, 2967, 2968, 479, 2939, 11], + [7439, 2946, 854], + [7455, 2970], + [7468, 2966], + [7395, 86], + 1391, + [7407, 6, 11], + [7411, 86], + [7320, 2992], + 1370, + 1398, + [7439, 3018, 580], + [7455, 3041], + [7466, 3022], + [7468, 3036], + [7479, 858, 578], + [7488, 3016, 1493, 3025], + [7328, 3042], + [7335, 3055], + [7338, 3058], + [7343, 1500], + [7358, 3068], + [7361, 582], + [7364, 484, 96], + [7366, 862], + [7369, 1508, 483, 1509, 865, 864, 584, 3069, 868, 96, 385], + 1380, + [7373, 865], + [7376, 583], + [7379, 863], + 805, + [7429, 861, 6, 11], + [7395, 86], + 1391, + [7407, 6, 11], + [7411, 86], + [7320, 3118], + [7328, 3136], + 1370, + [7326, 3138, 1520, 3139], + 1398, + 812, + [7439, 3152, 386], + [7443, 3169], + [7445, 1525, 386], + [7446, 189], + [7447, 3177], + [7448, 3155, 122, 188], + 1409, + [7472, 159, 189], + [7473, 122], + [7476, 3161, 159], + [7477, 3151, 585, 587], + [7486, 188], + [7488, 3149, 1524, 3167], + [7492, 877, 159, 876, 314, 122], + 1420, + function(e, t, r) { + "use strict" + var n = r(588)["default"], + i = r(66)["default"] + t.__esModule = !0 + var s = r(3236), + a = i(s), + o = a["default"]( + "\n let CLASS_REF = CLASS;\n var CALL_REF = CALL;\n var WRAPPER_REF = function (...args) {\n if (this instanceof WRAPPER_REF) {\n return Reflect.construct(CLASS_REF, args);\n } else {\n return CALL_REF.apply(this, args);\n }\n };\n WRAPPER_REF.__proto__ = CLASS_REF;\n WRAPPER_REF;\n" + ) + ;(t["default"] = function(e) { + function t(e) { + for (var t = e.get("body.body"), r = 0; r < t.length; r++) { + var n = t[r] + if ("constructorCall" === n.node.kind) return n + } + return null + } + function i(e, t) { + var r = t, + n = r.node, + i = n.id || t.scope.generateUidIdentifier("class") + t.parentPath.isExportDefaultDeclaration() && + ((t = t.parentPath), t.insertAfter(s.exportDefaultDeclaration(i))), + t.replaceWithMultiple( + o({ + CLASS_REF: t.scope.generateUidIdentifier(i.name), + CALL_REF: t.scope.generateUidIdentifier(i.name + "Call"), + CALL: s.functionExpression(null, e.node.params, e.node.body), + CLASS: s.toExpression(n), + WRAPPER_REF: i + }) + ), + e.remove() + } + var s = e.types, + a = n() + return { + inherits: r(1426), + visitor: { + Class: function(e) { + if (!e.node[a]) { + e.node[a] = !0 + var r = t(e) + r && i(r, e) + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7334, 3204], + [7335, 3205], + 581, + [7358, 3219], + [7361, 881], + [7364, 486, 100], + [7369, 1547, 589, 1548, 883, 882, 591, 3220, 886, 100, 387], + 1380, + [7373, 883], + [7376, 590], + 805, + [7395, 315], + 1391, + [7407, 38, 54], + [7411, 315], + [7320, 3258], + 1370, + [7328, 3278], + [7429, 1540, 38, 54], + 1370, + 810, + 1397, + 1398, + 812, + [7439, 3305, 389], + [7441, 3300, 1563, 1564, 1567, 3330, 3331, 3332, 149, 123], + [7443, 3321], + [7445, 1566, 389], + [7447, 3329], + [7448, 3308, 123, 194], + 1409, + 1410, + [7473, 123], + [7477, 1565, 487, 594], + [7486, 194], + [7492, 595, 149, 593, 193, 123], + 1420, + function(e, t, r) { + "use strict" + var n = r(3347)["default"] + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types, + i = { + Super: function(e) { + e.parentPath.isCallExpression({ callee: e.node }) && + this.push(e.parentPath) + } + }, + s = { + ReferencedIdentifier: function(e) { + this.scope.hasOwnBinding(e.node.name) && + ((this.collision = !0), e.skip()) + } + } + return { + inherits: r(1427), + visitor: { + Class: function(e) { + for ( + var r = !!e.node.superClass, + a = void 0, + o = [], + u = e.get("body"), + l = u.get("body"), + c = Array.isArray(l), + p = 0, + l = c ? l : n(l); + ; + + ) { + var f + if (c) { + if (p >= l.length) break + f = l[p++] + } else { + if (((p = l.next()), p.done)) break + f = p.value + } + var h = f + h.isClassProperty() + ? o.push(h) + : h.isClassMethod({ kind: "constructor" }) && (a = h) + } + if (o.length) { + var d = [], + m = void 0 + m = + e.isClassExpression() || !e.node.id + ? e.scope.generateUidIdentifier("class") + : e.node.id + for (var y = [], v = 0; v < o.length; v++) { + var g = o[v], + E = g.node + if ( + !(E.decorators && E.decorators.length > 0) && + E.value + ) { + var b = E["static"] + b + ? d.push( + t.expressionStatement( + t.assignmentExpression( + "=", + t.memberExpression(m, E.key), + E.value + ) + ) + ) + : y.push( + t.expressionStatement( + t.assignmentExpression( + "=", + t.memberExpression( + t.thisExpression(), + E.key + ), + E.value + ) + ) + ) + } + } + if (y.length) { + if (!a) { + var x = t.classMethod( + "constructor", + t.identifier("constructor"), + [], + t.blockStatement([]) + ) + r && + ((x.params = [ + t.restElement(t.identifier("args")) + ]), + x.body.body.push( + t.returnStatement( + t.callExpression(t["super"](), [ + t.spreadElement( + t.identifier("args") + ) + ]) + ) + )) + var A = u.unshiftContainer("body", x) + a = A[0] + } + for ( + var D = { collision: !1, scope: a.scope }, C = 0; + C < o.length; + C++ + ) { + var g = o[C] + if ((g.traverse(s, D), D.collision)) break + } + if (D.collision) { + var S = e.scope.generateUidIdentifier( + "initialiseProps" + ) + d.push( + t.variableDeclaration("var", [ + t.variableDeclarator( + S, + t.functionExpression( + null, + [], + t.blockStatement(y) + ) + ) + ]) + ), + (y = [ + t.expressionStatement( + t.callExpression( + t.memberExpression( + S, + t.identifier("call") + ), + [t.thisExpression()] + ) + ) + ]) + } + if (r) { + var F = [] + a.traverse(i, F) + for (var w = 0; w < F.length; w++) { + var _ = F[w] + _.insertAfter(y) + } + } else a.get("body").unshiftContainer("body", y) + } + for (var T = 0; T < o.length; T++) { + var g = o[T] + g.remove() + } + d.length && + (e.isClassExpression() + ? (e.scope.push({ id: m }), + e.replaceWith( + t.assignmentExpression("=", m, e.node) + )) + : (e.node.id || (e.node.id = m), + e.parentPath.isExportDeclaration() && + (e = e.parentPath)), + e.insertAfter(d)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + 799, + 557, + 558, + [7369, 3361, 3355, 3362, 900, 1580, 596, 3359, 1583, 597, 488], + 803, + [7375, 597, 1580, 488], + [7334, 3386], + [7335, 3387], + 581, + [7358, 3401], + [7361, 905], + [7364, 489, 101], + [7369, 1591, 598, 1592, 907, 906, 600, 3402, 910, 101, 390], + 1380, + [7373, 907], + [7376, 599], + 805, + [7395, 317], + 1391, + [7407, 39, 55], + [7411, 317], + [7320, 3439], + 1370, + [7328, 3459], + [7429, 1584, 39, 55], + 1370, + 810, + 1397, + 1398, + 812, + [7439, 3486, 392], + [7441, 3481, 1607, 1608, 1611, 3511, 3512, 3513, 150, 124], + [7443, 3502], + [7445, 1610, 392], + [7447, 3510], + [7448, 3489, 124, 200], + 1409, + 1410, + [7473, 124], + [7477, 1609, 490, 603], + [7486, 200], + [7492, 604, 150, 602, 199, 124], + 1420, + function(e, t, r) { + "use strict" + var n = r(83)["default"], + i = r(605)["default"], + s = r(18)["default"] + t.__esModule = !0 + var a = r(3570), + o = s(a), + u = r(3528), + l = s(u), + c = o["default"]("\n CLASS_REF = DECORATOR(CLASS_REF) || CLASS_REF;\n") + ;(t["default"] = function(e) { + function t(e) { + return e.reverse().map(function(e) { + return e.expression + }) + } + function s(e, r, s) { + var a = [], + o = e.node.decorators + if (o) { + ;(e.node.decorators = null), (o = t(o)) + for (var l = o, p = Array.isArray(l), f = 0, l = p ? l : n(l); ; ) { + var h + if (p) { + if (f >= l.length) break + h = l[f++] + } else { + if (((f = l.next()), f.done)) break + h = f.value + } + var d = h + a.push(c({ CLASS_REF: r, DECORATOR: d })) + } + } + for ( + var m = i(null), + y = e.get("body.body"), + v = Array.isArray(y), + g = 0, + y = v ? y : n(y); + ; + + ) { + var E + if (v) { + if (g >= y.length) break + E = y[g++] + } else { + if (((g = y.next()), g.done)) break + E = g.value + } + var b = E, + x = b.node.decorators + if (x) { + var A = u.toKeyAlias(b.node) + ;(m[A] = m[A] || []), m[A].push(b.node), b.remove() + } + } + for (var A in m) var D = m[A] + return a + } + function a(e) { + if (e.isClass()) { + if (e.node.decorators) return !0 + for (var t = e.node.body.body, r = 0; r < t.length; r++) { + var n = t[r] + if (n.decorators) return !0 + } + } else if (e.isObjectExpression()) + for (var i = e.node.properties, s = 0; s < i.length; s++) { + var a = i[s] + if (a.decorators) return !0 + } + return !1 + } + function o(e) { + throw e.buildCodeFrameError( + "Decorators are not supported yet in 6.x pending proposal update." + ) + } + var u = e.types + return { + inherits: r(1428), + visitor: { + ClassExpression: function(e) { + if (a(e)) { + o(e), l["default"](e) + var t = e.scope.generateDeclaredUidIdentifier("ref"), + r = [] + r.push(u.assignmentExpression("=", t, e.node)), + (r = r.concat(s(e, t, this))), + r.push(t), + e.replaceWith(u.sequenceExpression(r)) + } + }, + ClassDeclaration: function(e) { + if (a(e)) { + o(e), l["default"](e) + var t = e.node.id, + r = [] + ;(r = r.concat( + s(e, t, this).map(function(e) { + return u.expressionStatement(e) + }) + )), + r.push(u.expressionStatement(t)), + e.insertAfter(r) + } + }, + ObjectExpression: function(e) { + a(e) && o(e) + } + } + } + }), + (e.exports = t["default"]) + }, + [7335, 3539], + [7338, 3542], + [7343, 1622], + [7358, 3553], + [7361, 924], + [7364, 493, 102], + [7369, 1629, 607, 1630, 926, 925, 609, 3554, 929, 102, 393], + 1380, + [7373, 926], + [7376, 608], + 805, + [7395, 87], + 1391, + [7407, 7, 13], + [7411, 87], + [7320, 3592], + 1370, + [7328, 3612], + 810, + 1398, + [7439, 3619, 612], + [7441, 3615, 3616, 1642, 3621, 3633, 3634, 3635, 320, 395], + [7466, 3624], + [7468, 3642], + [7429, 605, 7, 13], + [7395, 87], + 1391, + [7407, 7, 13], + [7411, 87], + [7320, 3681], + [7328, 3699], + 1370, + [7326, 3701, 1653, 3702], + 1398, + 812, + [7439, 3715, 396], + [7443, 3732], + [7445, 1658, 396], + [7446, 205], + [7447, 3740], + [7448, 3718, 125, 204], + 1409, + [7472, 160, 205], + [7473, 125], + [7476, 3724, 160], + [7477, 3714, 613, 615], + [7486, 204], + [7488, 3712, 1657, 3730], + [7492, 947, 160, 946, 322, 125], + 1420, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + inherits: r(1429), + visitor: { + DoExpression: function(e) { + var t = e.node.body.body + t.length + ? e.replaceWithMultiple(t) + : e.replaceWith(e.scope.buildUndefinedNode()) + } + } + } + }), + (e.exports = t["default"]) + }, + [7335, 3769], + 581, + [7358, 3783], + [7361, 952], + [7364, 496, 103], + [7369, 1679, 620, 1680, 954, 953, 622, 3784, 957, 103, 397], + 1380, + [7373, 954], + [7376, 621], + 805, + [7395, 207], + 1391, + [7407, 31, 40], + [7411, 207], + [7320, 3823], + 1370, + [7328, 3844], + [7429, 948, 31, 40], + 1370, + 1397, + 1398, + 812, + [7439, 3871, 398], + [7441, 3866, 1694, 1695, 1698, 3896, 3897, 3898, 151, 126], + [7443, 3887], + [7445, 1697, 398], + [7447, 3895], + [7448, 3874, 126, 211], + 1409, + 1410, + [7473, 126], + [7477, 1696, 497, 625], + [7486, 211], + [7492, 626, 151, 624, 210, 126], + [7494, 3881, 398], + 1420, + function(e, t, r) { + "use strict" + var n = r(152)["default"], + i = r(161)["default"], + s = r(32)["default"], + a = r(23)["default"] + t.__esModule = !0 + var o = r(325), + u = r(3940), + l = s(u), + c = r(1713), + p = s(c), + f = r(3914), + h = a(f), + d = r(1725), + m = s(d), + y = r(26), + v = a(y), + g = m["default"]("\n (function () {\n super(...arguments);\n })\n"), + E = { + "FunctionExpression|FunctionDeclaration": function(e) { + e.is("shadow") || e.skip() + }, + Method: function(e) { + e.skip() + } + }, + b = o.visitors.merge([ + E, + { + Super: function(e) { + if ( + this.isDerived && + !this.hasBareSuper && + !e.parentPath.isCallExpression({ callee: e.node }) + ) + throw e.buildCodeFrameError( + "'super.*' is not allowed before super()" + ) + }, + CallExpression: { + exit: function(e) { + if ( + e.get("callee").isSuper() && + ((this.hasBareSuper = !0), !this.isDerived) + ) + throw e.buildCodeFrameError( + "super() is only allowed in a derived constructor" + ) + } + }, + ThisExpression: function(e) { + if (this.isDerived && !this.hasBareSuper && !e.inShadow("this")) + throw e.buildCodeFrameError( + "'this' is not allowed before super()" + ) + } + } + ]), + x = o.visitors.merge([ + E, + { + ThisExpression: function(e) { + this.superThises.push(e) + } + } + ]), + A = (function() { + function e(t, r) { + n(this, e), + (this.parent = t.parent), + (this.scope = t.scope), + (this.node = t.node), + (this.path = t), + (this.file = r), + this.clearDescriptors(), + (this.instancePropBody = []), + (this.instancePropRefs = {}), + (this.staticPropBody = []), + (this.body = []), + (this.bareSuperAfter = []), + (this.bareSupers = []), + (this.pushedConstructor = !1), + (this.pushedInherits = !1), + (this.isLoose = !1), + (this.superThises = []), + (this.classId = this.node.id), + (this.classRef = + this.node.id || this.scope.generateUidIdentifier("class")), + (this.superName = this.node.superClass || v.identifier("Function")), + (this.isDerived = !!this.node.superClass) + } + return ( + (e.prototype.run = function() { + var e = this, + t = this.superName, + r = this.file, + n = this.body, + i = (this.constructorBody = v.blockStatement([])) + this.constructor = this.buildConstructor() + var s = [], + a = [] + if ( + (this.isDerived && + (a.push(t), + (t = this.scope.generateUidIdentifierBasedOnNode(t)), + s.push(t), + (this.superName = t)), + this.buildBody(), + i.body.unshift( + v.expressionStatement( + v.callExpression(r.addHelper("classCallCheck"), [ + v.thisExpression(), + this.classRef + ]) + ) + ), + (n = n.concat( + this.staticPropBody.map(function(t) { + return t(e.classRef) + }) + )), + this.classId && 1 === n.length) + ) + return v.toExpression(n[0]) + n.push(v.returnStatement(this.classRef)) + var o = v.functionExpression(null, s, v.blockStatement(n)) + return (o.shadow = !0), v.callExpression(o, a) + }), + (e.prototype.buildConstructor = function() { + var e = v.functionDeclaration( + this.classRef, + [], + this.constructorBody + ) + return v.inherits(e, this.node), e + }), + (e.prototype.pushToMap = function(e, t, r, n) { + void 0 === r && (r = "value") + var i = void 0 + e["static"] + ? ((this.hasStaticDescriptors = !0), + (i = this.staticMutatorMap)) + : ((this.hasInstanceDescriptors = !0), + (i = this.instanceMutatorMap)) + var s = h.push(i, e, r, this.file, n) + return t && (s.enumerable = v.booleanLiteral(!0)), s + }), + (e.prototype.constructorMeMaybe = function() { + for ( + var e = !1, t = this.path.get("body.body"), r = t, n = 0; + n < r.length; + n++ + ) { + var i = r[n] + if ((e = i.equals("kind", "constructor"))) break + } + if (!e) { + var s = void 0, + a = void 0 + if (this.isDerived) { + var o = g().expression + ;(s = o.params), (a = o.body) + } else (s = []), (a = v.blockStatement([])) + this.path + .get("body") + .unshiftContainer( + "body", + v.classMethod( + "constructor", + v.identifier("constructor"), + s, + a + ) + ) + } + }), + (e.prototype.buildBody = function() { + if ( + (this.constructorMeMaybe(), + this.pushBody(), + this.verifyConstructor(), + this.userConstructor) + ) { + var e = this.constructorBody + ;(e.body = e.body.concat(this.userConstructor.body.body)), + v.inherits(this.constructor, this.userConstructor), + v.inherits(e, this.userConstructor.body) + } + this.pushDescriptors() + }), + (e.prototype.pushBody = function() { + for (var e = this.path.get("body.body"), t = 0; t < e.length; t++) { + var r = e[t], + n = r.node + if (r.isClassProperty()) + throw r.buildCodeFrameError( + "Missing class properties transform." + ) + if (n.decorators) + throw r.buildCodeFrameError( + "Method has decorators, put the decorator plugin before the classes one." + ) + if (v.isClassMethod(n)) { + var i = "constructor" === n.kind + if ( + i && + (r.traverse(b, this), + !this.hasBareSuper && this.isDerived) + ) + throw r.buildCodeFrameError( + "missing super() call in constructor" + ) + var s = new l["default"]( + { + forceSuperMemoisation: i, + methodPath: r, + methodNode: n, + objectRef: this.classRef, + superRef: this.superName, + isStatic: n["static"], + isLoose: this.isLoose, + scope: this.scope, + file: this.file + }, + !0 + ) + s.replace(), + i + ? this.pushConstructor(s, n, r) + : this.pushMethod(n, r) + } + } + }), + (e.prototype.clearDescriptors = function() { + ;(this.hasInstanceDescriptors = !1), + (this.hasStaticDescriptors = !1), + (this.instanceMutatorMap = {}), + (this.staticMutatorMap = {}) + }), + (e.prototype.pushDescriptors = function() { + this.pushInherits() + var e = this.body, + t = void 0, + r = void 0 + if ( + (this.hasInstanceDescriptors && + (t = h.toClassObject(this.instanceMutatorMap)), + this.hasStaticDescriptors && + (r = h.toClassObject(this.staticMutatorMap)), + t || r) + ) { + t && (t = h.toComputedObjectFromClass(t)), + r && (r = h.toComputedObjectFromClass(r)) + var n = v.nullLiteral(), + i = [this.classRef, n, n, n, n] + t && (i[1] = t), + r && (i[2] = r), + this.instanceInitializersId && + ((i[3] = this.instanceInitializersId), + e.unshift( + this.buildObjectAssignment( + this.instanceInitializersId + ) + )), + this.staticInitializersId && + ((i[4] = this.staticInitializersId), + e.unshift( + this.buildObjectAssignment( + this.staticInitializersId + ) + )) + for (var s = 0, a = 0; a < i.length; a++) i[a] !== n && (s = a) + ;(i = i.slice(0, s + 1)), + e.push( + v.expressionStatement( + v.callExpression( + this.file.addHelper("createClass"), + i + ) + ) + ) + } + this.clearDescriptors() + }), + (e.prototype.buildObjectAssignment = function(e) { + return v.variableDeclaration("var", [ + v.variableDeclarator(e, v.objectExpression([])) + ]) + }), + (e.prototype.wrapSuperCall = function(e, t, r, n) { + var i = e.node + this.isLoose + ? (i.arguments.unshift(v.thisExpression()), + 2 === i.arguments.length && + v.isSpreadElement(i.arguments[1]) && + v.isIdentifier(i.arguments[1].argument, { name: "arguments" }) + ? ((i.arguments[1] = i.arguments[1].argument), + (i.callee = v.memberExpression( + t, + v.identifier("apply") + ))) + : (i.callee = v.memberExpression( + t, + v.identifier("call") + ))) + : (i = p["default"]( + v.callExpression( + v.memberExpression( + v.identifier("Object"), + v.identifier("getPrototypeOf") + ), + [this.classRef] + ), + v.thisExpression(), + i.arguments + )) + var s = v.callExpression( + this.file.addHelper("possibleConstructorReturn"), + [v.thisExpression(), i] + ), + a = this.bareSuperAfter.map(function(e) { + return e(r) + }) + e.parentPath.isExpressionStatement() && + e.parentPath.container === n.node.body && + n.node.body.length - 1 === e.parentPath.key + ? ((this.superThises.length || a.length) && + (e.scope.push({ id: r }), + (s = v.assignmentExpression("=", r, s))), + a.length && (s = v.toSequenceExpression([s].concat(a, [r]))), + e.parentPath.replaceWith(v.returnStatement(s))) + : e.replaceWithMultiple( + [ + v.variableDeclaration("var", [ + v.variableDeclarator(r, s) + ]) + ].concat(a, [v.expressionStatement(r)]) + ) + }), + (e.prototype.verifyConstructor = function() { + var e = this + if (this.isDerived) { + var t = this.userConstructorPath, + r = t.get("body") + t.traverse(x, this) + for ( + var n = !!this.bareSupers.length, + s = this.superName || v.identifier("Function"), + a = t.scope.generateUidIdentifier("this"), + o = this.bareSupers, + u = Array.isArray(o), + l = 0, + o = u ? o : i(o); + ; + + ) { + var c + if (u) { + if (l >= o.length) break + c = o[l++] + } else { + if (((l = o.next()), l.done)) break + c = l.value + } + var p = c + this.wrapSuperCall(p, s, a, r), + n && + p.find(function(e) { + return e === t + ? !0 + : e.isLoop() || e.isConditional() + ? ((n = !1), !0) + : void 0 + }) + } + for ( + var f = this.superThises, + h = Array.isArray(f), + d = 0, + f = h ? f : i(f); + ; + + ) { + var m + if (h) { + if (d >= f.length) break + m = f[d++] + } else { + if (((d = f.next()), d.done)) break + m = d.value + } + var y = m + y.replaceWith(a) + } + var g = function(t) { + return v.callExpression( + e.file.addHelper("possibleConstructorReturn"), + [a].concat(t || []) + ) + }, + E = r.get("body") + E.length && + !E.pop().isReturnStatement() && + r.pushContainer("body", v.returnStatement(n ? a : g())) + for ( + var b = this.superReturns, + A = Array.isArray(b), + D = 0, + b = A ? b : i(b); + ; + + ) { + var C + if (A) { + if (D >= b.length) break + C = b[D++] + } else { + if (((D = b.next()), D.done)) break + C = D.value + } + var S = C + if (S.node.argument) { + var F = S.scope.generateDeclaredUidIdentifier("ret") + S.get("argument").replaceWithMultiple([ + v.assignmentExpression("=", F, S.node.argument), + g(F) + ]) + } else S.get("argument").replaceWith(g()) + } + } + }), + (e.prototype.pushMethod = function(e, t) { + var r = t ? t.scope : this.scope + ;("method" === e.kind && this._processMethod(e, r)) || + this.pushToMap(e, !1, null, r) + }), + (e.prototype._processMethod = function() { + return !1 + }), + (e.prototype.pushConstructor = function(e, t, r) { + ;(this.bareSupers = e.bareSupers), + (this.superReturns = e.returns), + r.scope.hasOwnBinding(this.classRef.name) && + r.scope.rename(this.classRef.name) + var n = this.constructor + ;(this.userConstructorPath = r), + (this.userConstructor = t), + (this.hasConstructor = !0), + v.inheritsComments(n, t), + (n._ignoreUserWhitespace = !0), + (n.params = t.params), + v.inherits(n.body, t.body), + (n.body.directives = t.body.directives), + this._pushConstructor() + }), + (e.prototype._pushConstructor = function() { + this.pushedConstructor || + ((this.pushedConstructor = !0), + (this.hasInstanceDescriptors || this.hasStaticDescriptors) && + this.pushDescriptors(), + this.body.push(this.constructor), + this.pushInherits()) + }), + (e.prototype.pushInherits = function() { + this.isDerived && + !this.pushedInherits && + ((this.pushedInherits = !0), + this.body.unshift( + v.expressionStatement( + v.callExpression(this.file.addHelper("inherits"), [ + this.classRef, + this.superName + ]) + ) + )) + }), + e + ) + })() + ;(t["default"] = A), (e.exports = t["default"]) + }, + [7466, 3923], + [7468, 3934], + [7470, 1710, 399], + [7500, 23, 26], + [7335, 3954], + 581, + [7360, 3962], + [7361, 977], + [7364, 500, 97], + 559, + [7369, 1721, 499, 1722, 979, 978, 633, 3968, 982, 97, 401], + 1380, + [7373, 979], + [7376, 632], + 805, + [7393, 498, 32, 23, 4011, 4014, 4015, 325, 3986, 26], + [7439, 3993, 988], + [7455, 4017], + [7468, 4013], + [7395, 152], + 1391, + [7407, 23, 26], + [7411, 152], + [7320, 4039], + 1370, + 1398, + [7439, 4065, 637], + [7455, 4088], + [7466, 4069], + [7468, 4083], + [7479, 991, 635], + [7488, 4063, 1736, 4072], + [7328, 4089], + [7429, 972, 23, 26], + 1370, + 812, + [7443, 4132], + [7445, 1746, 639], + [7446, 215], + [7448, 4120, 127, 214], + 1409, + [7466, 1750], + [7471, 996, 997, 127], + [7472, 216, 215], + [7473, 127], + [7476, 4126, 216], + [7492, 998, 216, 997, 405, 127], + 1420, + 799, + 557, + 558, + [7369, 4170, 4164, 4171, 1001, 1760, 641, 4168, 1763, 642, 503], + 803, + [7375, 642, 1760, 503], + [7439, 4193, 1006], + [7455, 4217], + [7468, 4213], + [7395, 89], + 1391, + [7407, 8, 14], + [7411, 89], + [7320, 4239], + 1370, + 1398, + [7439, 4265, 649], + [7455, 4288], + [7466, 4269], + [7468, 4283], + [7479, 1010, 647], + [7488, 4263, 1774, 4272], + [7328, 4289], + [7335, 4300], + [7338, 4303], + [7343, 1781], + [7358, 4314], + [7361, 1016], + [7364, 509, 104], + [7369, 1788, 651, 1789, 1018, 1017, 653, 4315, 1021, 104, 409], + 1380, + [7373, 1018], + [7376, 652], + 805, + [7429, 1013, 8, 14], + [7395, 89], + 1391, + [7407, 8, 14], + [7411, 89], + [7320, 4363], + [7328, 4381], + 1370, + [7326, 4383, 1799, 4384], + 1398, + 812, + [7439, 4397, 410], + [7443, 4414], + [7445, 1804, 410], + [7446, 220], + [7447, 4422], + [7448, 4400, 128, 219], + 1409, + [7472, 163, 220], + [7473, 128], + [7476, 4406, 163], + [7477, 4396, 654, 656], + [7486, 219], + [7488, 4394, 1803, 4412], + [7492, 1030, 163, 1029, 329, 128], + 1420, + function(e, t, r) { + "use strict" + var n = r(1031)["default"], + i = r(68)["default"] + t.__esModule = !0 + var s = r(4482), + a = i(s), + o = a["default"]("\n define(MODULE_NAME, [SOURCES], FACTORY);\n"), + u = a["default"]("\n (function (PARAMS) {\n BODY;\n })\n") + ;(t["default"] = function(e) { + function t(e) { + if (!e.isCallExpression()) return !1 + if (!e.get("callee").isIdentifier({ name: "require" })) return !1 + if (e.scope.getBinding("require")) return !1 + var t = e.get("arguments") + if (1 !== t.length) return !1 + var r = t[0] + return !!r.isStringLiteral() + } + var i = e.types, + s = { + ReferencedIdentifier: function(e) { + var t = e.node, + r = e.scope + "exports" !== t.name || + r.getBinding("exports") || + (this.hasExports = !0), + "module" !== t.name || + r.getBinding("module") || + (this.hasModule = !0) + }, + CallExpression: function(e) { + t(e) && (this.bareSources.push(e.node.arguments[0]), e.remove()) + }, + VariableDeclarator: function(e) { + var r = e.get("id") + if (r.isIdentifier()) { + var n = e.get("init") + if (t(n)) { + var i = n.node.arguments[0] + ;(this.sourceNames[i.value] = !0), + this.sources.push([r.node, i]), + e.remove() + } + } + } + } + return { + inherits: r(1053), + pre: function() { + ;(this.sources = []), + (this.sourceNames = n(null)), + (this.bareSources = []), + (this.hasExports = !1), + (this.hasModule = !1) + }, + visitor: { + Program: { + exit: function(e) { + var t = this + if (!this.ran) { + ;(this.ran = !0), e.traverse(s, this) + var r = this.sources.map(function(e) { + return e[0] + }), + n = this.sources.map(function(e) { + return e[1] + }) + n = n.concat( + this.bareSources.filter(function(e) { + return !t.sourceNames[e.value] + }) + ) + var a = this.getModuleName() + a && (a = i.stringLiteral(a)), + this.hasExports && + (n.unshift(i.stringLiteral("exports")), + r.unshift(i.identifier("exports"))), + this.hasModule && + (n.unshift(i.stringLiteral("module")), + r.unshift(i.identifier("module"))) + var l = e.node, + c = u({ PARAMS: r, BODY: l.body }) + ;(c.expression.body.directives = l.directives), + (l.directives = []), + (l.body = [ + o({ MODULE_NAME: a, SOURCES: n, FACTORY: c }) + ]) + } + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7335, 4451], + 581, + [7358, 4465], + [7361, 1036], + [7364, 511, 105], + [7369, 1825, 658, 1826, 1038, 1037, 660, 4466, 1041, 105, 411], + 1380, + [7373, 1038], + [7376, 659], + 805, + [7395, 330], + 1391, + [7407, 41, 56], + [7411, 330], + [7320, 4504], + 1370, + [7328, 4524], + [7429, 1031, 41, 56], + 1370, + 810, + 1397, + 1398, + 812, + [7439, 4551, 413], + [7441, 4546, 1841, 1842, 1845, 4576, 4577, 4578, 153, 129], + [7443, 4567], + [7445, 1844, 413], + [7447, 4575], + [7448, 4554, 129, 225], + 1409, + 1410, + [7473, 129], + [7477, 1843, 512, 663], + [7486, 225], + [7492, 664, 153, 662, 224, 129], + 1420, + [7335, 4602], + [7338, 4605], + [7343, 1855], + [7358, 4616], + [7361, 1056], + [7364, 513, 106], + [7369, 1862, 667, 1863, 1058, 1057, 669, 4617, 1061, 106, 416], + 1380, + [7373, 1058], + [7376, 668], + 805, + [7395, 90], + 1391, + [7407, 9, 15], + [7411, 90], + [7320, 4655], + 1370, + [7328, 4675], + 810, + 1398, + [7439, 4682, 672], + [7441, 4678, 4679, 1875, 4684, 4696, 4697, 4698, 333, 418], + [7466, 4687], + [7468, 4705], + [7429, 665, 9, 15], + [7395, 90], + 1391, + [7407, 9, 15], + [7411, 90], + [7320, 4744], + [7328, 4762], + 1370, + [7326, 4764, 1886, 4765], + 1398, + 812, + [7439, 4778, 419], + [7443, 4795], + [7445, 1891, 419], + [7446, 230], + [7447, 4803], + [7448, 4781, 130, 229], + 1409, + [7472, 164, 230], + [7473, 130], + [7476, 4787, 164], + [7477, 4777, 673, 675], + [7486, 229], + [7488, 4775, 1890, 4793], + [7492, 1079, 164, 1078, 335, 130], + 1420, + [7429, 517, 2, 57], + [7395, 91], + 1391, + [7407, 2, 57], + [7411, 91], + [7320, 4854], + [7328, 4872], + 1370, + [7326, 4874, 1912, 4875], + 1398, + 812, + [7439, 4888, 420], + [7443, 4905], + [7445, 1917, 420], + [7446, 233], + [7447, 4913], + [7448, 4891, 131, 232], + 1409, + [7472, 165, 233], + [7473, 131], + [7476, 4897, 165], + [7477, 4887, 676, 678], + [7486, 232], + [7488, 4885, 1916, 4903], + [7492, 1087, 165, 1086, 337, 131], + 1420, + [7332, 4933], + [7335, 4935], + [7338, 4938], + [7342, 4940], + [7343, 1932], + [7344, 4931, 4930, 1932], + function(e, t) { + "use strict" + ;(t["default"] = function(e, t) { + var r = t({}, e) + return delete r["default"], r + }), + (t.__esModule = !0) + }, + [7358, 4949], + [7361, 1090], + [7364, 518, 107], + [7369, 1942, 680, 1943, 1092, 1091, 682, 4950, 1095, 107, 423], + 1380, + [7373, 1092], + [7376, 681], + 805, + [7395, 91], + 1391, + [7407, 2, 58], + [7411, 91], + [7320, 4988], + 1370, + [7328, 5008], + [7429, 517, 2, 58], + 1370, + 810, + 1397, + 1398, + 812, + [7439, 5035, 425], + [7441, 5030, 1958, 1959, 1962, 5060, 5061, 5062, 154, 132], + [7443, 5051], + [7445, 1961, 425], + [7447, 5059], + [7448, 5038, 132, 237], + 1409, + 1410, + [7473, 132], + [7477, 1960, 519, 685], + [7486, 237], + [7492, 686, 154, 684, 236, 132], + 1420, + [7334, 5088], + [7335, 5089], + 581, + [7358, 5103], + [7361, 1111], + [7364, 520, 108], + [7369, 1979, 687, 1980, 1113, 1112, 689, 5104, 1116, 108, 426], + 1380, + [7373, 1113], + [7376, 688], + 805, + [7395, 339], + 1391, + [7407, 42, 59], + [7411, 339], + [7320, 5142], + 1370, + [7328, 5162], + [7429, 1972, 42, 59], + 1370, + 810, + 1397, + 1398, + 812, + [7439, 5189, 428], + [7441, 5184, 1995, 1996, 1999, 5214, 5215, 5216, 155, 133], + [7443, 5205], + [7445, 1998, 428], + [7447, 5213], + [7448, 5192, 133, 243], + 1409, + 1410, + [7473, 133], + [7477, 1997, 521, 692], + [7486, 243], + [7492, 693, 155, 691, 242, 133], + 1420, + [7395, 250], + 1391, + [7407, 34, 49], + [7411, 250], + [7320, 5254], + 1370, + 1398, + [7439, 5280, 698], + [7455, 5303], + [7466, 5284], + [7468, 5298], + [7479, 1130, 696], + [7488, 5278, 2016, 5287], + [7328, 5304], + [7429, 2038, 34, 49], + 1370, + 812, + [7443, 5347], + [7445, 2026, 700], + [7446, 247], + [7448, 5335, 134, 246], + 1409, + [7466, 2030], + [7471, 1135, 1136, 134], + [7472, 248, 247], + [7473, 134], + [7476, 5341, 248], + [7492, 1137, 248, 1136, 430, 134], + 1420, + [7334, 5381], + [7335, 5382], + 581, + [7358, 5396], + [7361, 1141], + [7364, 524, 109], + [7369, 2045, 702, 2046, 1143, 1142, 704, 5397, 1146, 109, 431], + 1380, + [7373, 1143], + [7376, 703], + 805, + [7334, 5429], + [7335, 5430], + 581, + [7358, 5444], + [7361, 1152], + [7364, 525, 110], + [7369, 2056, 706, 2057, 1154, 1153, 708, 5445, 1157, 110, 432], + 1380, + [7373, 1154], + [7376, 707], + 805, + [7393, 1149, 50, 24, 5486, 5489, 5490, 343, 5461, 28], + [7439, 5468, 1163], + [7455, 5492], + [7468, 5488], + [7395, 342], + 1391, + [7407, 24, 28], + [7411, 342], + [7320, 5514], + 1370, + 1398, + [7439, 5540, 712], + [7455, 5563], + [7466, 5544], + [7468, 5558], + [7479, 1167, 710], + [7488, 5538, 2071, 5547], + [7328, 5564], + [7429, 2049, 24, 28], + 1370, + 812, + [7443, 5607], + [7445, 2081, 714], + [7446, 256], + [7448, 5595, 135, 255], + 1409, + [7466, 2085], + [7471, 1172, 1173, 135], + [7472, 257, 256], + [7473, 135], + [7476, 5601, 257], + [7492, 1174, 257, 1173, 436, 135], + 1420, + [7334, 5641], + [7335, 5642], + [7341, 5648], + 581, + [7358, 5656], + [7361, 1178], + [7364, 528, 111], + [7369, 2101, 716, 2102, 1180, 1179, 718, 5657, 1183, 111, 437], + 1380, + [7373, 1180], + [7376, 717], + 805, + [7429, 2093, 43, 60], + [7395, 345], + 1391, + [7407, 43, 60], + [7411, 345], + [7320, 5705], + [7328, 5723], + 1370, + [7326, 5725, 2112, 5726], + 1398, + 812, + [7439, 5739, 438], + [7443, 5756], + [7445, 2117, 438], + [7446, 262], + [7447, 5764], + [7448, 5742, 136, 261], + 1409, + [7472, 166, 262], + [7473, 136], + [7476, 5748, 166], + [7477, 5738, 719, 721], + [7486, 261], + [7488, 5736, 2116, 5754], + [7492, 1192, 166, 1191, 347, 136], + 1420, + [7334, 5795], + [7335, 5796], + [7341, 5802], + 581, + [7358, 5810], + [7361, 1196], + [7364, 530, 112], + [7369, 2139, 724, 2140, 1198, 1197, 726, 5811, 1201, 112, 439], + 1380, + [7373, 1198], + [7376, 725], + 805, + [7429, 2131, 35, 51], + [7395, 348], + 1391, + [7407, 35, 51], + [7411, 348], + [7320, 5859], + [7328, 5877], + 1370, + [7326, 5879, 2150, 5880], + 1398, + 812, + [7439, 5893, 440], + [7443, 5910], + [7445, 2155, 440], + [7446, 267], + [7447, 5918], + [7448, 5896, 137, 266], + 1409, + [7472, 167, 267], + [7473, 137], + [7476, 5902, 167], + [7477, 5892, 727, 729], + [7486, 266], + [7488, 5890, 2154, 5908], + [7492, 1210, 167, 1209, 350, 137], + 1420, + 799, + 98, + [7361, 2172], + 465, + 558, + 803, + [7376, 732], + 805, + [7380, 2175, 2176, 732], + [7429, 2203, 36, 61], + [7395, 353], + 1391, + [7407, 36, 61], + [7411, 353], + [7320, 5987], + [7328, 6005], + 1370, + [7326, 6007, 2185, 6008], + 1398, + 812, + [7439, 6023, 442], + [7443, 6040], + [7445, 2190, 442], + [7446, 270], + [7448, 6026, 138, 269], + 1409, + [7472, 168, 270], + [7473, 138], + [7476, 6032, 168], + [7477, 6022, 734, 736], + [7486, 269], + [7488, 6020, 2189, 6038], + [7492, 1220, 168, 1219, 352, 138], + 1420, + [7334, 6074], + [7335, 6075], + [7341, 6081], + 581, + [7358, 6089], + [7361, 1224], + [7364, 533, 113], + [7369, 2211, 737, 2212, 1226, 1225, 739, 6090, 1229, 113, 443], + 1380, + [7373, 1226], + [7376, 738], + 805, + function(e, t, r) { + var n + ;(function(e, i) { + !(function(s) { + var a = "object" == typeof t && t, + o = ("object" == typeof e && e && e.exports == a && e, + "object" == typeof i && i) + ;(o.global !== o && o.window !== o) || (s = o) + var u = { + rangeOrder: + "A range’s `stop` value must be greater than or equal to the `start` value.", + codePointRange: + "Invalid code point value. Code points range from U+000000 to U+10FFFF." + }, + l = 55296, + c = 56319, + p = 56320, + f = 57343, + h = /\\x00([^0123456789]|$)/g, + d = {}, + m = d.hasOwnProperty, + y = function(e, t) { + var r + for (r in t) m.call(t, r) && (e[r] = t[r]) + return e + }, + v = function(e, t) { + for (var r = -1, n = e.length; ++r < n; ) t(e[r], r) + }, + g = d.toString, + E = function(e) { + return "[object Array]" == g.call(e) + }, + b = function(e) { + return "number" == typeof e || "[object Number]" == g.call(e) + }, + x = "0000", + A = function(e, t) { + var r = String(e) + return r.length < t ? (x + r).slice(-t) : r + }, + D = function(e) { + return Number(e) + .toString(16) + .toUpperCase() + }, + C = [].slice, + S = function(e) { + for ( + var t, r = -1, n = e.length, i = n - 1, s = [], a = !0, o = 0; + ++r < n; + + ) + if (((t = e[r]), a)) s.push(t), (o = t), (a = !1) + else if (t == o + 1) { + if (r != i) { + o = t + continue + } + ;(a = !0), s.push(t + 1) + } else s.push(o + 1, t), (o = t) + return a || s.push(t + 1), s + }, + F = function(e, t) { + for (var r, n, i = 0, s = e.length; s > i; ) { + if (((r = e[i]), (n = e[i + 1]), t >= r && n > t)) + return t == r + ? n == r + 1 + ? (e.splice(i, 2), e) + : ((e[i] = t + 1), e) + : t == n - 1 + ? ((e[i + 1] = t), e) + : (e.splice(i, 2, r, t, t + 1, n), e) + i += 2 + } + return e + }, + w = function(e, t, r) { + if (t > r) throw Error(u.rangeOrder) + for (var n, i, s = 0; s < e.length; ) { + if (((n = e[s]), (i = e[s + 1] - 1), n > r)) return e + if (n >= t && r >= i) e.splice(s, 2) + else { + if (t >= n && i > r) + return t == n + ? ((e[s] = r + 1), (e[s + 1] = i + 1), e) + : (e.splice(s, 2, n, t, r + 1, i + 1), e) + if (t >= n && i >= t) e[s + 1] = t + else if (r >= n && i >= r) return (e[s] = r + 1), e + s += 2 + } + } + return e + }, + _ = function(e, t) { + var r, + n, + i = 0, + s = null, + a = e.length + if (0 > t || t > 1114111) throw RangeError(u.codePointRange) + for (; a > i; ) { + if (((r = e[i]), (n = e[i + 1]), t >= r && n > t)) return e + if (t == r - 1) return (e[i] = t), e + if (r > t) + return e.splice(null != s ? s + 2 : 0, 0, t, t + 1), e + if (t == n) + return t + 1 == e[i + 2] + ? (e.splice(i, 4, r, e[i + 3]), e) + : ((e[i + 1] = t + 1), e) + ;(s = i), (i += 2) + } + return e.push(t, t + 1), e + }, + T = function(e, t) { + for (var r, n, i = 0, s = e.slice(), a = t.length; a > i; ) + (r = t[i]), + (n = t[i + 1] - 1), + (s = r == n ? _(s, r) : B(s, r, n)), + (i += 2) + return s + }, + P = function(e, t) { + for (var r, n, i = 0, s = e.slice(), a = t.length; a > i; ) + (r = t[i]), + (n = t[i + 1] - 1), + (s = r == n ? F(s, r) : w(s, r, n)), + (i += 2) + return s + }, + B = function(e, t, r) { + if (t > r) throw Error(u.rangeOrder) + if (0 > t || t > 1114111 || 0 > r || r > 1114111) + throw RangeError(u.codePointRange) + for (var n, i, s = 0, a = !1, o = e.length; o > s; ) { + if (((n = e[s]), (i = e[s + 1]), a)) { + if (n == r + 1) return e.splice(s - 1, 2), e + if (n > r) return e + n >= t && + r >= n && + (i > t && r >= i - 1 + ? (e.splice(s, 2), (s -= 2)) + : (e.splice(s - 1, 2), (s -= 2))) + } else { + if (n == r + 1) return (e[s] = t), e + if (n > r) return e.splice(s, 0, t, r + 1), e + if (t >= n && i > t && i >= r + 1) return e + ;(t >= n && i > t) || i == t + ? ((e[s + 1] = r + 1), (a = !0)) + : n >= t && + r + 1 >= i && + ((e[s] = t), (e[s + 1] = r + 1), (a = !0)) + } + s += 2 + } + return a || e.push(t, r + 1), e + }, + k = function(e, t) { + var r = 0, + n = e.length, + i = e[r], + s = e[n - 1] + if (n >= 2 && (i > t || t > s)) return !1 + for (; n > r; ) { + if (((i = e[r]), (s = e[r + 1]), t >= i && s > t)) return !0 + r += 2 + } + return !1 + }, + I = function(e, t) { + for (var r, n = 0, i = t.length, s = []; i > n; ) + (r = t[n]), k(e, r) && s.push(r), ++n + return S(s) + }, + O = function(e) { + return !e.length + }, + M = function(e) { + return 2 == e.length && e[0] + 1 == e[1] + }, + R = function(e) { + for (var t, r, n = 0, i = [], s = e.length; s > n; ) { + for (t = e[n], r = e[n + 1]; r > t; ) i.push(t), ++t + n += 2 + } + return i + }, + L = Math.floor, + N = function(e) { + return parseInt(L((e - 65536) / 1024) + l, 10) + }, + j = function(e) { + return parseInt(((e - 65536) % 1024) + p, 10) + }, + U = String.fromCharCode, + V = function(e) { + var t + return (t = + 9 == e + ? "\\t" + : 10 == e + ? "\\n" + : 12 == e + ? "\\f" + : 13 == e + ? "\\r" + : 92 == e + ? "\\\\" + : 36 == e || + (e >= 40 && 43 >= e) || + 45 == e || + 46 == e || + 63 == e || + (e >= 91 && 94 >= e) || + (e >= 123 && 125 >= e) + ? "\\" + U(e) + : e >= 32 && 126 >= e + ? U(e) + : 255 >= e + ? "\\x" + A(D(e), 2) + : "\\u" + A(D(e), 4)) + }, + G = function(e) { + var t, + r = e.length, + n = e.charCodeAt(0) + return n >= l && c >= n && r > 1 + ? ((t = e.charCodeAt(1)), 1024 * (n - l) + t - p + 65536) + : n + }, + W = function(e) { + var t, + r, + n = "", + i = 0, + s = e.length + if (M(e)) return V(e[0]) + for (; s > i; ) + (t = e[i]), + (r = e[i + 1] - 1), + (n += + t == r + ? V(t) + : t + 1 == r + ? V(t) + V(r) + : V(t) + "-" + V(r)), + (i += 2) + return "[" + n + "]" + }, + q = function(e) { + for ( + var t, r, n = [], i = [], s = [], a = [], o = 0, u = e.length; + u > o; + + ) + (t = e[o]), + (r = e[o + 1] - 1), + l > t + ? (l > r && s.push(t, r + 1), + r >= l && c >= r && (s.push(t, l), n.push(l, r + 1)), + r >= p && + f >= r && + (s.push(t, l), + n.push(l, c + 1), + i.push(p, r + 1)), + r > f && + (s.push(t, l), + n.push(l, c + 1), + i.push(p, f + 1), + 65535 >= r + ? s.push(f + 1, r + 1) + : (s.push(f + 1, 65536), + a.push(65536, r + 1)))) + : t >= l && c >= t + ? (r >= l && c >= r && n.push(t, r + 1), + r >= p && + f >= r && + (n.push(t, c + 1), i.push(p, r + 1)), + r > f && + (n.push(t, c + 1), + i.push(p, f + 1), + 65535 >= r + ? s.push(f + 1, r + 1) + : (s.push(f + 1, 65536), + a.push(65536, r + 1)))) + : t >= p && f >= t + ? (r >= p && f >= r && i.push(t, r + 1), + r > f && + (i.push(t, f + 1), + 65535 >= r + ? s.push(f + 1, r + 1) + : (s.push(f + 1, 65536), + a.push(65536, r + 1)))) + : t > f && 65535 >= t + ? 65535 >= r + ? s.push(t, r + 1) + : (s.push(t, 65536), a.push(65536, r + 1)) + : a.push(t, r + 1), + (o += 2) + return { + loneHighSurrogates: n, + loneLowSurrogates: i, + bmp: s, + astral: a + } + }, + H = function(e) { + for ( + var t, + r, + n, + i, + s, + a, + o = [], + u = [], + l = !1, + c = -1, + p = e.length; + ++c < p; + + ) + if (((t = e[c]), (r = e[c + 1]))) { + for ( + n = t[0], i = t[1], s = r[0], a = r[1], u = i; + s && n[0] == s[0] && n[1] == s[1]; + + ) + (u = M(a) ? _(u, a[0]) : B(u, a[0], a[1] - 1)), + ++c, + (t = e[c]), + (n = t[0]), + (i = t[1]), + (r = e[c + 1]), + (s = r && r[0]), + (a = r && r[1]), + (l = !0) + o.push([n, l ? u : i]), (l = !1) + } else o.push(t) + return Y(o) + }, + Y = function(e) { + if (1 == e.length) return e + for (var t = -1, r = -1; ++t < e.length; ) { + var n = e[t], + i = n[1], + s = i[0], + a = i[1] + for (r = t; ++r < e.length; ) { + var o = e[r], + u = o[1], + l = u[0], + c = u[1] + s == l && + a == c && + (M(o[0]) + ? (n[0] = _(n[0], o[0][0])) + : (n[0] = B(n[0], o[0][0], o[0][1] - 1)), + e.splice(r, 1), + --r) + } + } + return e + }, + J = function(e) { + if (!e.length) return [] + for ( + var t, r, n, i, s, a, o = 0, u = 0, l = 0, c = [], h = e.length; + h > o; + + ) { + ;(t = e[o]), + (r = e[o + 1] - 1), + (n = N(t)), + (i = j(t)), + (s = N(r)), + (a = j(r)) + var d = i == p, + m = a == f, + y = !1 + n == s || (d && m) + ? (c.push([[n, s + 1], [i, a + 1]]), (y = !0)) + : c.push([[n, n + 1], [i, f + 1]]), + !y && + s > n + 1 && + (m + ? (c.push([[n + 1, s + 1], [p, a + 1]]), (y = !0)) + : c.push([[n + 1, s], [p, f + 1]])), + y || c.push([[s, s + 1], [p, a + 1]]), + (u = n), + (l = s), + (o += 2) + } + return H(c) + }, + K = function(e) { + var t = [] + return ( + v(e, function(e) { + var r = e[0], + n = e[1] + t.push(W(r) + W(n)) + }), + t.join("|") + ) + }, + X = function(e, t) { + var r = [], + n = q(e), + i = n.loneHighSurrogates, + s = n.loneLowSurrogates, + a = n.bmp, + o = n.astral, + u = (!O(n.astral), !O(i)), + l = !O(s), + c = J(o) + return ( + t && ((a = T(a, i)), (u = !1), (a = T(a, s)), (l = !1)), + O(a) || r.push(W(a)), + c.length && r.push(K(c)), + u && r.push(W(i) + "(?![\\uDC00-\\uDFFF])"), + l && r.push("(?:[^\\uD800-\\uDBFF]|^)" + W(s)), + r.join("|") + ) + }, + z = function(e) { + return ( + arguments.length > 1 && (e = C.call(arguments)), + this instanceof z + ? ((this.data = []), e ? this.add(e) : this) + : new z().add(e) + ) + } + z.version = "1.2.0" + var $ = z.prototype + y($, { + add: function(e) { + var t = this + return null == e + ? t + : e instanceof z + ? ((t.data = T(t.data, e.data)), t) + : (arguments.length > 1 && (e = C.call(arguments)), + E(e) + ? (v(e, function(e) { + t.add(e) + }), + t) + : ((t.data = _(t.data, b(e) ? e : G(e))), t)) + }, + remove: function(e) { + var t = this + return null == e + ? t + : e instanceof z + ? ((t.data = P(t.data, e.data)), t) + : (arguments.length > 1 && (e = C.call(arguments)), + E(e) + ? (v(e, function(e) { + t.remove(e) + }), + t) + : ((t.data = F(t.data, b(e) ? e : G(e))), t)) + }, + addRange: function(e, t) { + var r = this + return (r.data = B(r.data, b(e) ? e : G(e), b(t) ? t : G(t))), r + }, + removeRange: function(e, t) { + var r = this, + n = b(e) ? e : G(e), + i = b(t) ? t : G(t) + return (r.data = w(r.data, n, i)), r + }, + intersection: function(e) { + var t = this, + r = e instanceof z ? R(e.data) : e + return (t.data = I(t.data, r)), t + }, + contains: function(e) { + return k(this.data, b(e) ? e : G(e)) + }, + clone: function() { + var e = new z() + return (e.data = this.data.slice(0)), e + }, + toString: function(e) { + var t = X(this.data, e ? e.bmpOnly : !1) + return t.replace(h, "\\0$1") + }, + toRegExp: function(e) { + return RegExp(this.toString(), e || "") + }, + valueOf: function() { + return R(this.data) + } + }), + ($.toArray = $.valueOf), + (n = function() { + return z + }.call(t, r, t, e)), + !(void 0 !== n && (e.exports = n)) + })(this) + }.call( + t, + r(25)(e), + (function() { + return this + })() + )) + }, + [7395, 93], + 1391, + [7407, 4, 12], + [7411, 93], + [7320, 6139], + 1370, + [7328, 6160], + [7429, 1242, 4, 12], + [7395, 93], + 1391, + [7407, 4, 12], + [7411, 93], + [7320, 6194], + [7328, 6212], + 1370, + [7326, 6214, 2230, 6215], + 1397, + [7434, 6219], + 1398, + 812, + [7439, 6226, 445], + [7441, 6221, 2235, 2236, 2239, 6251, 6252, 6253, 156, 139], + [7443, 6242], + [7445, 2238, 445], + [7447, 6250], + [7448, 6229, 139, 275], + 1409, + 1410, + [7473, 139], + [7486, 275], + [7489, 744, 6223, 6244], + [7490, 1236, 2243, 743, 156, 741, 1239, 274, 2232, 1240], + [7492, 743, 156, 741, 274, 139], + 1420, + [7335, 6275], + [7338, 6278], + [7343, 2250], + [7358, 6289], + [7361, 1245], + [7364, 539, 114], + [7369, 2257, 746, 2258, 1247, 1246, 748, 6290, 1250, 114, 446], + 1380, + [7373, 1247], + [7376, 747], + 805, + function(e, t, r) { + "use strict" + var n = r(72)["default"] + t.__esModule = !0 + var i = r(6307), + s = n(i) + ;(t["default"] = function(e) { + var t = e.types + return { + inherits: r(1430), + visitor: s["default"]({ + operator: "**", + build: function(e, r) { + return t.callExpression( + t.memberExpression(t.identifier("Math"), t.identifier("pow")), + [e, r] + ) + } + }) + } + }), + (e.exports = t["default"]) + }, + [7429, 2288, 37, 52], + [7395, 358], + 1391, + [7407, 37, 52], + [7411, 358], + [7320, 6341], + [7328, 6359], + 1370, + [7326, 6361, 2269, 6362], + 1398, + 812, + [7439, 6375, 447], + [7443, 6392], + [7445, 2274, 447], + [7446, 280], + [7447, 6400], + [7448, 6378, 140, 279], + 1409, + [7472, 169, 280], + [7473, 140], + [7476, 6384, 169], + [7477, 6374, 749, 751], + [7486, 279], + [7488, 6372, 2273, 6390], + [7492, 1259, 169, 1258, 357, 140], + 1420, + [7334, 6427], + [7335, 6428], + [7341, 6434], + 581, + [7358, 6442], + [7361, 1263], + [7364, 541, 115], + [7369, 2296, 752, 2297, 1265, 1264, 754, 6443, 1268, 115, 448], + 1380, + [7373, 1265], + [7376, 753], + 805, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e, r, i) { + var s = e.specifiers[0] + if (n.isExportNamespaceSpecifier(s) || n.isExportDefaultSpecifier(s)) { + var a = e.specifiers.shift(), + o = i.generateUidIdentifier(a.exported.name), + u = void 0 + ;(u = n.isExportNamespaceSpecifier(a) + ? n.importNamespaceSpecifier(o) + : n.importDefaultSpecifier(o)), + r.push(n.importDeclaration([u], e.source)), + r.push( + n.exportNamedDeclaration(null, [ + n.exportSpecifier(o, a.exported) + ]) + ), + t(e, r, i) + } + } + var n = e.types + return { + inherits: r(1431), + visitor: { + ExportNamedDeclaration: function(e) { + var r = e.node, + n = e.scope, + i = [] + t(r, i, n), + i.length && + (r.specifiers.length >= 1 && i.push(r), + e.replaceWithMultiple(i)) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types, + n = "@flow" + return { + inherits: r(822), + visitor: { + Program: function(e, t) { + for ( + var r = t.file.ast.comments, i = r, s = 0; + s < i.length; + s++ + ) { + var a = i[s] + a.value.indexOf(n) >= 0 && + ((a.value = a.value.replace(n, "")), + a.value.replace(/\*/g, "").trim() || (a.ignore = !0)) + } + }, + Flow: function(e) { + e.remove() + }, + ClassProperty: function(e) { + ;(e.node.typeAnnotation = null), e.node.value || e.remove() + }, + Class: function(e) { + var t = e.node + t["implements"] = null + }, + Function: function(e) { + for (var t = e.node, r = 0; r < t.params.length; r++) { + var n = t.params[r] + n.optional = !1 + } + }, + TypeCastExpression: function(e) { + var r = e.node + do r = r.expression + while (t.isTypeCastExpression(r)) + e.replaceWith(r) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e) { + var t = e.path.getData("functionBind") + return t + ? t + : ((t = e.generateDeclaredUidIdentifier("context")), + e.path.setData("functionBind", t)) + } + function n(e, t) { + var r = e.object || e.callee.object + return t.isStatic(r) && r + } + function i(e, r) { + var i = n(e, r) + if (i) return i + var a = t(r) + return ( + e.object + ? (e.callee = s.sequenceExpression([ + s.assignmentExpression("=", a, e.object), + e.callee + ])) + : (e.callee.object = s.assignmentExpression( + "=", + a, + e.callee.object + )), + a + ) + } + var s = e.types + return { + inherits: r(1432), + visitor: { + CallExpression: function(e) { + var t = e.node, + r = e.scope, + n = t.callee + if (s.isBindExpression(n)) { + var a = i(n, r) + ;(t.callee = s.memberExpression( + n.callee, + s.identifier("call") + )), + t.arguments.unshift(a) + } + }, + BindExpression: function(e) { + var t = e.node, + r = e.scope, + n = i(t, r) + e.replaceWith( + s.callExpression( + s.memberExpression(t.callee, s.identifier("bind")), + [n] + ) + ) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e) { + for (var t = e.properties, r = 0; r < t.length; r++) { + var i = t[r] + if (n.isSpreadProperty(i)) return !0 + } + return !1 + } + var n = e.types + return { + inherits: r(1433), + visitor: { + ObjectExpression: function(e, r) { + function i() { + a.length && (s.push(n.objectExpression(a)), (a = [])) + } + if (t(e.node)) { + for ( + var s = [], a = [], o = e.node.properties, u = 0; + u < o.length; + u++ + ) { + var l = o[u] + n.isSpreadProperty(l) + ? (i(), s.push(l.argument)) + : a.push(l) + } + i(), + n.isObjectExpression(s[0]) || + s.unshift(n.objectExpression([])), + e.replaceWith( + n.callExpression(r.addHelper("extends"), s) + ) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(6474)["default"] + t.__esModule = !0 + var i = r(175), + s = n(i) + ;(t["default"] = function(e) { + function t(e, t) { + for (var r = t.arguments[0].properties, i = !0, s = 0; s < r.length; s++) { + var a = r[s], + o = n.toComputedKey(a) + if (n.isLiteral(o, { value: "displayName" })) { + i = !1 + break + } + } + i && + r.unshift( + n.objectProperty(n.identifier("displayName"), n.stringLiteral(e)) + ) + } + function r(e) { + if (!e || !n.isCallExpression(e)) return !1 + if (!i(e.callee)) return !1 + var t = e.arguments + if (1 !== t.length) return !1 + var r = t[0] + return !!n.isObjectExpression(r) + } + var n = e.types, + i = n.buildMatchMemberExpression("React.createClass") + return { + visitor: { + ExportDefaultDeclaration: function(e, n) { + var i = e.node + if (r(i.declaration)) { + var a = n.file.opts.basename + "index" === a && + (a = s["default"].basename( + s["default"].dirname(n.file.opts.filename) + )), + t(a, i.declaration) + } + }, + CallExpression: function(e) { + var i = e.node + if (r(i)) { + var s = void 0 + e.find(function(e) { + if (e.isAssignmentExpression()) s = e.node.left + else if (e.isObjectProperty()) s = e.node.key + else if (e.isVariableDeclarator()) s = e.node.id + else if (e.isStatement()) return !0 + return s ? !0 : void 0 + }), + s && + (n.isMemberExpression(s) && (s = s.property), + n.isIdentifier(s) && t(s.name, i)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7429, 2330, 44, 62], + [7395, 361], + 1391, + [7407, 44, 62], + [7411, 361], + [7320, 6510], + [7328, 6528], + 1370, + 1398, + 812, + [7439, 6545, 449], + [7443, 6562], + [7445, 2316, 449], + [7446, 285], + [7447, 6570], + [7448, 6548, 141, 284], + 1409, + [7472, 170, 285], + [7473, 141], + [7476, 6554, 170], + [7477, 6544, 755, 757], + [7486, 284], + [7488, 6542, 2315, 6560], + [7492, 1278, 170, 1277, 360, 141], + 1420, + [7334, 6596], + [7335, 6597], + [7341, 6603], + 581, + [7358, 6611], + [7361, 1282], + [7364, 543, 116], + [7369, 2338, 758, 2339, 1284, 1283, 760, 6612, 1287, 116, 450], + 1380, + [7373, 1284], + [7376, 759], + 805, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types, + n = /\*?\s*@jsx\s+([^\s]+)/, + i = r(6629)({ + pre: function(e) { + var r = e.tagName, + n = e.args + t.react.isCompatTag(r) + ? n.push(t.stringLiteral(r)) + : n.push(e.tagExpr) + }, + post: function(e, t) { + e.callee = t.get("jsxIdentifier") + } + }) + return ( + (i.Program = function(e, r) { + for ( + var i = r.file, + s = r.opts.pragma || "React.createElement", + a = i.ast.comments, + o = 0; + o < a.length; + o++ + ) { + var u = a[o], + l = n.exec(u.value) + if (l) { + if (((s = l[1]), "React.DOM" === s)) + throw i.buildCodeFrameError( + u, + "The @jsx React.DOM pragma has been deprecated as of React 0.12" + ) + break + } + } + r.set( + "jsxIdentifier", + s + .split(".") + .map(function(e) { + return t.identifier(e) + }) + .reduce(function(e, r) { + return t.memberExpression(e, r) + }) + ) + }), + { inherits: r(823), visitor: i } + ) + }), + (e.exports = t["default"]) + }, + [7429, 2368, 45, 63], + [7395, 364], + 1391, + [7407, 45, 63], + [7411, 364], + [7320, 6662], + [7328, 6680], + 1370, + 1398, + 812, + [7439, 6697, 451], + [7443, 6714], + [7445, 2354, 451], + [7446, 290], + [7447, 6722], + [7448, 6700, 142, 289], + 1409, + [7472, 171, 290], + [7473, 142], + [7476, 6706, 171], + [7477, 6696, 761, 763], + [7486, 289], + [7488, 6694, 2353, 6712], + [7492, 1297, 171, 1296, 363, 142], + 1420, + [7334, 6748], + [7335, 6749], + [7341, 6755], + 581, + [7358, 6763], + [7361, 1301], + [7364, 545, 117], + [7369, 2376, 764, 2377, 1303, 1302, 766, 6764, 1306, 117, 452], + 1380, + [7373, 1303], + [7376, 765], + 805, + function(e, t, r) { + "use strict" + function n(e) { + c["default"].ok(this instanceof n), + f.assertIdentifier(e), + (this.nextTempId = 0), + (this.contextId = e), + (this.listing = []), + (this.marked = [!0]), + (this.finalLoc = i()), + (this.tryEntries = []), + (this.leapManager = new d.LeapManager(this)) + } + function i() { + return f.numericLiteral(-1) + } + function s(e) { + return new Error( + "all declarations should have been transformed into assignments before the Exploder began its work: " + + JSON.stringify(e) + ) + } + function a(e) { + var t = e.type + return "normal" === t + ? !E.call(e, "target") + : "break" === t || "continue" === t + ? !E.call(e, "value") && f.isLiteral(e.target) + : "return" === t || "throw" === t + ? E.call(e, "value") && !E.call(e, "target") + : !1 + } + var o = r(53)["default"], + u = r(27)["default"], + l = r(789), + c = o(l), + p = r(30), + f = u(p), + h = r(6781), + d = u(h), + m = r(6782), + y = u(m), + v = r(2381), + g = u(v), + E = Object.prototype.hasOwnProperty, + b = n.prototype + ;(t.Emitter = n), + (b.mark = function(e) { + f.assertLiteral(e) + var t = this.listing.length + return ( + -1 === e.value ? (e.value = t) : c["default"].strictEqual(e.value, t), + (this.marked[t] = !0), + e + ) + }), + (b.emit = function(e) { + f.isExpression(e) && (e = f.expressionStatement(e)), + f.assertStatement(e), + this.listing.push(e) + }), + (b.emitAssign = function(e, t) { + return this.emit(this.assign(e, t)), e + }), + (b.assign = function(e, t) { + return f.expressionStatement(f.assignmentExpression("=", e, t)) + }), + (b.contextProperty = function(e, t) { + return f.memberExpression( + this.contextId, + t ? f.stringLiteral(e) : f.identifier(e), + !!t + ) + }), + (b.stop = function(e) { + e && this.setReturnValue(e), this.jump(this.finalLoc) + }), + (b.setReturnValue = function(e) { + f.assertExpression(e.value), + this.emitAssign(this.contextProperty("rval"), this.explodeExpression(e)) + }), + (b.clearPendingException = function(e, t) { + f.assertLiteral(e) + var r = f.callExpression(this.contextProperty("catch", !0), [e]) + t ? this.emitAssign(t, r) : this.emit(r) + }), + (b.jump = function(e) { + this.emitAssign(this.contextProperty("next"), e), + this.emit(f.breakStatement()) + }), + (b.jumpIf = function(e, t) { + f.assertExpression(e), + f.assertLiteral(t), + this.emit( + f.ifStatement( + e, + f.blockStatement([ + this.assign(this.contextProperty("next"), t), + f.breakStatement() + ]) + ) + ) + }), + (b.jumpIfNot = function(e, t) { + f.assertExpression(e), f.assertLiteral(t) + var r = void 0 + ;(r = + f.isUnaryExpression(e) && "!" === e.operator + ? e.argument + : f.unaryExpression("!", e)), + this.emit( + f.ifStatement( + r, + f.blockStatement([ + this.assign(this.contextProperty("next"), t), + f.breakStatement() + ]) + ) + ) + }), + (b.makeTempVar = function() { + return this.contextProperty("t" + this.nextTempId++) + }), + (b.getContextFunction = function(e) { + return f.functionExpression( + e || null, + [this.contextId], + f.blockStatement([this.getDispatchLoop()]), + !1, + !1 + ) + }), + (b.getDispatchLoop = function() { + var e = this, + t = [], + r = void 0, + n = !1 + return ( + e.listing.forEach(function(i, s) { + e.marked.hasOwnProperty(s) && + (t.push(f.switchCase(f.numericLiteral(s), (r = []))), (n = !1)), + n || (r.push(i), f.isCompletionStatement(i) && (n = !0)) + }), + (this.finalLoc.value = this.listing.length), + t.push( + f.switchCase(this.finalLoc, []), + f.switchCase(f.stringLiteral("end"), [ + f.returnStatement( + f.callExpression(this.contextProperty("stop"), []) + ) + ]) + ), + f.whileStatement( + f.numericLiteral(1), + f.switchStatement( + f.assignmentExpression( + "=", + this.contextProperty("prev"), + this.contextProperty("next") + ), + t + ) + ) + ) + }), + (b.getTryLocsList = function() { + if (0 === this.tryEntries.length) return null + var e = 0 + return f.arrayExpression( + this.tryEntries.map(function(t) { + var r = t.firstLoc.value + c["default"].ok(r >= e, "try entries out of order"), (e = r) + var n = t.catchEntry, + i = t.finallyEntry, + s = [t.firstLoc, n ? n.firstLoc : null] + return ( + i && ((s[2] = i.firstLoc), (s[3] = i.afterLoc)), + f.arrayExpression(s) + ) + }) + ) + }), + (b.explode = function(e, t) { + var r = e.node, + n = this + if ((f.assertNode(r), f.isDeclaration(r))) throw s(r) + if (f.isStatement(r)) return n.explodeStatement(e) + if (f.isExpression(r)) return n.explodeExpression(e, t) + switch (r.type) { + case "Program": + return e.get("body").map(n.explodeStatement, n) + case "VariableDeclarator": + throw s(r) + case "Property": + case "SwitchCase": + case "CatchClause": + throw new Error( + r.type + " nodes should be handled by their parents" + ) + default: + throw new Error("unknown Node of type " + JSON.stringify(r.type)) + } + }), + (b.explodeStatement = function(e, t) { + var r = e.node, + n = this, + s = void 0, + a = void 0, + o = void 0 + if ( + (f.assertStatement(r), + t ? f.assertIdentifier(t) : (t = null), + f.isBlockStatement(r)) + ) + return void e.get("body").forEach(function(e) { + n.explodeStatement(e) + }) + if (!y.containsLeap(r)) return void n.emit(r) + switch (r.type) { + case "ExpressionStatement": + n.explodeExpression(e.get("expression"), !0) + break + case "LabeledStatement": + ;(a = i()), + n.leapManager.withEntry( + new d.LabeledEntry(a, r.label), + function() { + n.explodeStatement(e.get("body"), r.label) + } + ), + n.mark(a) + break + case "WhileStatement": + ;(s = i()), + (a = i()), + n.mark(s), + n.jumpIfNot(n.explodeExpression(e.get("test")), a), + n.leapManager.withEntry(new d.LoopEntry(a, s, t), function() { + n.explodeStatement(e.get("body")) + }), + n.jump(s), + n.mark(a) + break + case "DoWhileStatement": + var u = i(), + l = i() + ;(a = i()), + n.mark(u), + n.leapManager.withEntry(new d.LoopEntry(a, l, t), function() { + n.explode(e.get("body")) + }), + n.mark(l), + n.jumpIf(n.explodeExpression(e.get("test")), u), + n.mark(a) + break + case "ForStatement": + o = i() + var p = i() + ;(a = i()), + r.init && n.explode(e.get("init"), !0), + n.mark(o), + r.test && n.jumpIfNot(n.explodeExpression(e.get("test")), a), + n.leapManager.withEntry(new d.LoopEntry(a, p, t), function() { + n.explodeStatement(e.get("body")) + }), + n.mark(p), + r.update && n.explode(e.get("update"), !0), + n.jump(o), + n.mark(a) + break + case "TypeCastExpression": + return n.explodeExpression(e.get("expression")) + case "ForInStatement": + ;(o = i()), (a = i()) + var h = n.makeTempVar() + n.emitAssign( + h, + f.callExpression(g.runtimeProperty("keys"), [ + n.explodeExpression(e.get("right")) + ]) + ), + n.mark(o) + var m = n.makeTempVar() + n.jumpIf( + f.memberExpression( + f.assignmentExpression("=", m, f.callExpression(h, [])), + f.identifier("done"), + !1 + ), + a + ), + n.emitAssign( + r.left, + f.memberExpression(m, f.identifier("value"), !1) + ), + n.leapManager.withEntry(new d.LoopEntry(a, o, t), function() { + n.explodeStatement(e.get("body")) + }), + n.jump(o), + n.mark(a) + break + case "BreakStatement": + n.emitAbruptCompletion({ + type: "break", + target: n.leapManager.getBreakLoc(r.label) + }) + break + case "ContinueStatement": + n.emitAbruptCompletion({ + type: "continue", + target: n.leapManager.getContinueLoc(r.label) + }) + break + case "SwitchStatement": + var v = n.emitAssign( + n.makeTempVar(), + n.explodeExpression(e.get("discriminant")) + ) + a = i() + for ( + var E = i(), b = E, A = [], D = r.cases || [], C = D.length - 1; + C >= 0; + --C + ) { + var S = D[C] + f.assertSwitchCase(S), + S.test + ? (b = f.conditionalExpression( + f.binaryExpression("===", v, S.test), + (A[C] = i()), + b + )) + : (A[C] = E) + } + var F = e.get("discriminant") + F.replaceWith(b), + n.jump(n.explodeExpression(F)), + n.leapManager.withEntry(new d.SwitchEntry(a), function() { + e.get("cases").forEach(function(e) { + var t = e.key + n.mark(A[t]), + e.get("consequent").forEach(function(e) { + n.explodeStatement(e) + }) + }) + }), + n.mark(a), + -1 === E.value && + (n.mark(E), c["default"].strictEqual(a.value, E.value)) + break + case "IfStatement": + var w = r.alternate && i() + ;(a = i()), + n.jumpIfNot(n.explodeExpression(e.get("test")), w || a), + n.explodeStatement(e.get("consequent")), + w && + (n.jump(a), + n.mark(w), + n.explodeStatement(e.get("alternate"))), + n.mark(a) + break + case "ReturnStatement": + n.emitAbruptCompletion({ + type: "return", + value: n.explodeExpression(e.get("argument")) + }) + break + case "WithStatement": + throw new Error( + "WithStatement not supported in generator functions." + ) + case "TryStatement": + a = i() + var _ = r.handler, + T = _ && i(), + P = T && new d.CatchEntry(T, _.param), + B = r.finalizer && i(), + k = B && new d.FinallyEntry(B, a), + I = new d.TryEntry(n.getUnmarkedCurrentLoc(), P, k) + n.tryEntries.push(I), + n.updateContextPrevLoc(I.firstLoc), + n.leapManager.withEntry(I, function() { + n.explodeStatement(e.get("block")), + T && + !(function() { + B ? n.jump(B) : n.jump(a), + n.updateContextPrevLoc(n.mark(T)) + var t = e.get("handler.body"), + r = n.makeTempVar() + n.clearPendingException(I.firstLoc, r), + t.traverse(x, { + safeParam: r, + catchParamName: _.param.name + }), + n.leapManager.withEntry(P, function() { + n.explodeStatement(t) + }) + })(), + B && + (n.updateContextPrevLoc(n.mark(B)), + n.leapManager.withEntry(k, function() { + n.explodeStatement(e.get("finalizer")) + }), + n.emit( + f.returnStatement( + f.callExpression( + n.contextProperty("finish"), + [k.firstLoc] + ) + ) + )) + }), + n.mark(a) + break + case "ThrowStatement": + n.emit(f.throwStatement(n.explodeExpression(e.get("argument")))) + break + default: + throw new Error( + "unknown Statement of type " + JSON.stringify(r.type) + ) + } + }) + var x = { + Identifier: function(e, t) { + e.node.name === t.catchParamName && + g.isReference(e) && + e.replaceWith(t.safeParam) + }, + Scope: function(e, t) { + e.scope.hasOwnBinding(t.catchParamName) && e.skip() + } + } + ;(b.emitAbruptCompletion = function(e) { + a(e) || c["default"].ok(!1, "invalid completion record: " + JSON.stringify(e)), + c["default"].notStrictEqual( + e.type, + "normal", + "normal completions are not abrupt" + ) + var t = [f.stringLiteral(e.type)] + "break" === e.type || "continue" === e.type + ? (f.assertLiteral(e.target), (t[1] = e.target)) + : ("return" !== e.type && "throw" !== e.type) || + (e.value && (f.assertExpression(e.value), (t[1] = e.value))), + this.emit( + f.returnStatement(f.callExpression(this.contextProperty("abrupt"), t)) + ) + }), + (b.getUnmarkedCurrentLoc = function() { + return f.numericLiteral(this.listing.length) + }), + (b.updateContextPrevLoc = function(e) { + e + ? (f.assertLiteral(e), + -1 === e.value + ? (e.value = this.listing.length) + : c["default"].strictEqual(e.value, this.listing.length)) + : (e = this.getUnmarkedCurrentLoc()), + this.emitAssign(this.contextProperty("prev"), e) + }), + (b.explodeExpression = function(e, t) { + function r(e) { + return f.assertExpression(e), t ? void a.emit(e) : e + } + function n(e, t, r) { + c["default"].ok( + !r || !e, + "Ignoring the result of a child expression but forcing it to be assigned to a temporary variable?" + ) + var n = a.explodeExpression(t, r) + return ( + r || + ((e || (l && !f.isLiteral(n))) && + (n = a.emitAssign(e || a.makeTempVar(), n))), + n + ) + } + var s = e.node + if (!s) return s + f.assertExpression(s) + var a = this, + o = void 0, + u = void 0 + if (!y.containsLeap(s)) return r(s) + var l = y.containsLeap.onlyChildren(s) + switch (s.type) { + case "MemberExpression": + return r( + f.memberExpression( + a.explodeExpression(e.get("object")), + s.computed ? n(null, e.get("property")) : s.property, + s.computed + ) + ) + case "CallExpression": + var p = e.get("callee"), + h = e.get("arguments"), + d = void 0, + m = [], + v = !1 + if ( + (h.forEach(function(e) { + v = v || y.containsLeap(e.node) + }), + f.isMemberExpression(p.node)) + ) + if (v) { + var g = n(a.makeTempVar(), p.get("object")), + E = p.node.computed + ? n(null, p.get("property")) + : p.node.property + m.unshift(g), + (d = f.memberExpression( + f.memberExpression(g, E, p.node.computed), + f.identifier("call"), + !1 + )) + } else d = a.explodeExpression(p) + else + (d = a.explodeExpression(p)), + f.isMemberExpression(d) && + (d = f.sequenceExpression([f.numericLiteral(0), d])) + return ( + h.forEach(function(e) { + m.push(n(null, e)) + }), + r(f.callExpression(d, m)) + ) + case "NewExpression": + return r( + f.newExpression( + n(null, e.get("callee")), + e.get("arguments").map(function(e) { + return n(null, e) + }) + ) + ) + case "ObjectExpression": + return r( + f.objectExpression( + e.get("properties").map(function(e) { + return e.isObjectProperty() + ? f.objectProperty( + e.node.key, + n(null, e.get("value")), + e.node.computed + ) + : e.node + }) + ) + ) + case "ArrayExpression": + return r( + f.arrayExpression( + e.get("elements").map(function(e) { + return n(null, e) + }) + ) + ) + case "SequenceExpression": + var b = s.expressions.length - 1 + return ( + e.get("expressions").forEach(function(e) { + e.key === b + ? (o = a.explodeExpression(e, t)) + : a.explodeExpression(e, !0) + }), + o + ) + case "LogicalExpression": + ;(u = i()), t || (o = a.makeTempVar()) + var x = n(o, e.get("left")) + return ( + "&&" === s.operator + ? a.jumpIfNot(x, u) + : (c["default"].strictEqual(s.operator, "||"), + a.jumpIf(x, u)), + n(o, e.get("right"), t), + a.mark(u), + o + ) + case "ConditionalExpression": + var A = i() + u = i() + var D = a.explodeExpression(e.get("test")) + return ( + a.jumpIfNot(D, A), + t || (o = a.makeTempVar()), + n(o, e.get("consequent"), t), + a.jump(u), + a.mark(A), + n(o, e.get("alternate"), t), + a.mark(u), + o + ) + case "UnaryExpression": + return r( + f.unaryExpression( + s.operator, + a.explodeExpression(e.get("argument")), + !!s.prefix + ) + ) + case "BinaryExpression": + return r( + f.binaryExpression( + s.operator, + n(null, e.get("left")), + n(null, e.get("right")) + ) + ) + case "AssignmentExpression": + return r( + f.assignmentExpression( + s.operator, + a.explodeExpression(e.get("left")), + a.explodeExpression(e.get("right")) + ) + ) + case "UpdateExpression": + return r( + f.updateExpression( + s.operator, + a.explodeExpression(e.get("argument")), + s.prefix + ) + ) + case "YieldExpression": + u = i() + var C = s.argument && a.explodeExpression(e.get("argument")) + if (C && s.delegate) { + var S = a.makeTempVar() + return ( + a.emit( + f.returnStatement( + f.callExpression( + a.contextProperty("delegateYield"), + [C, f.stringLiteral(S.property.name), u] + ) + ) + ), + a.mark(u), + S + ) + } + return ( + a.emitAssign(a.contextProperty("next"), u), + a.emit(f.returnStatement(C || null)), + a.mark(u), + a.contextProperty("sent") + ) + default: + throw new Error( + "unknown Expression of type " + JSON.stringify(s.type) + ) + } + }) + }, + function(e, t, r) { + "use strict" + function n(e) { + return o.memberExpression( + o.identifier("regeneratorRuntime"), + o.identifier(e), + !1 + ) + } + function i(e) { + return e.isReferenced() || e.parentPath.isAssignmentExpression({ left: e.node }) + } + var s = r(27)["default"] + ;(t.__esModule = !0), (t.runtimeProperty = n), (t.isReference = i) + var a = r(30), + o = s(a) + }, + [7334, 6794], + [7335, 6795], + [7341, 6801], + 581, + [7358, 6809], + [7361, 1310], + [7364, 546, 118], + [7369, 2390, 769, 2391, 1312, 1311, 771, 6810, 1315, 118, 453], + 1380, + [7373, 1312], + [7376, 770], + 805, + [7395, 365], + 1391, + [7407, 27, 30], + [7411, 365], + [7320, 6847], + 1370, + 1398, + [7439, 6872, 774], + [7455, 6895], + [7466, 6876], + [7468, 6890], + [7479, 1320, 772], + [7488, 6870, 2401, 6879], + [7328, 6896], + [7429, 2382, 27, 30], + 1370, + 812, + [7443, 6939], + [7445, 2411, 776], + [7446, 297], + [7448, 6927, 143, 296], + 1409, + [7466, 2415], + [7471, 1325, 1326, 143], + [7472, 298, 297], + [7473, 143], + [7476, 6933, 298], + [7492, 1327, 298, 1326, 455, 143], + 1420, + function(e, t) { + "use strict" + function r(e, t, r) { + if (c) + try { + c.call(l, e, t, { value: r }) + } catch (n) { + e[t] = r + } + else e[t] = r + } + function n(e) { + return e && (r(e, "call", e.call), r(e, "apply", e.apply)), e + } + function i(e) { + return p ? p.call(l, e) : ((m.prototype = e || null), new m()) + } + function s() { + do var e = a(d.call(h.call(y(), 36), 2)) + while (f.call(v, e)) + return (v[e] = e) + } + function a(e) { + var t = {} + return (t[e] = !0), Object.keys(t)[0] + } + function o(e) { + return i(null) + } + function u(e) { + function t(t) { + function n(r, n) { + return r === u ? (n ? (i = null) : i || (i = e(t))) : void 0 + } + var i + r(t, a, n) + } + function n(e) { + return f.call(e, a) || t(e), e[a](u) + } + var a = s(), + u = i(null) + return ( + (e = e || o), + (n.forget = function(e) { + f.call(e, a) && e[a](u, !0) + }), + n + ) + } + var l = Object, + c = Object.defineProperty, + p = Object.create + n(c), n(p) + var f = n(Object.prototype.hasOwnProperty), + h = n(Number.prototype.toString), + d = n(String.prototype.slice), + m = function() {}, + y = Math.random, + v = i(null) + r(t, "makeUniqueKey", s) + var g = Object.getOwnPropertyNames + ;(Object.getOwnPropertyNames = function(e) { + for (var t = g(e), r = 0, n = 0, i = t.length; i > r; ++r) + f.call(v, t[r]) || (r > n && (t[n] = t[r]), ++n) + return (t.length = n), t + }), + r(t, "makeAccessor", u) + }, + [7334, 6980], + [7335, 6981], + [7341, 6987], + 581, + [7358, 6995], + [7361, 1332], + [7364, 549, 119], + [7369, 2432, 777, 2433, 1334, 1333, 779, 6996, 1337, 119, 456], + 1380, + [7373, 1334], + [7376, 778], + 805, + [7429, 2424, 46, 64], + [7395, 367], + 1391, + [7407, 46, 64], + [7411, 367], + [7320, 7044], + [7328, 7062], + 1370, + [7326, 7064, 2443, 7065], + 1398, + 812, + [7439, 7078, 457], + [7443, 7095], + [7445, 2448, 457], + [7446, 303], + [7447, 7103], + [7448, 7081, 144, 302], + 1409, + [7472, 172, 303], + [7473, 144], + [7476, 7087, 172], + [7477, 7077, 780, 782], + [7486, 302], + [7488, 7075, 2447, 7093], + [7492, 1346, 172, 1345, 369, 144], + 1420, + [7335, 7137], + [7341, 7143], + 581, + [7358, 7151], + [7361, 1351], + [7364, 551, 120], + [7369, 2469, 783, 2470, 1353, 1352, 785, 7152, 1356, 120, 458], + 1380, + [7373, 1353], + [7376, 784], + 805, + [7429, 1347, 47, 65], + [7395, 370], + 1391, + [7407, 47, 65], + [7411, 370], + [7320, 7200], + [7328, 7218], + 1370, + [7326, 7220, 2480, 7221], + 1398, + 812, + [7439, 7234, 459], + [7443, 7251], + [7445, 2485, 459], + [7446, 307], + [7447, 7259], + [7448, 7237, 145, 306], + 1409, + [7472, 174, 307], + [7473, 145], + [7476, 7243, 174], + [7477, 7233, 786, 788], + [7486, 306], + [7488, 7231, 2484, 7249], + [7492, 1365, 174, 1364, 372, 145], + 1420, + function(e, t, r) { + e.exports = { presets: [r(2500)], plugins: [r(1539), r(1577), r(1621), r(2300)] } + }, + function(e, t, r) { + e.exports = { presets: [r(2501)], plugins: [r(1434), r(2303)] } + }, + function(e, t, r) { + e.exports = { plugins: [r(1435), r(2261)] } + }, + function(e, t, r) { + ;(function(e, n) { + "use strict" + function i() { + function e() {} + try { + var t = new Uint8Array(1) + return ( + (t.foo = function() { + return 42 + }), + (t.constructor = e), + 42 === t.foo() && + t.constructor === e && + "function" == typeof t.subarray && + 0 === t.subarray(1, 1).byteLength + ) + } catch (r) { + return !1 + } + } + function s() { + return e.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823 + } + function e(t) { + return this instanceof e + ? (e.TYPED_ARRAY_SUPPORT || ((this.length = 0), (this.parent = void 0)), + "number" == typeof t + ? a(this, t) + : "string" == typeof t + ? o(this, t, arguments.length > 1 ? arguments[1] : "utf8") + : u(this, t)) + : arguments.length > 1 + ? new e(t, arguments[1]) + : new e(t) + } + function a(t, r) { + if (((t = m(t, 0 > r ? 0 : 0 | y(r))), !e.TYPED_ARRAY_SUPPORT)) + for (var n = 0; r > n; n++) t[n] = 0 + return t + } + function o(e, t, r) { + ;("string" == typeof r && "" !== r) || (r = "utf8") + var n = 0 | g(t, r) + return (e = m(e, n)), e.write(t, r), e + } + function u(t, r) { + if (e.isBuffer(r)) return l(t, r) + if (z(r)) return c(t, r) + if (null == r) + throw new TypeError("must start with number, buffer, array or string") + if ("undefined" != typeof ArrayBuffer) { + if (r.buffer instanceof ArrayBuffer) return p(t, r) + if (r instanceof ArrayBuffer) return f(t, r) + } + return r.length ? h(t, r) : d(t, r) + } + function l(e, t) { + var r = 0 | y(t.length) + return (e = m(e, r)), t.copy(e, 0, 0, r), e + } + function c(e, t) { + var r = 0 | y(t.length) + e = m(e, r) + for (var n = 0; r > n; n += 1) e[n] = 255 & t[n] + return e + } + function p(e, t) { + var r = 0 | y(t.length) + e = m(e, r) + for (var n = 0; r > n; n += 1) e[n] = 255 & t[n] + return e + } + function f(t, r) { + return ( + e.TYPED_ARRAY_SUPPORT + ? (r.byteLength, (t = e._augment(new Uint8Array(r)))) + : (t = p(t, new Uint8Array(r))), + t + ) + } + function h(e, t) { + var r = 0 | y(t.length) + e = m(e, r) + for (var n = 0; r > n; n += 1) e[n] = 255 & t[n] + return e + } + function d(e, t) { + var r, + n = 0 + "Buffer" === t.type && z(t.data) && ((r = t.data), (n = 0 | y(r.length))), + (e = m(e, n)) + for (var i = 0; n > i; i += 1) e[i] = 255 & r[i] + return e + } + function m(t, r) { + e.TYPED_ARRAY_SUPPORT + ? ((t = e._augment(new Uint8Array(r))), (t.__proto__ = e.prototype)) + : ((t.length = r), (t._isBuffer = !0)) + var n = 0 !== r && r <= e.poolSize >>> 1 + return n && (t.parent = $), t + } + function y(e) { + if (e >= s()) + throw new RangeError( + "Attempt to allocate Buffer larger than maximum size: 0x" + + s().toString(16) + + " bytes" + ) + return 0 | e + } + function v(t, r) { + if (!(this instanceof v)) return new v(t, r) + var n = new e(t, r) + return delete n.parent, n + } + function g(e, t) { + "string" != typeof e && (e = "" + e) + var r = e.length + if (0 === r) return 0 + for (var n = !1; ; ) + switch (t) { + case "ascii": + case "binary": + case "raw": + case "raws": + return r + case "utf8": + case "utf-8": + return W(e).length + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return 2 * r + case "hex": + return r >>> 1 + case "base64": + return Y(e).length + default: + if (n) return W(e).length + ;(t = ("" + t).toLowerCase()), (n = !0) + } + } + function E(e, t, r) { + var n = !1 + if ( + ((t = 0 | t), + (r = void 0 === r || r === 1 / 0 ? this.length : 0 | r), + e || (e = "utf8"), + 0 > t && (t = 0), + r > this.length && (r = this.length), + t >= r) + ) + return "" + for (;;) + switch (e) { + case "hex": + return B(this, t, r) + case "utf8": + case "utf-8": + return w(this, t, r) + case "ascii": + return T(this, t, r) + case "binary": + return P(this, t, r) + case "base64": + return F(this, t, r) + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return k(this, t, r) + default: + if (n) throw new TypeError("Unknown encoding: " + e) + ;(e = (e + "").toLowerCase()), (n = !0) + } + } + function b(e, t, r, n) { + r = Number(r) || 0 + var i = e.length - r + n ? ((n = Number(n)), n > i && (n = i)) : (n = i) + var s = t.length + if (s % 2 !== 0) throw new Error("Invalid hex string") + n > s / 2 && (n = s / 2) + for (var a = 0; n > a; a++) { + var o = parseInt(t.substr(2 * a, 2), 16) + if (isNaN(o)) throw new Error("Invalid hex string") + e[r + a] = o + } + return a + } + function x(e, t, r, n) { + return J(W(t, e.length - r), e, r, n) + } + function A(e, t, r, n) { + return J(q(t), e, r, n) + } + function D(e, t, r, n) { + return A(e, t, r, n) + } + function C(e, t, r, n) { + return J(Y(t), e, r, n) + } + function S(e, t, r, n) { + return J(H(t, e.length - r), e, r, n) + } + function F(e, t, r) { + return 0 === t && r === e.length + ? K.fromByteArray(e) + : K.fromByteArray(e.slice(t, r)) + } + function w(e, t, r) { + r = Math.min(e.length, r) + for (var n = [], i = t; r > i; ) { + var s = e[i], + a = null, + o = s > 239 ? 4 : s > 223 ? 3 : s > 191 ? 2 : 1 + if (r >= i + o) { + var u, l, c, p + switch (o) { + case 1: + 128 > s && (a = s) + break + case 2: + ;(u = e[i + 1]), + 128 === (192 & u) && + ((p = ((31 & s) << 6) | (63 & u)), + p > 127 && (a = p)) + break + case 3: + ;(u = e[i + 1]), + (l = e[i + 2]), + 128 === (192 & u) && + 128 === (192 & l) && + ((p = + ((15 & s) << 12) | ((63 & u) << 6) | (63 & l)), + p > 2047 && (55296 > p || p > 57343) && (a = p)) + break + case 4: + ;(u = e[i + 1]), + (l = e[i + 2]), + (c = e[i + 3]), + 128 === (192 & u) && + 128 === (192 & l) && + 128 === (192 & c) && + ((p = + ((15 & s) << 18) | + ((63 & u) << 12) | + ((63 & l) << 6) | + (63 & c)), + p > 65535 && 1114112 > p && (a = p)) + } + } + null === a + ? ((a = 65533), (o = 1)) + : a > 65535 && + ((a -= 65536), + n.push(((a >>> 10) & 1023) | 55296), + (a = 56320 | (1023 & a))), + n.push(a), + (i += o) + } + return _(n) + } + function _(e) { + var t = e.length + if (Q >= t) return String.fromCharCode.apply(String, e) + for (var r = "", n = 0; t > n; ) + r += String.fromCharCode.apply(String, e.slice(n, (n += Q))) + return r + } + function T(e, t, r) { + var n = "" + r = Math.min(e.length, r) + for (var i = t; r > i; i++) n += String.fromCharCode(127 & e[i]) + return n + } + function P(e, t, r) { + var n = "" + r = Math.min(e.length, r) + for (var i = t; r > i; i++) n += String.fromCharCode(e[i]) + return n + } + function B(e, t, r) { + var n = e.length + ;(!t || 0 > t) && (t = 0), (!r || 0 > r || r > n) && (r = n) + for (var i = "", s = t; r > s; s++) i += G(e[s]) + return i + } + function k(e, t, r) { + for (var n = e.slice(t, r), i = "", s = 0; s < n.length; s += 2) + i += String.fromCharCode(n[s] + 256 * n[s + 1]) + return i + } + function I(e, t, r) { + if (e % 1 !== 0 || 0 > e) throw new RangeError("offset is not uint") + if (e + t > r) throw new RangeError("Trying to access beyond buffer length") + } + function O(t, r, n, i, s, a) { + if (!e.isBuffer(t)) throw new TypeError("buffer must be a Buffer instance") + if (r > s || a > r) throw new RangeError("value is out of bounds") + if (n + i > t.length) throw new RangeError("index out of range") + } + function M(e, t, r, n) { + 0 > t && (t = 65535 + t + 1) + for (var i = 0, s = Math.min(e.length - r, 2); s > i; i++) + e[r + i] = + (t & (255 << (8 * (n ? i : 1 - i)))) >>> (8 * (n ? i : 1 - i)) + } + function R(e, t, r, n) { + 0 > t && (t = 4294967295 + t + 1) + for (var i = 0, s = Math.min(e.length - r, 4); s > i; i++) + e[r + i] = (t >>> (8 * (n ? i : 3 - i))) & 255 + } + function L(e, t, r, n, i, s) { + if (t > i || s > t) throw new RangeError("value is out of bounds") + if (r + n > e.length) throw new RangeError("index out of range") + if (0 > r) throw new RangeError("index out of range") + } + function N(e, t, r, n, i) { + return ( + i || L(e, t, r, 4, 3.4028234663852886e38, -3.4028234663852886e38), + X.write(e, t, r, n, 23, 4), + r + 4 + ) + } + function j(e, t, r, n, i) { + return ( + i || L(e, t, r, 8, 1.7976931348623157e308, -1.7976931348623157e308), + X.write(e, t, r, n, 52, 8), + r + 8 + ) + } + function U(e) { + if (((e = V(e).replace(ee, "")), e.length < 2)) return "" + for (; e.length % 4 !== 0; ) e += "=" + return e + } + function V(e) { + return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "") + } + function G(e) { + return 16 > e ? "0" + e.toString(16) : e.toString(16) + } + function W(e, t) { + t = t || 1 / 0 + for (var r, n = e.length, i = null, s = [], a = 0; n > a; a++) { + if (((r = e.charCodeAt(a)), r > 55295 && 57344 > r)) { + if (!i) { + if (r > 56319) { + ;(t -= 3) > -1 && s.push(239, 191, 189) + continue + } + if (a + 1 === n) { + ;(t -= 3) > -1 && s.push(239, 191, 189) + continue + } + i = r + continue + } + if (56320 > r) { + ;(t -= 3) > -1 && s.push(239, 191, 189), (i = r) + continue + } + r = (((i - 55296) << 10) | (r - 56320)) + 65536 + } else i && (t -= 3) > -1 && s.push(239, 191, 189) + if (((i = null), 128 > r)) { + if ((t -= 1) < 0) break + s.push(r) + } else if (2048 > r) { + if ((t -= 2) < 0) break + s.push((r >> 6) | 192, (63 & r) | 128) + } else if (65536 > r) { + if ((t -= 3) < 0) break + s.push((r >> 12) | 224, ((r >> 6) & 63) | 128, (63 & r) | 128) + } else { + if (!(1114112 > r)) throw new Error("Invalid code point") + if ((t -= 4) < 0) break + s.push( + (r >> 18) | 240, + ((r >> 12) & 63) | 128, + ((r >> 6) & 63) | 128, + (63 & r) | 128 + ) + } + } + return s + } + function q(e) { + for (var t = [], r = 0; r < e.length; r++) t.push(255 & e.charCodeAt(r)) + return t + } + function H(e, t) { + for (var r, n, i, s = [], a = 0; a < e.length && !((t -= 2) < 0); a++) + (r = e.charCodeAt(a)), (n = r >> 8), (i = r % 256), s.push(i), s.push(n) + return s + } + function Y(e) { + return K.toByteArray(U(e)) + } + function J(e, t, r, n) { + for (var i = 0; n > i && !(i + r >= t.length || i >= e.length); i++) + t[i + r] = e[i] + return i + } + var K = r(7311), + X = r(7312), + z = r(7313) + ;(t.Buffer = e), + (t.SlowBuffer = v), + (t.INSPECT_MAX_BYTES = 50), + (e.poolSize = 8192) + var $ = {} + ;(e.TYPED_ARRAY_SUPPORT = + void 0 !== n.TYPED_ARRAY_SUPPORT ? n.TYPED_ARRAY_SUPPORT : i()), + e.TYPED_ARRAY_SUPPORT + ? ((e.prototype.__proto__ = Uint8Array.prototype), + (e.__proto__ = Uint8Array)) + : ((e.prototype.length = void 0), (e.prototype.parent = void 0)), + (e.isBuffer = function(e) { + return !(null == e || !e._isBuffer) + }), + (e.compare = function(t, r) { + if (!e.isBuffer(t) || !e.isBuffer(r)) + throw new TypeError("Arguments must be Buffers") + if (t === r) return 0 + for ( + var n = t.length, i = r.length, s = 0, a = Math.min(n, i); + a > s && t[s] === r[s]; + + ) + ++s + return s !== a && ((n = t[s]), (i = r[s])), i > n ? -1 : n > i ? 1 : 0 + }), + (e.isEncoding = function(e) { + switch (String(e).toLowerCase()) { + case "hex": + case "utf8": + case "utf-8": + case "ascii": + case "binary": + case "base64": + case "raw": + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return !0 + default: + return !1 + } + }), + (e.concat = function(t, r) { + if (!z(t)) + throw new TypeError("list argument must be an Array of Buffers.") + if (0 === t.length) return new e(0) + var n + if (void 0 === r) for (r = 0, n = 0; n < t.length; n++) r += t[n].length + var i = new e(r), + s = 0 + for (n = 0; n < t.length; n++) { + var a = t[n] + a.copy(i, s), (s += a.length) + } + return i + }), + (e.byteLength = g), + (e.prototype.toString = function() { + var e = 0 | this.length + return 0 === e + ? "" + : 0 === arguments.length + ? w(this, 0, e) + : E.apply(this, arguments) + }), + (e.prototype.equals = function(t) { + if (!e.isBuffer(t)) throw new TypeError("Argument must be a Buffer") + return this === t ? !0 : 0 === e.compare(this, t) + }), + (e.prototype.inspect = function() { + var e = "", + r = t.INSPECT_MAX_BYTES + return ( + this.length > 0 && + ((e = this.toString("hex", 0, r) + .match(/.{2}/g) + .join(" ")), + this.length > r && (e += " ... ")), + "" + ) + }), + (e.prototype.compare = function(t) { + if (!e.isBuffer(t)) throw new TypeError("Argument must be a Buffer") + return this === t ? 0 : e.compare(this, t) + }), + (e.prototype.indexOf = function(t, r) { + function n(e, t, r) { + for (var n = -1, i = 0; r + i < e.length; i++) + if (e[r + i] === t[-1 === n ? 0 : i - n]) { + if ((-1 === n && (n = i), i - n + 1 === t.length)) + return r + n + } else n = -1 + return -1 + } + if ( + (r > 2147483647 + ? (r = 2147483647) + : -2147483648 > r && (r = -2147483648), + (r >>= 0), + 0 === this.length) + ) + return -1 + if (r >= this.length) return -1 + if ((0 > r && (r = Math.max(this.length + r, 0)), "string" == typeof t)) + return 0 === t.length + ? -1 + : String.prototype.indexOf.call(this, t, r) + if (e.isBuffer(t)) return n(this, t, r) + if ("number" == typeof t) + return e.TYPED_ARRAY_SUPPORT && + "function" === Uint8Array.prototype.indexOf + ? Uint8Array.prototype.indexOf.call(this, t, r) + : n(this, [t], r) + throw new TypeError("val must be string, number or Buffer") + }), + (e.prototype.get = function(e) { + return ( + console.log( + ".get() is deprecated. Access using array indexes instead." + ), + this.readUInt8(e) + ) + }), + (e.prototype.set = function(e, t) { + return ( + console.log( + ".set() is deprecated. Access using array indexes instead." + ), + this.writeUInt8(e, t) + ) + }), + (e.prototype.write = function(e, t, r, n) { + if (void 0 === t) (n = "utf8"), (r = this.length), (t = 0) + else if (void 0 === r && "string" == typeof t) + (n = t), (r = this.length), (t = 0) + else if (isFinite(t)) + (t = 0 | t), + isFinite(r) + ? ((r = 0 | r), void 0 === n && (n = "utf8")) + : ((n = r), (r = void 0)) + else { + var i = n + ;(n = t), (t = 0 | r), (r = i) + } + var s = this.length - t + if ( + ((void 0 === r || r > s) && (r = s), + (e.length > 0 && (0 > r || 0 > t)) || t > this.length) + ) + throw new RangeError("attempt to write outside buffer bounds") + n || (n = "utf8") + for (var a = !1; ; ) + switch (n) { + case "hex": + return b(this, e, t, r) + case "utf8": + case "utf-8": + return x(this, e, t, r) + case "ascii": + return A(this, e, t, r) + case "binary": + return D(this, e, t, r) + case "base64": + return C(this, e, t, r) + case "ucs2": + case "ucs-2": + case "utf16le": + case "utf-16le": + return S(this, e, t, r) + default: + if (a) throw new TypeError("Unknown encoding: " + n) + ;(n = ("" + n).toLowerCase()), (a = !0) + } + }), + (e.prototype.toJSON = function() { + return { + type: "Buffer", + data: Array.prototype.slice.call(this._arr || this, 0) + } + }) + var Q = 4096 + ;(e.prototype.slice = function(t, r) { + var n = this.length + ;(t = ~~t), + (r = void 0 === r ? n : ~~r), + 0 > t ? ((t += n), 0 > t && (t = 0)) : t > n && (t = n), + 0 > r ? ((r += n), 0 > r && (r = 0)) : r > n && (r = n), + t > r && (r = t) + var i + if (e.TYPED_ARRAY_SUPPORT) i = e._augment(this.subarray(t, r)) + else { + var s = r - t + i = new e(s, void 0) + for (var a = 0; s > a; a++) i[a] = this[a + t] + } + return i.length && (i.parent = this.parent || this), i + }), + (e.prototype.readUIntLE = function(e, t, r) { + ;(e = 0 | e), (t = 0 | t), r || I(e, t, this.length) + for (var n = this[e], i = 1, s = 0; ++s < t && (i *= 256); ) + n += this[e + s] * i + return n + }), + (e.prototype.readUIntBE = function(e, t, r) { + ;(e = 0 | e), (t = 0 | t), r || I(e, t, this.length) + for (var n = this[e + --t], i = 1; t > 0 && (i *= 256); ) + n += this[e + --t] * i + return n + }), + (e.prototype.readUInt8 = function(e, t) { + return t || I(e, 1, this.length), this[e] + }), + (e.prototype.readUInt16LE = function(e, t) { + return t || I(e, 2, this.length), this[e] | (this[e + 1] << 8) + }), + (e.prototype.readUInt16BE = function(e, t) { + return t || I(e, 2, this.length), (this[e] << 8) | this[e + 1] + }), + (e.prototype.readUInt32LE = function(e, t) { + return ( + t || I(e, 4, this.length), + (this[e] | (this[e + 1] << 8) | (this[e + 2] << 16)) + + 16777216 * this[e + 3] + ) + }), + (e.prototype.readUInt32BE = function(e, t) { + return ( + t || I(e, 4, this.length), + 16777216 * this[e] + + ((this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3]) + ) + }), + (e.prototype.readIntLE = function(e, t, r) { + ;(e = 0 | e), (t = 0 | t), r || I(e, t, this.length) + for (var n = this[e], i = 1, s = 0; ++s < t && (i *= 256); ) + n += this[e + s] * i + return (i *= 128), n >= i && (n -= Math.pow(2, 8 * t)), n + }), + (e.prototype.readIntBE = function(e, t, r) { + ;(e = 0 | e), (t = 0 | t), r || I(e, t, this.length) + for (var n = t, i = 1, s = this[e + --n]; n > 0 && (i *= 256); ) + s += this[e + --n] * i + return (i *= 128), s >= i && (s -= Math.pow(2, 8 * t)), s + }), + (e.prototype.readInt8 = function(e, t) { + return ( + t || I(e, 1, this.length), + 128 & this[e] ? -1 * (255 - this[e] + 1) : this[e] + ) + }), + (e.prototype.readInt16LE = function(e, t) { + t || I(e, 2, this.length) + var r = this[e] | (this[e + 1] << 8) + return 32768 & r ? 4294901760 | r : r + }), + (e.prototype.readInt16BE = function(e, t) { + t || I(e, 2, this.length) + var r = this[e + 1] | (this[e] << 8) + return 32768 & r ? 4294901760 | r : r + }), + (e.prototype.readInt32LE = function(e, t) { + return ( + t || I(e, 4, this.length), + this[e] | + (this[e + 1] << 8) | + (this[e + 2] << 16) | + (this[e + 3] << 24) + ) + }), + (e.prototype.readInt32BE = function(e, t) { + return ( + t || I(e, 4, this.length), + (this[e] << 24) | + (this[e + 1] << 16) | + (this[e + 2] << 8) | + this[e + 3] + ) + }), + (e.prototype.readFloatLE = function(e, t) { + return t || I(e, 4, this.length), X.read(this, e, !0, 23, 4) + }), + (e.prototype.readFloatBE = function(e, t) { + return t || I(e, 4, this.length), X.read(this, e, !1, 23, 4) + }), + (e.prototype.readDoubleLE = function(e, t) { + return t || I(e, 8, this.length), X.read(this, e, !0, 52, 8) + }), + (e.prototype.readDoubleBE = function(e, t) { + return t || I(e, 8, this.length), X.read(this, e, !1, 52, 8) + }), + (e.prototype.writeUIntLE = function(e, t, r, n) { + ;(e = +e), + (t = 0 | t), + (r = 0 | r), + n || O(this, e, t, r, Math.pow(2, 8 * r), 0) + var i = 1, + s = 0 + for (this[t] = 255 & e; ++s < r && (i *= 256); ) + this[t + s] = (e / i) & 255 + return t + r + }), + (e.prototype.writeUIntBE = function(e, t, r, n) { + ;(e = +e), + (t = 0 | t), + (r = 0 | r), + n || O(this, e, t, r, Math.pow(2, 8 * r), 0) + var i = r - 1, + s = 1 + for (this[t + i] = 255 & e; --i >= 0 && (s *= 256); ) + this[t + i] = (e / s) & 255 + return t + r + }), + (e.prototype.writeUInt8 = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 1, 255, 0), + e.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), + (this[r] = 255 & t), + r + 1 + ) + }), + (e.prototype.writeUInt16LE = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 2, 65535, 0), + e.TYPED_ARRAY_SUPPORT + ? ((this[r] = 255 & t), (this[r + 1] = t >>> 8)) + : M(this, t, r, !0), + r + 2 + ) + }), + (e.prototype.writeUInt16BE = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 2, 65535, 0), + e.TYPED_ARRAY_SUPPORT + ? ((this[r] = t >>> 8), (this[r + 1] = 255 & t)) + : M(this, t, r, !1), + r + 2 + ) + }), + (e.prototype.writeUInt32LE = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 4, 4294967295, 0), + e.TYPED_ARRAY_SUPPORT + ? ((this[r + 3] = t >>> 24), + (this[r + 2] = t >>> 16), + (this[r + 1] = t >>> 8), + (this[r] = 255 & t)) + : R(this, t, r, !0), + r + 4 + ) + }), + (e.prototype.writeUInt32BE = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 4, 4294967295, 0), + e.TYPED_ARRAY_SUPPORT + ? ((this[r] = t >>> 24), + (this[r + 1] = t >>> 16), + (this[r + 2] = t >>> 8), + (this[r + 3] = 255 & t)) + : R(this, t, r, !1), + r + 4 + ) + }), + (e.prototype.writeIntLE = function(e, t, r, n) { + if (((e = +e), (t = 0 | t), !n)) { + var i = Math.pow(2, 8 * r - 1) + O(this, e, t, r, i - 1, -i) + } + var s = 0, + a = 1, + o = 0 > e ? 1 : 0 + for (this[t] = 255 & e; ++s < r && (a *= 256); ) + this[t + s] = (((e / a) >> 0) - o) & 255 + return t + r + }), + (e.prototype.writeIntBE = function(e, t, r, n) { + if (((e = +e), (t = 0 | t), !n)) { + var i = Math.pow(2, 8 * r - 1) + O(this, e, t, r, i - 1, -i) + } + var s = r - 1, + a = 1, + o = 0 > e ? 1 : 0 + for (this[t + s] = 255 & e; --s >= 0 && (a *= 256); ) + this[t + s] = (((e / a) >> 0) - o) & 255 + return t + r + }), + (e.prototype.writeInt8 = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 1, 127, -128), + e.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), + 0 > t && (t = 255 + t + 1), + (this[r] = 255 & t), + r + 1 + ) + }), + (e.prototype.writeInt16LE = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 2, 32767, -32768), + e.TYPED_ARRAY_SUPPORT + ? ((this[r] = 255 & t), (this[r + 1] = t >>> 8)) + : M(this, t, r, !0), + r + 2 + ) + }), + (e.prototype.writeInt16BE = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 2, 32767, -32768), + e.TYPED_ARRAY_SUPPORT + ? ((this[r] = t >>> 8), (this[r + 1] = 255 & t)) + : M(this, t, r, !1), + r + 2 + ) + }), + (e.prototype.writeInt32LE = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 4, 2147483647, -2147483648), + e.TYPED_ARRAY_SUPPORT + ? ((this[r] = 255 & t), + (this[r + 1] = t >>> 8), + (this[r + 2] = t >>> 16), + (this[r + 3] = t >>> 24)) + : R(this, t, r, !0), + r + 4 + ) + }), + (e.prototype.writeInt32BE = function(t, r, n) { + return ( + (t = +t), + (r = 0 | r), + n || O(this, t, r, 4, 2147483647, -2147483648), + 0 > t && (t = 4294967295 + t + 1), + e.TYPED_ARRAY_SUPPORT + ? ((this[r] = t >>> 24), + (this[r + 1] = t >>> 16), + (this[r + 2] = t >>> 8), + (this[r + 3] = 255 & t)) + : R(this, t, r, !1), + r + 4 + ) + }), + (e.prototype.writeFloatLE = function(e, t, r) { + return N(this, e, t, !0, r) + }), + (e.prototype.writeFloatBE = function(e, t, r) { + return N(this, e, t, !1, r) + }), + (e.prototype.writeDoubleLE = function(e, t, r) { + return j(this, e, t, !0, r) + }), + (e.prototype.writeDoubleBE = function(e, t, r) { + return j(this, e, t, !1, r) + }), + (e.prototype.copy = function(t, r, n, i) { + if ( + (n || (n = 0), + i || 0 === i || (i = this.length), + r >= t.length && (r = t.length), + r || (r = 0), + i > 0 && n > i && (i = n), + i === n) + ) + return 0 + if (0 === t.length || 0 === this.length) return 0 + if (0 > r) throw new RangeError("targetStart out of bounds") + if (0 > n || n >= this.length) + throw new RangeError("sourceStart out of bounds") + if (0 > i) throw new RangeError("sourceEnd out of bounds") + i > this.length && (i = this.length), + t.length - r < i - n && (i = t.length - r + n) + var s, + a = i - n + if (this === t && r > n && i > r) + for (s = a - 1; s >= 0; s--) t[s + r] = this[s + n] + else if (1e3 > a || !e.TYPED_ARRAY_SUPPORT) + for (s = 0; a > s; s++) t[s + r] = this[s + n] + else t._set(this.subarray(n, n + a), r) + return a + }), + (e.prototype.fill = function(e, t, r) { + if ((e || (e = 0), t || (t = 0), r || (r = this.length), t > r)) + throw new RangeError("end < start") + if (r !== t && 0 !== this.length) { + if (0 > t || t >= this.length) + throw new RangeError("start out of bounds") + if (0 > r || r > this.length) + throw new RangeError("end out of bounds") + var n + if ("number" == typeof e) for (n = t; r > n; n++) this[n] = e + else { + var i = W(e.toString()), + s = i.length + for (n = t; r > n; n++) this[n] = i[n % s] + } + return this + } + }), + (e.prototype.toArrayBuffer = function() { + if ("undefined" != typeof Uint8Array) { + if (e.TYPED_ARRAY_SUPPORT) return new e(this).buffer + for ( + var t = new Uint8Array(this.length), r = 0, n = t.length; + n > r; + r += 1 + ) + t[r] = this[r] + return t.buffer + } + throw new TypeError( + "Buffer.toArrayBuffer not supported in this browser" + ) + }) + var Z = e.prototype + e._augment = function(t) { + return ( + (t.constructor = e), + (t._isBuffer = !0), + (t._set = t.set), + (t.get = Z.get), + (t.set = Z.set), + (t.write = Z.write), + (t.toString = Z.toString), + (t.toLocaleString = Z.toString), + (t.toJSON = Z.toJSON), + (t.equals = Z.equals), + (t.compare = Z.compare), + (t.indexOf = Z.indexOf), + (t.copy = Z.copy), + (t.slice = Z.slice), + (t.readUIntLE = Z.readUIntLE), + (t.readUIntBE = Z.readUIntBE), + (t.readUInt8 = Z.readUInt8), + (t.readUInt16LE = Z.readUInt16LE), + (t.readUInt16BE = Z.readUInt16BE), + (t.readUInt32LE = Z.readUInt32LE), + (t.readUInt32BE = Z.readUInt32BE), + (t.readIntLE = Z.readIntLE), + (t.readIntBE = Z.readIntBE), + (t.readInt8 = Z.readInt8), + (t.readInt16LE = Z.readInt16LE), + (t.readInt16BE = Z.readInt16BE), + (t.readInt32LE = Z.readInt32LE), + (t.readInt32BE = Z.readInt32BE), + (t.readFloatLE = Z.readFloatLE), + (t.readFloatBE = Z.readFloatBE), + (t.readDoubleLE = Z.readDoubleLE), + (t.readDoubleBE = Z.readDoubleBE), + (t.writeUInt8 = Z.writeUInt8), + (t.writeUIntLE = Z.writeUIntLE), + (t.writeUIntBE = Z.writeUIntBE), + (t.writeUInt16LE = Z.writeUInt16LE), + (t.writeUInt16BE = Z.writeUInt16BE), + (t.writeUInt32LE = Z.writeUInt32LE), + (t.writeUInt32BE = Z.writeUInt32BE), + (t.writeIntLE = Z.writeIntLE), + (t.writeIntBE = Z.writeIntBE), + (t.writeInt8 = Z.writeInt8), + (t.writeInt16LE = Z.writeInt16LE), + (t.writeInt16BE = Z.writeInt16BE), + (t.writeInt32LE = Z.writeInt32LE), + (t.writeInt32BE = Z.writeInt32BE), + (t.writeFloatLE = Z.writeFloatLE), + (t.writeFloatBE = Z.writeFloatBE), + (t.writeDoubleLE = Z.writeDoubleLE), + (t.writeDoubleBE = Z.writeDoubleBE), + (t.fill = Z.fill), + (t.inspect = Z.inspect), + (t.toArrayBuffer = Z.toArrayBuffer), + t + ) + } + var ee = /[^+\/0-9A-Za-z-_]/g + }.call( + t, + r(2502).Buffer, + (function() { + return this + })() + )) + }, + function(e, t, r) { + e.exports = r(1366) + }, + function(e, t, r) { + "use strict" + var n = r(146)["default"], + i = r(5)["default"] + t.__esModule = !0 + var s = r(2696), + a = i(s) + ;(t["default"] = function(e, t) { + return e && t + ? a["default"](e, t, function(e, t) { + if (t && Array.isArray(e)) { + for ( + var r = t.slice(0), + i = e, + s = Array.isArray(i), + a = 0, + i = s ? i : n(i); + ; + + ) { + var o + if (s) { + if (a >= i.length) break + o = i[a++] + } else { + if (((a = i.next()), a.done)) break + o = a.value + } + var u = o + r.indexOf(u) < 0 && r.push(u) + } + return r + } + }) + : void 0 + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(3)["default"] + t.__esModule = !0 + var i = r(16), + s = n(i) + ;(t["default"] = function(e, t, r) { + if (e) { + if ("Program" === e.type) return s.file(e, t || [], r || []) + if ("File" === e.type) return e + } + throw new Error("Not a valid ast?") + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + ;(function(n) { + "use strict" + var i = r(5)["default"] + t.__esModule = !0 + var s = r(373), + a = i(s), + o = r(175), + u = i(o), + l = {} + ;(t["default"] = function(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? n.cwd() + : arguments[1] + if ("object" == typeof a["default"]) return null + var r = l[t] + if (!r) { + r = new a["default"]() + var i = u["default"].join(t, ".babelrc") + ;(r.id = i), + (r.filename = i), + (r.paths = a["default"]._nodeModulePaths(t)), + (l[t] = r) + } + try { + return a["default"]._resolveFilename(e, r) + } catch (s) { + return null + } + }), + (e.exports = t["default"]) + }.call(t, r(1))) + }, + function(e, t, r) { + "use strict" + function n(e, t) { + var r = [], + n = b.functionExpression( + null, + [b.identifier("global")], + b.blockStatement(r) + ), + i = b.program([ + b.expressionStatement(b.callExpression(n, [c.get("selfGlobal")])) + ]) + return ( + r.push( + b.variableDeclaration("var", [ + b.variableDeclarator( + e, + b.assignmentExpression( + "=", + b.memberExpression(b.identifier("global"), e), + b.objectExpression([]) + ) + ) + ]) + ), + t(r), + i + ) + } + function i(e, t) { + var r = [] + return ( + r.push( + b.variableDeclaration("var", [ + b.variableDeclarator(e, b.identifier("global")) + ]) + ), + t(r), + b.program([ + x({ + FACTORY_PARAMETERS: b.identifier("global"), + BROWSER_ARGUMENTS: b.assignmentExpression( + "=", + b.memberExpression(b.identifier("root"), e), + b.objectExpression([]) + ), + COMMON_ARGUMENTS: b.identifier("exports"), + AMD_ARGUMENTS: b.arrayExpression([b.stringLiteral("exports")]), + FACTORY_BODY: r, + UMD_ROOT: b.identifier("this") + }) + ]) + ) + } + function s(e, t) { + var r = [] + return ( + r.push( + b.variableDeclaration("var", [ + b.variableDeclarator(e, b.objectExpression([])) + ]) + ), + t(r), + r.push(b.expressionStatement(e)), + b.program(r) + ) + } + function a(e, t, r) { + g["default"](c.list, function(n) { + if (!(r && r.indexOf(n) < 0)) { + var i = b.identifier(n) + e.push( + b.expressionStatement( + b.assignmentExpression("=", b.memberExpression(t, i), c.get(n)) + ) + ) + } + }) + } + var o = r(3)["default"], + u = r(5)["default"] + t.__esModule = !0 + var l = r(1374), + c = o(l), + p = r(1372), + f = u(p), + h = r(176), + d = o(h), + m = r(807), + y = u(m), + v = r(811), + g = u(v), + E = r(16), + b = o(E), + x = y["default"]( + '\n (function (root, factory) {\n if (typeof define === "function" && define.amd) {\n define(AMD_ARGUMENTS, factory);\n } else if (typeof exports === "object") {\n factory(COMMON_ARGUMENTS);\n } else {\n factory(BROWSER_ARGUMENTS);\n }\n })(UMD_ROOT, function (FACTORY_PARAMETERS) {\n FACTORY_BODY\n });\n' + ) + ;(t["default"] = function(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? "global" + : arguments[1], + r = b.identifier("babelHelpers"), + o = function(t) { + return a(t, r, e) + }, + u = void 0, + l = { global: n, umd: i, var: s }[t] + if (!l) throw new Error(d.get("unsupportedOutputType", t)) + return (u = l(r, o)), f["default"](u).code + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(80)["default"], + i = r(5)["default"] + t.__esModule = !0 + var s = r(2647), + a = i(s), + o = a["default"]("babel:verbose"), + u = a["default"]("babel"), + l = [], + c = (function() { + function e(t, r) { + n(this, e), (this.filename = r), (this.file = t) + } + return ( + (e.prototype._buildMessage = function(e) { + var t = "[BABEL] " + this.filename + return e && (t += ": " + e), t + }), + (e.prototype.warn = function(e) { + console.warn(this._buildMessage(e)) + }), + (e.prototype.error = function(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? Error + : arguments[1] + throw new t(this._buildMessage(e)) + }), + (e.prototype.deprecate = function(e) { + ;(this.file.opts && this.file.opts.suppressDeprecationMessages) || + ((e = this._buildMessage(e)), + l.indexOf(e) >= 0 || (l.push(e), console.error(e))) + }), + (e.prototype.verbose = function(e) { + o.enabled && o(this._buildMessage(e)) + }), + (e.prototype.debug = function(e) { + u.enabled && u(this._buildMessage(e)) + }), + (e.prototype.deopt = function(e, t) { + this.debug(t) + }), + e + ) + })() + ;(t["default"] = c), (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + function n(e, t) { + var r = e.node, + n = r.source ? r.source.value : null, + i = t.metadata.modules.exports, + s = e.get("declaration") + if (s.isStatement()) { + var a = s.getBindingIdentifiers() + for (var u in a) + i.exported.push(u), + i.specifiers.push({ + kind: "local", + local: u, + exported: e.isExportDefaultDeclaration() ? "default" : u + }) + } + if (e.isExportNamedDeclaration() && r.specifiers) + for (var l = r.specifiers, c = 0; c < l.length; c++) { + var p = l[c], + f = p.exported.name + i.exported.push(f), + o.isExportDefaultSpecifier(p) && + i.specifiers.push({ + kind: "external", + local: f, + exported: f, + source: n + }), + o.isExportNamespaceSpecifier(p) && + i.specifiers.push({ + kind: "external-namespace", + exported: f, + source: n + }) + var h = p.local + h && + (n && + i.specifiers.push({ + kind: "external", + local: h.name, + exported: f, + source: n + }), + n || + i.specifiers.push({ + kind: "local", + local: h.name, + exported: f + })) + } + e.isExportAllDeclaration() && + i.specifiers.push({ kind: "external-all", source: n }) + } + function i(e) { + e.skip() + } + var s = r(3)["default"] + ;(t.__esModule = !0), (t.ExportDeclaration = n), (t.Scope = i) + var a = r(16), + o = s(a), + u = { + enter: function(e, t) { + var r = e.node + r.source && (r.source.value = t.resolveModuleSource(r.source.value)) + } + } + t.ModuleDeclaration = u + var l = { + exit: function(e, t) { + var r = e.node, + n = [], + i = [] + t.metadata.modules.imports.push({ + source: r.source.value, + imported: i, + specifiers: n + }) + for (var s = e.get("specifiers"), a = 0; a < s.length; a++) { + var o = s[a], + u = o.node.local.name + if ( + (o.isImportDefaultSpecifier() && + (i.push("default"), + n.push({ kind: "named", imported: "default", local: u })), + o.isImportSpecifier()) + ) { + var l = o.node.imported.name + i.push(l), n.push({ kind: "named", imported: l, local: u }) + } + o.isImportNamespaceSpecifier() && + (i.push("*"), n.push({ kind: "namespace", local: u })) + } + } + } + t.ImportDeclaration = l + }, + function(e, t, r) { + "use strict" + var n = r(5)["default"] + t.__esModule = !0 + var i = r(553), + s = n(i), + a = r(2655), + o = n(a) + ;(t["default"] = new s["default"]({ + visitor: { + Block: { + exit: function(e) { + for (var t = e.node, r = !1, n = 0; n < t.body.length; n++) { + var i = t.body[n] + if (i && null != i._blockHoist) { + r = !0 + break + } + } + r && + (t.body = o["default"](t.body, function(e) { + var t = e && e._blockHoist + return null == t && (t = 1), t === !0 && (t = 2), -1 * t + })) + } + } + } + })), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + function n(e, t) { + return e.is("_forceShadow") ? !0 : t && !t.isArrowFunctionExpression() + } + function i(e, t, r) { + var i = e.inShadow(t) + if (n(e, i)) { + var s = e.node._shadowedFunctionLiteral, + a = void 0, + o = e.findParent(function(e) { + return ( + (e.isProgram() || e.isFunction()) && (a = a || e), + e.isProgram() + ? !0 + : e.isFunction() + ? s + ? e === s || e.node === s.node + : !e.is("shadow") + : !1 + ) + }) + if (o !== a) { + var u = o.getData(t) + if (u) return e.replaceWith(u) + var l = r(), + c = e.scope.generateUidIdentifier(t) + return ( + o.setData(t, c), o.scope.push({ id: c, init: l }), e.replaceWith(c) + ) + } + } + } + var s = r(5)["default"], + a = r(3)["default"] + t.__esModule = !0 + var o = r(553), + u = s(o), + l = r(16), + c = a(l) + ;(t["default"] = new u["default"]({ + visitor: { + ThisExpression: function(e) { + i(e, "this", function() { + return c.thisExpression() + }) + }, + ReferencedIdentifier: function(e) { + "arguments" === e.node.name && + i(e, "arguments", function() { + return c.identifier("arguments") + }) + } + } + })), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(80)["default"], + i = r(5)["default"] + t.__esModule = !0 + var s = r(2505), + a = i(s), + o = r(553), + u = i(o), + l = r(791), + c = i(l), + p = (function() { + function e() { + n(this, e) + } + return ( + (e.prototype.lint = function(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? {} + : arguments[1] + return (t.code = !1), (t.mode = "lint"), this.transform(e, t) + }), + (e.prototype.pretransform = function(e, t) { + var r = new c["default"](t, this) + return r.wrap(e, function() { + return r.addCode(e), r.parseCode(e), r + }) + }), + (e.prototype.transform = function(e, t) { + var r = new c["default"](t, this) + return r.wrap(e, function() { + return r.addCode(e), r.parseCode(e), r.transform() + }) + }), + (e.prototype.analyse = function(e, t, r) { + return ( + void 0 === t && (t = {}), + (t.code = !1), + r && + ((t.plugins = t.plugins || []), + t.plugins.push(new u["default"]({ visitor: r }))), + this.transform(e, t).metadata + ) + }), + (e.prototype.transformFromAst = function(e, t, r) { + e = a["default"](e) + var n = new c["default"](r, this) + return n.wrap(t, function() { + return n.addCode(t), n.addAst(e), n.transform() + }) + }), + e + ) + })() + ;(t["default"] = p), (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(374)["default"], + i = r(80)["default"], + s = r(5)["default"] + t.__esModule = !0 + var a = r(790), + o = s(a), + u = r(147), + l = s(u), + c = r(791), + p = (s(c), + (function(e) { + function t(r, n) { + var s = + arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2] + i(this, t), + e.call(this), + (this.plugin = n), + (this.file = r), + (this.opts = s) + } + return ( + n(t, e), + (t.prototype.transform = function() { + var e = this.file + e.log.debug("Start transformer " + this.key), + l["default"](e.ast, this.plugin.visitor, e.scope, e), + e.log.debug("Finish transformer " + this.key) + }), + (t.prototype.addHelper = function() { + var e + return (e = this.file).addHelper.apply(e, arguments) + }), + (t.prototype.addImport = function() { + var e + return (e = this.file).addImport.apply(e, arguments) + }), + (t.prototype.getModuleName = function() { + var e + return (e = this.file).getModuleName.apply(e, arguments) + }), + (t.prototype.buildCodeFrameError = function() { + var e + return (e = this.file).buildCodeFrameError.apply(e, arguments) + }), + t + ) + })(o["default"])) + ;(t["default"] = p), (e.exports = t["default"]) + }, + [7318, 2519, 2515, 2522, 2520, 2524], + [7319, 2517], + function(e, t) { + e.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] + } + }, + [7321, 1369, 2518], + [7322, 1369], + function(e, t) { + "use strict" + var r = /[|\\{}()[\]^$+*?.]/g + e.exports = function(e) { + if ("string" != typeof e) throw new TypeError("Expected a string") + return e.replace(r, "\\$&") + } + }, + [7323, 2521], + function(e, t) { + "use strict" + e.exports = function() { + return /[\u001b\u009b][[()#;?]*(?:[0-9]{1,4}(?:;[0-9]{0,4})*)?[0-9A-ORZcf-nqry=><]/g + } + }, + [7324, 2523], + 2521, + function(e, t, r) { + ;(function(t) { + "use strict" + var r = t.argv, + n = r.indexOf("--"), + i = function(e) { + e = "--" + e + var t = r.indexOf(e) + return -1 !== t && (-1 !== n ? n > t : !0) + } + e.exports = (function() { + return "FORCE_COLOR" in t.env + ? !0 + : i("no-color") || i("no-colors") || i("color=false") + ? !1 + : i("color") || i("colors") || i("color=true") || i("color=always") + ? !0 + : t.stdout && !t.stdout.isTTY + ? !1 + : "win32" === t.platform + ? !0 + : "COLORTERM" in t.env + ? !0 + : "dumb" === t.env.TERM + ? !1 + : !!/^screen|^xterm|^vt100|color|ansi|cygwin|linux/i.test(t.env.TERM) + })() + }.call(t, r(1))) + }, + function(e, t) { + !(function() { + "use strict" + function t(e) { + if (null == e) return !1 + switch (e.type) { + case "ArrayExpression": + case "AssignmentExpression": + case "BinaryExpression": + case "CallExpression": + case "ConditionalExpression": + case "FunctionExpression": + case "Identifier": + case "Literal": + case "LogicalExpression": + case "MemberExpression": + case "NewExpression": + case "ObjectExpression": + case "SequenceExpression": + case "ThisExpression": + case "UnaryExpression": + case "UpdateExpression": + return !0 + } + return !1 + } + function r(e) { + if (null == e) return !1 + switch (e.type) { + case "DoWhileStatement": + case "ForInStatement": + case "ForStatement": + case "WhileStatement": + return !0 + } + return !1 + } + function n(e) { + if (null == e) return !1 + switch (e.type) { + case "BlockStatement": + case "BreakStatement": + case "ContinueStatement": + case "DebuggerStatement": + case "DoWhileStatement": + case "EmptyStatement": + case "ExpressionStatement": + case "ForInStatement": + case "ForStatement": + case "IfStatement": + case "LabeledStatement": + case "ReturnStatement": + case "SwitchStatement": + case "ThrowStatement": + case "TryStatement": + case "VariableDeclaration": + case "WhileStatement": + case "WithStatement": + return !0 + } + return !1 + } + function i(e) { + return n(e) || (null != e && "FunctionDeclaration" === e.type) + } + function s(e) { + switch (e.type) { + case "IfStatement": + return null != e.alternate ? e.alternate : e.consequent + case "LabeledStatement": + case "ForStatement": + case "ForInStatement": + case "WhileStatement": + case "WithStatement": + return e.body + } + return null + } + function a(e) { + var t + if ("IfStatement" !== e.type) return !1 + if (null == e.alternate) return !1 + t = e.consequent + do { + if ("IfStatement" === t.type && null == t.alternate) return !0 + t = s(t) + } while (t) + return !1 + } + e.exports = { + isExpression: t, + isStatement: n, + isIterationStatement: r, + isSourceElement: i, + isProblematicIfStatement: a, + trailingStatement: s + } + })() + }, + [7325, 1370], + [7326, 2525, 1370, 2526], + function(e, t) { + ;(e.exports = /((['"])(?:(?!\2|\\).|\\(?:\r\n|[\s\S]))*(\2)?|`(?:[^`\\$]|\\[\s\S]|\$(?!\{)|\$\{(?:[^{}]|\{[^}]*\}?)*\}?)*(`)?)|(\/\/.*)|(\/\*(?:[^*]|\*(?!\/))*(\*\/)?)|(\/(?!\*)(?:\[(?:(?![\]\\]).|\\.)*\]|(?![\/\]\\]).|\\.)+\/(?:(?!\s*(?:\b|[\u0080-\uFFFF$\\'"~({]|[+\-!](?!=)|\.?\d))|[gmiyu]{1,5}\b(?![\u0080-\uFFFF$\\]|\s*(?:[+\-*%&|^<>!=?({]|\/(?![\/*])))))|((?:0[xX][\da-fA-F]+|0[oO][0-7]+|0[bB][01]+|(?:\d*\.\d+|\d+\.?)(?:[eE][+-]?\d+)?))|((?!\d)(?:(?!\s)[$\w\u0080-\uFFFF]|\\u[\da-fA-F]{4}|\\u\{[\da-fA-F]{1,6}\})+)|(--|\+\+|&&|\|\||=>|\.{3}|(?:[+\-*\/%&|^]|<{1,2}|>{1,3}|!=?|={1,2})=?|[?:~]|[;,.[\](){}])|(\s+)|(^$|[\s\S])/g), + (e.exports.matchToToken = function(e) { + var t = { type: "invalid", value: e[0] } + return ( + e[1] + ? ((t.type = "string"), (t.closed = !(!e[3] && !e[4]))) + : e[5] + ? (t.type = "comment") + : e[6] + ? ((t.type = "comment"), (t.closed = !!e[7])) + : e[8] + ? (t.type = "regex") + : e[9] + ? (t.type = "number") + : e[10] + ? (t.type = "name") + : e[11] + ? (t.type = "punctuator") + : e[12] && (t.type = "whitespace"), + t + ) + }) + }, + [7327, 2530], + function(e, t) { + function r(e, t, r) { + e = String(e) + var n = -1 + for (r || (r = " "), t -= e.length; ++n < t; ) e = r + e + return e + } + e.exports = r + }, + [7328, 2532], + [7329, 2533], + function(e, t) { + "use strict" + e.exports = + Number.isNaN || + function(e) { + return e !== e + } + }, + function(e, t, r) { + "use strict" + var n = r(80)["default"], + i = r(5)["default"] + t.__esModule = !0 + var s = r(554), + a = i(s), + o = r(2556), + u = i(o), + l = (function() { + function e(t, r) { + n(this, e), + (this.printedCommentStarts = {}), + (this.parenPushNewlineState = null), + (this.position = t), + (this._indent = r.indent.base), + (this.format = r), + (this.buf = ""), + (this.last = "") + } + return ( + (e.prototype.catchUp = function(e) { + if (e.loc && this.format.retainLines && this.buf) + for (; this.position.line < e.loc.start.line; ) this._push("\n") + }), + (e.prototype.get = function() { + return u["default"](this.buf) + }), + (e.prototype.getIndent = function() { + return this.format.compact || this.format.concise + ? "" + : a["default"](this.format.indent.style, this._indent) + }), + (e.prototype.indentSize = function() { + return this.getIndent().length + }), + (e.prototype.indent = function() { + this._indent++ + }), + (e.prototype.dedent = function() { + this._indent-- + }), + (e.prototype.semicolon = function() { + this.push(";") + }), + (e.prototype.ensureSemicolon = function() { + this.isLast(";") || this.semicolon() + }), + (e.prototype.rightBrace = function() { + this.newline(!0), + this.format.minified && + !this._lastPrintedIsEmptyStatement && + this._removeLast(";"), + this.push("}") + }), + (e.prototype.keyword = function(e) { + this.push(e), this.space() + }), + (e.prototype.space = function(e) { + ;(!e && this.format.compact) || + ((e || (this.buf && !this.isLast(" ") && !this.isLast("\n"))) && + this.push(" ")) + }), + (e.prototype.removeLast = function(e) { + return this.format.compact ? void 0 : this._removeLast(e) + }), + (e.prototype._removeLast = function(e) { + this._isLast(e) && + ((this.buf = this.buf.slice(0, -1)), + (this.last = this.buf[this.buf.length - 1]), + this.position.unshift(e)) + }), + (e.prototype.startTerminatorless = function() { + return (this.parenPushNewlineState = { printed: !1 }) + }), + (e.prototype.endTerminatorless = function(e) { + e.printed && (this.dedent(), this.newline(), this.push(")")) + }), + (e.prototype.newline = function(e, t) { + return this.format.retainLines || this.format.compact + ? void 0 + : this.format.concise + ? void this.space() + : void ( + this.endsWith("\n\n") || + ("boolean" == typeof e && (t = e), + "number" != typeof e && (e = 1), + (e = Math.min(2, e)), + (this.endsWith("{\n") || this.endsWith(":\n")) && e--, + 0 >= e || + (t && this.removeLast("\n"), + this.removeLast(" "), + this._removeSpacesAfterLastNewline(), + this._push(a["default"]("\n", e)))) + ) + }), + (e.prototype._removeSpacesAfterLastNewline = function() { + var e = this.buf.lastIndexOf("\n") + e >= 0 && + this.get().length <= e && + ((this.buf = this.buf.substring(0, e + 1)), (this.last = "\n")) + }), + (e.prototype.push = function(e, t) { + if (!this.format.compact && this._indent && !t && "\n" !== e) { + var r = this.getIndent() + ;(e = e.replace(/\n/g, "\n" + r)), + this.isLast("\n") && this._push(r) + } + this._push(e) + }), + (e.prototype._push = function(e) { + var t = this.parenPushNewlineState + if (t) + for (var r = 0; r < e.length; r++) { + var n = e[r] + if (" " !== n) { + ;(this.parenPushNewlineState = null), + ("\n" !== n && "/" !== n) || + (this._push("("), + this.indent(), + (t.printed = !0)) + break + } + } + this.position.push(e), + (this.buf += e), + (this.last = e[e.length - 1]) + }), + (e.prototype.endsWith = function(e) { + return 1 === e.length + ? this.last === e + : this.buf.slice(-e.length) === e + }), + (e.prototype.isLast = function(e) { + return this.format.compact ? !1 : this._isLast(e) + }), + (e.prototype._isLast = function(e) { + var t = this.last + return Array.isArray(e) ? e.indexOf(t) >= 0 : e === t + }), + e + ) + })() + ;(t["default"] = l), (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + function r(e) { + this.print(e.program, e) + } + function n(e) { + this.printInnerComments(e, !1), + this.printSequence(e.directives, e), + e.directives && e.directives.length && this.newline(), + this.printSequence(e.body, e) + } + function i(e) { + this.push("{"), + this.printInnerComments(e), + e.body.length + ? (this.newline(), + this.printSequence(e.directives, e, { indent: !0 }), + e.directives && e.directives.length && this.newline(), + this.printSequence(e.body, e, { indent: !0 }), + this.format.retainLines || + this.format.concise || + this.removeLast("\n"), + this.rightBrace()) + : this.push("}") + } + function s() {} + function a(e) { + this.print(e.value, e), this.semicolon() + } + function o(e) { + this.push(this._stringLiteral(e.value)) + } + ;(t.__esModule = !0), + (t.File = r), + (t.Program = n), + (t.BlockStatement = i), + (t.Noop = s), + (t.Directive = a), + (t.DirectiveLiteral = o) + }, + function(e, t) { + "use strict" + function r(e) { + this.printJoin(e.decorators, e, { separator: "" }), + this.push("class"), + e.id && (this.push(" "), this.print(e.id, e)), + this.print(e.typeParameters, e), + e.superClass && + (this.push(" extends "), + this.print(e.superClass, e), + this.print(e.superTypeParameters, e)), + e["implements"] && + (this.push(" implements "), + this.printJoin(e["implements"], e, { separator: ", " })), + this.space(), + this.print(e.body, e) + } + function n(e) { + this.push("{"), + this.printInnerComments(e), + 0 === e.body.length + ? this.push("}") + : (this.newline(), + this.indent(), + this.printSequence(e.body, e), + this.dedent(), + this.rightBrace()) + } + function i(e) { + this.printJoin(e.decorators, e, { separator: "" }), + e["static"] && this.push("static "), + this.print(e.key, e), + this.print(e.typeAnnotation, e), + e.value && + (this.space(), this.push("="), this.space(), this.print(e.value, e)), + this.semicolon() + } + function s(e) { + this.printJoin(e.decorators, e, { separator: "" }), + e["static"] && this.push("static "), + "constructorCall" === e.kind && this.push("call "), + this._method(e) + } + ;(t.__esModule = !0), + (t.ClassDeclaration = r), + (t.ClassBody = n), + (t.ClassProperty = i), + (t.ClassMethod = s), + (t.ClassExpression = r) + }, + function(e, t, r) { + "use strict" + function n(e) { + var t = /[a-z]$/.test(e.operator), + r = e.argument + ;(P.isUpdateExpression(r) || P.isUnaryExpression(r)) && (t = !0), + P.isUnaryExpression(r) && "!" === r.operator && (t = !1), + this.push(e.operator), + t && this.push(" "), + this.print(e.argument, e) + } + function i(e) { + this.push("do"), this.space(), this.print(e.body, e) + } + function s(e) { + this.push("("), this.print(e.expression, e), this.push(")") + } + function a(e) { + e.prefix + ? (this.push(e.operator), this.print(e.argument, e)) + : (this.print(e.argument, e), this.push(e.operator)) + } + function o(e) { + this.print(e.test, e), + this.space(), + this.push("?"), + this.space(), + this.print(e.consequent, e), + this.space(), + this.push(":"), + this.space(), + this.print(e.alternate, e) + } + function u(e, t) { + this.push("new "), + this.print(e.callee, e), + (0 !== e.arguments.length || + !this.format.minified || + P.isCallExpression(t, { callee: e }) || + P.isMemberExpression(t) || + P.isNewExpression(t)) && + (this.push("("), this.printList(e.arguments, e), this.push(")")) + } + function l(e) { + this.printList(e.expressions, e) + } + function c() { + this.push("this") + } + function p() { + this.push("super") + } + function f(e) { + this.push("@"), this.print(e.expression, e), this.newline() + } + function h(e) { + this.print(e.callee, e), e.loc && this.printAuxAfterComment(), this.push("(") + var t = e._prettyCall && !this.format.retainLines && !this.format.compact, + r = void 0 + t && ((r = ",\n"), this.newline(), this.indent()), + this.printList(e.arguments, e, { separator: r }), + t && (this.newline(), this.dedent()), + this.push(")") + } + function d(e) { + return function(t) { + if ((this.push(e), t.delegate && this.push("*"), t.argument)) { + this.push(" ") + var r = this.startTerminatorless() + this.print(t.argument, t), this.endTerminatorless(r) + } + } + } + function m() { + ;(this._lastPrintedIsEmptyStatement = !0), this.semicolon() + } + function y(e) { + this.print(e.expression, e), this.semicolon() + } + function v(e) { + this.print(e.left, e), + this.space(), + this.push("="), + this.space(), + this.print(e.right, e) + } + function g(e, t) { + var r = + this._inForStatementInitCounter && + "in" === e.operator && + !k.needsParens(e, t) + r && this.push("("), this.print(e.left, e) + var n = + !this.format.compact || "in" === e.operator || "instanceof" === e.operator + if ( + (n && this.push(" "), + this.push(e.operator), + !n && + ((n = + "<" === e.operator && + P.isUnaryExpression(e.right, { prefix: !0, operator: "!" }) && + P.isUnaryExpression(e.right.argument, { + prefix: !0, + operator: "--" + })), + !n)) + ) { + var i = A(e.right) + n = + P.isUnaryExpression(i, { prefix: !0, operator: e.operator }) || + P.isUpdateExpression(i, { + prefix: !0, + operator: e.operator + e.operator + }) + } + n && this.push(" "), this.print(e.right, e), r && this.push(")") + } + function E(e) { + this.print(e.object, e), this.push("::"), this.print(e.callee, e) + } + function b(e) { + if ((this.print(e.object, e), !e.computed && P.isMemberExpression(e.property))) + throw new TypeError("Got a MemberExpression for MemberExpression property") + var t = e.computed + if ((P.isLiteral(e.property) && _["default"](e.property.value) && (t = !0), t)) + this.push("["), this.print(e.property, e), this.push("]") + else { + if (P.isNumericLiteral(e.object)) { + var r = this.getPossibleRaw(e.object) || e.object.value + !F["default"](+r) || + M.test(r) || + I.test(r) || + O.test(r) || + this.endsWith(".") || + this.push(".") + } + this.push("."), this.print(e.property, e) + } + } + function x(e) { + this.print(e.meta, e), this.push("."), this.print(e.property, e) + } + function A(e) { + return P.isBinaryExpression(e) ? A(e.left) : e + } + var D = r(5)["default"], + C = r(3)["default"] + ;(t.__esModule = !0), + (t.UnaryExpression = n), + (t.DoExpression = i), + (t.ParenthesizedExpression = s), + (t.UpdateExpression = a), + (t.ConditionalExpression = o), + (t.NewExpression = u), + (t.SequenceExpression = l), + (t.ThisExpression = c), + (t.Super = p), + (t.Decorator = f), + (t.CallExpression = h), + (t.EmptyStatement = m), + (t.ExpressionStatement = y), + (t.AssignmentPattern = v), + (t.AssignmentExpression = g), + (t.BindExpression = E), + (t.MemberExpression = b), + (t.MetaProperty = x) + var S = r(2551), + F = D(S), + w = r(1416), + _ = D(w), + T = r(16), + P = C(T), + B = r(1373), + k = C(B), + I = /e/i, + O = /\.0+$/, + M = /^0[box]/, + R = d("yield") + t.YieldExpression = R + var L = d("await") + ;(t.AwaitExpression = L), (t.BinaryExpression = g), (t.LogicalExpression = g) + }, + function(e, t, r) { + "use strict" + function n() { + this.push("any") + } + function i(e) { + this.print(e.elementType, e), this.push("["), this.push("]") + } + function s() { + this.push("bool") + } + function a(e) { + this.push(e.value ? "true" : "false") + } + function o() { + this.push("null") + } + function u(e) { + this.push("declare class "), this._interfaceish(e) + } + function l(e) { + this.push("declare function "), + this.print(e.id, e), + this.print(e.id.typeAnnotation.typeAnnotation, e), + this.semicolon() + } + function c(e) { + this.push("declare "), this.InterfaceDeclaration(e) + } + function p(e) { + this.push("declare module "), + this.print(e.id, e), + this.space(), + this.print(e.body, e) + } + function f(e) { + this.push("declare "), this.TypeAlias(e) + } + function h(e) { + this.push("declare var "), + this.print(e.id, e), + this.print(e.id.typeAnnotation, e), + this.semicolon() + } + function d() { + this.push("*") + } + function m(e, t) { + this.print(e.typeParameters, e), + this.push("("), + this.printList(e.params, e), + e.rest && + (e.params.length && (this.push(","), this.space()), + this.push("..."), + this.print(e.rest, e)), + this.push(")"), + "ObjectTypeProperty" === t.type || + "ObjectTypeCallProperty" === t.type || + "DeclareFunction" === t.type + ? this.push(":") + : (this.space(), this.push("=>")), + this.space(), + this.print(e.returnType, e) + } + function y(e) { + this.print(e.name, e), + e.optional && this.push("?"), + this.push(":"), + this.space(), + this.print(e.typeAnnotation, e) + } + function v(e) { + this.print(e.id, e), this.print(e.typeParameters, e) + } + function g(e) { + this.print(e.id, e), + this.print(e.typeParameters, e), + e["extends"].length && + (this.push(" extends "), + this.printJoin(e["extends"], e, { separator: ", " })), + e.mixins && + e.mixins.length && + (this.push(" mixins "), + this.printJoin(e.mixins, e, { separator: ", " })), + this.space(), + this.print(e.body, e) + } + function E(e) { + this.push("interface "), this._interfaceish(e) + } + function b(e) { + this.printJoin(e.types, e, { separator: " & " }) + } + function x() { + this.push("mixed") + } + function A(e) { + this.push("?"), this.print(e.typeAnnotation, e) + } + function D() { + this.push("number") + } + function C(e) { + this.push(this._stringLiteral(e.value)) + } + function S() { + this.push("string") + } + function F() { + this.push("this") + } + function w(e) { + this.push("["), this.printJoin(e.types, e, { separator: ", " }), this.push("]") + } + function _(e) { + this.push("typeof "), this.print(e.argument, e) + } + function T(e) { + this.push("type "), + this.print(e.id, e), + this.print(e.typeParameters, e), + this.space(), + this.push("="), + this.space(), + this.print(e.right, e), + this.semicolon() + } + function P(e) { + this.push(":"), + this.space(), + e.optional && this.push("?"), + this.print(e.typeAnnotation, e) + } + function B(e) { + var t = this + this.push("<"), + this.printJoin(e.params, e, { + separator: ", ", + iterator: function(e) { + t.print(e.typeAnnotation, e) + } + }), + this.push(">") + } + function k(e) { + var t = this + this.push("{") + var r = e.properties.concat(e.callProperties, e.indexers) + r.length && + (this.space(), + this.printJoin(r, e, { + separator: !1, + indent: !0, + iterator: function() { + 1 !== r.length && (t.semicolon(), t.space()) + } + }), + this.space()), + this.push("}") + } + function I(e) { + e["static"] && this.push("static "), this.print(e.value, e) + } + function O(e) { + e["static"] && this.push("static "), + this.push("["), + this.print(e.id, e), + this.push(":"), + this.space(), + this.print(e.key, e), + this.push("]"), + this.push(":"), + this.space(), + this.print(e.value, e) + } + function M(e) { + e["static"] && this.push("static "), + this.print(e.key, e), + e.optional && this.push("?"), + G.isFunctionTypeAnnotation(e.value) || (this.push(":"), this.space()), + this.print(e.value, e) + } + function R(e) { + this.print(e.qualification, e), this.push("."), this.print(e.id, e) + } + function L(e) { + this.printJoin(e.types, e, { separator: " | " }) + } + function N(e) { + this.push("("), + this.print(e.expression, e), + this.print(e.typeAnnotation, e), + this.push(")") + } + function j() { + this.push("void") + } + var U = r(3)["default"] + ;(t.__esModule = !0), + (t.AnyTypeAnnotation = n), + (t.ArrayTypeAnnotation = i), + (t.BooleanTypeAnnotation = s), + (t.BooleanLiteralTypeAnnotation = a), + (t.NullLiteralTypeAnnotation = o), + (t.DeclareClass = u), + (t.DeclareFunction = l), + (t.DeclareInterface = c), + (t.DeclareModule = p), + (t.DeclareTypeAlias = f), + (t.DeclareVariable = h), + (t.ExistentialTypeParam = d), + (t.FunctionTypeAnnotation = m), + (t.FunctionTypeParam = y), + (t.InterfaceExtends = v), + (t._interfaceish = g), + (t.InterfaceDeclaration = E), + (t.IntersectionTypeAnnotation = b), + (t.MixedTypeAnnotation = x), + (t.NullableTypeAnnotation = A), + (t.NumberTypeAnnotation = D), + (t.StringLiteralTypeAnnotation = C), + (t.StringTypeAnnotation = S), + (t.ThisTypeAnnotation = F), + (t.TupleTypeAnnotation = w), + (t.TypeofTypeAnnotation = _), + (t.TypeAlias = T), + (t.TypeAnnotation = P), + (t.TypeParameterInstantiation = B), + (t.ObjectTypeAnnotation = k), + (t.ObjectTypeCallProperty = I), + (t.ObjectTypeIndexer = O), + (t.ObjectTypeProperty = M), + (t.QualifiedTypeIdentifier = R), + (t.UnionTypeAnnotation = L), + (t.TypeCastExpression = N), + (t.VoidTypeAnnotation = j) + var V = r(16), + G = U(V) + ;(t.ClassImplements = v), (t.GenericTypeAnnotation = v) + var W = r(1371) + ;(t.NumericLiteralTypeAnnotation = W.NumericLiteral), + (t.TypeParameterDeclaration = B) + }, + function(e, t) { + "use strict" + function r(e) { + this.print(e.name, e), e.value && (this.push("="), this.print(e.value, e)) + } + function n(e) { + this.push(e.name) + } + function i(e) { + this.print(e.namespace, e), this.push(":"), this.print(e.name, e) + } + function s(e) { + this.print(e.object, e), this.push("."), this.print(e.property, e) + } + function a(e) { + this.push("{..."), this.print(e.argument, e), this.push("}") + } + function o(e) { + this.push("{"), this.print(e.expression, e), this.push("}") + } + function u(e) { + this.push(e.value, !0) + } + function l(e) { + var t = e.openingElement + if ((this.print(t, e), !t.selfClosing)) { + this.indent() + for (var r = e.children, n = 0; n < r.length; n++) { + var i = r[n] + this.print(i, e) + } + this.dedent(), this.print(e.closingElement, e) + } + } + function c(e) { + this.push("<"), + this.print(e.name, e), + e.attributes.length > 0 && + (this.push(" "), this.printJoin(e.attributes, e, { separator: " " })), + this.push(e.selfClosing ? " />" : ">") + } + function p(e) { + this.push("") + } + function f() {} + ;(t.__esModule = !0), + (t.JSXAttribute = r), + (t.JSXIdentifier = n), + (t.JSXNamespacedName = i), + (t.JSXMemberExpression = s), + (t.JSXSpreadAttribute = a), + (t.JSXExpressionContainer = o), + (t.JSXText = u), + (t.JSXElement = l), + (t.JSXOpeningElement = c), + (t.JSXClosingElement = p), + (t.JSXEmptyExpression = f) + }, + function(e, t, r) { + "use strict" + function n(e) { + var t = this + this.print(e.typeParameters, e), + this.push("("), + this.printList(e.params, e, { + iterator: function(e) { + e.optional && t.push("?"), t.print(e.typeAnnotation, e) + } + }), + this.push(")"), + e.returnType && this.print(e.returnType, e) + } + function i(e) { + var t = e.kind, + r = e.key + ;("method" !== t && "init" !== t) || (e.generator && this.push("*")), + ("get" !== t && "set" !== t) || this.push(t + " "), + e.async && this.push("async "), + e.computed + ? (this.push("["), this.print(r, e), this.push("]")) + : this.print(r, e), + this._params(e), + this.space(), + this.print(e.body, e) + } + function s(e) { + e.async && this.push("async "), + this.push("function"), + e.generator && this.push("*"), + e.id ? (this.push(" "), this.print(e.id, e)) : this.space(), + this._params(e), + this.space(), + this.print(e.body, e) + } + function a(e) { + e.async && this.push("async "), + 1 === e.params.length && l.isIdentifier(e.params[0]) + ? this.print(e.params[0], e) + : this._params(e), + this.push(" => "), + this.print(e.body, e) + } + var o = r(3)["default"] + ;(t.__esModule = !0), + (t._params = n), + (t._method = i), + (t.FunctionExpression = s), + (t.ArrowFunctionExpression = a) + var u = r(16), + l = o(u) + t.FunctionDeclaration = s + }, + function(e, t, r) { + "use strict" + function n(e) { + this.print(e.imported, e), + e.local && + e.local.name !== e.imported.name && + (this.push(" as "), this.print(e.local, e)) + } + function i(e) { + this.print(e.local, e) + } + function s(e) { + this.print(e.exported, e) + } + function a(e) { + this.print(e.local, e), + e.exported && + e.local.name !== e.exported.name && + (this.push(" as "), this.print(e.exported, e)) + } + function o(e) { + this.push("* as "), this.print(e.exported, e) + } + function u(e) { + this.push("export *"), + e.exported && (this.push(" as "), this.print(e.exported, e)), + this.push(" from "), + this.print(e.source, e), + this.semicolon() + } + function l() { + this.push("export "), p.apply(this, arguments) + } + function c() { + this.push("export default "), p.apply(this, arguments) + } + function p(e) { + if (e.declaration) { + var t = e.declaration + if ((this.print(t, e), y.isStatement(t) || y.isFunction(t) || y.isClass(t))) + return + } else { + "type" === e.exportKind && this.push("type ") + for (var r = e.specifiers.slice(0), n = !1; ; ) { + var i = r[0] + if (!y.isExportDefaultSpecifier(i) && !y.isExportNamespaceSpecifier(i)) + break + ;(n = !0), this.print(r.shift(), e), r.length && this.push(", ") + } + ;(r.length || (!r.length && !n)) && + (this.push("{"), + r.length && + (this.space(), + this.printJoin(r, e, { separator: ", " }), + this.space()), + this.push("}")), + e.source && (this.push(" from "), this.print(e.source, e)) + } + this.ensureSemicolon() + } + function f(e) { + this.push("import "), + ("type" !== e.importKind && "typeof" !== e.importKind) || + this.push(e.importKind + " ") + var t = e.specifiers.slice(0) + if (t && t.length) { + for (;;) { + var r = t[0] + if (!y.isImportDefaultSpecifier(r) && !y.isImportNamespaceSpecifier(r)) + break + this.print(t.shift(), e), t.length && this.push(", ") + } + t.length && + (this.push("{"), + this.space(), + this.printJoin(t, e, { separator: ", " }), + this.space(), + this.push("}")), + this.push(" from ") + } + this.print(e.source, e), this.semicolon() + } + function h(e) { + this.push("* as "), this.print(e.local, e) + } + var d = r(3)["default"] + ;(t.__esModule = !0), + (t.ImportSpecifier = n), + (t.ImportDefaultSpecifier = i), + (t.ExportDefaultSpecifier = s), + (t.ExportSpecifier = a), + (t.ExportNamespaceSpecifier = o), + (t.ExportAllDeclaration = u), + (t.ExportNamedDeclaration = l), + (t.ExportDefaultDeclaration = c), + (t.ImportDeclaration = f), + (t.ImportNamespaceSpecifier = h) + var m = r(16), + y = d(m) + }, + function(e, t, r) { + "use strict" + function n(e) { + this.keyword("with"), + this.push("("), + this.print(e.object, e), + this.push(")"), + this.printBlock(e) + } + function i(e) { + this.keyword("if"), + this.push("("), + this.print(e.test, e), + this.push(")"), + this.space() + var t = e.alternate && D.isIfStatement(s(e.consequent)) + t && (this.push("{"), this.newline(), this.indent()), + this.printAndIndentOnComments(e.consequent, e), + t && (this.dedent(), this.newline(), this.push("}")), + e.alternate && + (this.isLast("}") && this.space(), + this.push("else "), + this.printAndIndentOnComments(e.alternate, e)) + } + function s(e) { + return D.isStatement(e.body) ? s(e.body) : e + } + function a(e) { + this.keyword("for"), + this.push("("), + this._inForStatementInitCounter++, + this.print(e.init, e), + this._inForStatementInitCounter--, + this.push(";"), + e.test && (this.space(), this.print(e.test, e)), + this.push(";"), + e.update && (this.space(), this.print(e.update, e)), + this.push(")"), + this.printBlock(e) + } + function o(e) { + this.keyword("while"), + this.push("("), + this.print(e.test, e), + this.push(")"), + this.printBlock(e) + } + function u(e) { + this.push("do "), + this.print(e.body, e), + this.space(), + this.keyword("while"), + this.push("("), + this.print(e.test, e), + this.push(");") + } + function l(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] ? "label" : arguments[1] + return function(r) { + this.push(e) + var n = r[t] + if (n) { + ;(this.format.minified && + (D.isUnaryExpression(n, { prefix: !0 }) || + D.isUpdateExpression(n, { prefix: !0 })) && + C.indexOf(n.operator) > -1) || + this.push(" ") + var i = this.startTerminatorless() + this.print(n, r), this.endTerminatorless(i) + } + this.semicolon() + } + } + function c(e) { + this.print(e.label, e), this.push(": "), this.print(e.body, e) + } + function p(e) { + this.keyword("try"), + this.print(e.block, e), + this.space(), + e.handlers ? this.print(e.handlers[0], e) : this.print(e.handler, e), + e.finalizer && + (this.space(), this.push("finally "), this.print(e.finalizer, e)) + } + function f(e) { + this.keyword("catch"), + this.push("("), + this.print(e.param, e), + this.push(")"), + this.space(), + this.print(e.body, e) + } + function h(e) { + this.keyword("switch"), + this.push("("), + this.print(e.discriminant, e), + this.push(")"), + this.space(), + this.push("{"), + this.printSequence(e.cases, e, { + indent: !0, + addNewlines: function(t, r) { + return t || e.cases[e.cases.length - 1] !== r ? void 0 : -1 + } + }), + this.push("}") + } + function d(e) { + e.test + ? (this.push("case "), this.print(e.test, e), this.push(":")) + : this.push("default:"), + e.consequent.length && + (this.newline(), this.printSequence(e.consequent, e, { indent: !0 })) + } + function m() { + this.push("debugger;") + } + function y(e, t) { + this.push(e.kind + " ") + var r = !1 + if (!D.isFor(t)) + for (var n = e.declarations, i = 0; i < n.length; i++) { + var s = n[i] + s.init && (r = !0) + } + var a = void 0 + this.format.compact || + this.format.concise || + !r || + this.format.retainLines || + (a = ",\n" + x["default"](" ", e.kind.length + 1)), + this.printList(e.declarations, e, { separator: a }), + (!D.isFor(t) || (t.left !== e && t.init !== e)) && this.semicolon() + } + function v(e) { + this.print(e.id, e), + this.print(e.id.typeAnnotation, e), + e.init && + (this.space(), this.push("="), this.space(), this.print(e.init, e)) + } + var g = r(5)["default"], + E = r(3)["default"] + ;(t.__esModule = !0), + (t.WithStatement = n), + (t.IfStatement = i), + (t.ForStatement = a), + (t.WhileStatement = o), + (t.DoWhileStatement = u), + (t.LabeledStatement = c), + (t.TryStatement = p), + (t.CatchClause = f), + (t.SwitchStatement = h), + (t.SwitchCase = d), + (t.DebuggerStatement = m), + (t.VariableDeclaration = y), + (t.VariableDeclarator = v) + var b = r(554), + x = g(b), + A = r(16), + D = E(A), + C = D.UPDATE_OPERATORS.concat(D.NUMBER_UNARY_OPERATORS).concat(["!"]), + S = function(e) { + return function(t) { + this.keyword("for"), + this.push("("), + this.print(t.left, t), + this.push(" " + e + " "), + this.print(t.right, t), + this.push(")"), + this.printBlock(t) + } + }, + F = S("in") + t.ForInStatement = F + var w = S("of") + t.ForOfStatement = w + var _ = l("continue") + t.ContinueStatement = _ + var T = l("return", "argument") + t.ReturnStatement = T + var P = l("break") + t.BreakStatement = P + var B = l("throw", "argument") + t.ThrowStatement = B + }, + function(e, t) { + "use strict" + function r(e) { + this.print(e.tag, e), this.print(e.quasi, e) + } + function n(e) { + this._push(e.value.raw) + } + function i(e) { + this.push("`") + for (var t = e.quasis, r = 0; r < t.length; r++) + this.print(t[r], e), + r + 1 < t.length && + (this._push("${ "), + this.print(e.expressions[r], e), + this.push(" }")) + this._push("`") + } + ;(t.__esModule = !0), + (t.TaggedTemplateExpression = r), + (t.TemplateElement = n), + (t.TemplateLiteral = i) + }, + function(e, t, r) { + "use strict" + function n(e, t) { + return E.isArrayTypeAnnotation(t) + } + function i(e, t) { + return !(!E.isMemberExpression(t) || t.object !== e) + } + function s(e, t, r) { + return E.isExpressionStatement(t) ? !0 : y(r, !0) + } + function a(e, t) { + if ((E.isCallExpression(t) || E.isNewExpression(t)) && t.callee === e) return !0 + if (E.isUnaryLike(t)) return !0 + if (E.isMemberExpression(t) && t.object === e) return !0 + if (E.isBinary(t)) { + var r = t.operator, + n = b[r], + i = e.operator, + s = b[i] + if (n > s) return !0 + if (n === s && t.right === e && !E.isLogicalExpression(t)) return !0 + } + return !1 + } + function o(e, t) { + if ("in" === e.operator) { + if (E.isVariableDeclarator(t)) return !0 + if (E.isFor(t)) return !0 + } + return !1 + } + function u(e, t) { + return E.isForStatement(t) + ? !1 + : E.isExpressionStatement(t) && t.expression === e + ? !1 + : E.isReturnStatement(t) + ? !1 + : E.isThrowStatement(t) + ? !1 + : E.isSwitchStatement(t) && t.discriminant === e + ? !1 + : E.isWhileStatement(t) && t.test === e + ? !1 + : E.isIfStatement(t) && t.test === e + ? !1 + : !E.isForInStatement(t) || t.right !== e + } + function l(e, t) { + return ( + E.isBinary(t) || + E.isUnaryLike(t) || + E.isCallExpression(t) || + E.isMemberExpression(t) || + E.isNewExpression(t) + ) + } + function c(e, t) { + return E.isExpressionStatement(t) ? !0 : !!E.isExportDeclaration(t) + } + function p(e, t) { + return E.isMemberExpression(t, { object: e }) + ? !0 + : !( + !E.isCallExpression(t, { callee: e }) && + !E.isNewExpression(t, { callee: e }) + ) + } + function f(e, t, r) { + return E.isExpressionStatement(t) ? !0 : E.isExportDeclaration(t) ? !0 : y(r) + } + function h(e, t) { + return E.isExportDeclaration(t) + ? !0 + : E.isBinaryExpression(t) || E.isLogicalExpression(t) + ? !0 + : E.isUnaryExpression(t) + ? !0 + : p(e, t) + } + function d(e, t) { + return E.isUnaryLike(t) + ? !0 + : E.isBinary(t) + ? !0 + : E.isConditionalExpression(t, { test: e }) + ? !0 + : p(e, t) + } + function m(e) { + return E.isObjectPattern(e.left) ? !0 : d.apply(void 0, arguments) + } + function y(e) { + var t = arguments.length <= 1 || void 0 === arguments[1] ? !1 : arguments[1], + r = e.length - 1, + n = e[r] + r-- + for (var i = e[r]; r > 0; ) { + if (E.isExpressionStatement(i, { expression: n })) return !0 + if (t && E.isArrowFunctionExpression(i, { body: n })) return !0 + if ( + !( + E.isCallExpression(i, { callee: n }) || + (E.isSequenceExpression(i) && i.expressions[0] === n) || + E.isMemberExpression(i, { object: n }) || + E.isConditional(i, { test: n }) || + E.isBinary(i, { left: n }) || + E.isAssignmentExpression(i, { left: n }) + ) + ) + return !1 + ;(n = i), r--, (i = e[r]) + } + return !1 + } + var v = r(3)["default"] + ;(t.__esModule = !0), + (t.NullableTypeAnnotation = n), + (t.UpdateExpression = i), + (t.ObjectExpression = s), + (t.Binary = a), + (t.BinaryExpression = o), + (t.SequenceExpression = u), + (t.YieldExpression = l), + (t.ClassExpression = c), + (t.UnaryLike = p), + (t.FunctionExpression = f), + (t.ArrowFunctionExpression = h), + (t.ConditionalExpression = d), + (t.AssignmentExpression = m) + var g = r(16), + E = v(g), + b = { + "||": 0, + "&&": 1, + "|": 2, + "^": 3, + "&": 4, + "==": 5, + "===": 5, + "!=": 5, + "!==": 5, + "<": 6, + ">": 6, + "<=": 6, + ">=": 6, + in: 6, + instanceof: 6, + ">>": 7, + "<<": 7, + ">>>": 7, + "+": 8, + "-": 8, + "*": 9, + "/": 9, + "%": 9, + "**": 10 + } + ;(t.FunctionTypeAnnotation = n), (t.AwaitExpression = l) + }, + function(e, t, r) { + "use strict" + function n(e) { + var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1] + return ( + m.isMemberExpression(e) + ? (n(e.object, t), e.computed && n(e.property, t)) + : m.isBinary(e) || m.isAssignmentExpression(e) + ? (n(e.left, t), n(e.right, t)) + : m.isCallExpression(e) + ? ((t.hasCall = !0), n(e.callee, t)) + : m.isFunction(e) + ? (t.hasFunction = !0) + : m.isIdentifier(e) && (t.hasHelper = t.hasHelper || i(e.callee)), + t + ) + } + function i(e) { + return m.isMemberExpression(e) + ? i(e.object) || i(e.property) + : m.isIdentifier(e) + ? "require" === e.name || "_" === e.name[0] + : m.isCallExpression(e) + ? i(e.callee) + : m.isBinary(e) || m.isAssignmentExpression(e) + ? (m.isIdentifier(e.left) && i(e.left)) || i(e.right) + : !1 + } + function s(e) { + return ( + m.isLiteral(e) || + m.isObjectExpression(e) || + m.isArrayExpression(e) || + m.isIdentifier(e) || + m.isMemberExpression(e) + ) + } + var a = r(5)["default"], + o = r(3)["default"], + u = r(1414), + l = a(u), + c = r(811), + p = a(c), + f = r(2654), + h = a(f), + d = r(16), + m = o(d) + ;(t.nodes = { + AssignmentExpression: function(e) { + var t = n(e.right) + return (t.hasCall && t.hasHelper) || t.hasFunction + ? { before: t.hasFunction, after: !0 } + : void 0 + }, + SwitchCase: function(e, t) { + return { before: e.consequent.length || t.cases[0] === e } + }, + LogicalExpression: function(e) { + return m.isFunction(e.left) || m.isFunction(e.right) + ? { after: !0 } + : void 0 + }, + Literal: function(e) { + return "use strict" === e.value ? { after: !0 } : void 0 + }, + CallExpression: function(e) { + return m.isFunction(e.callee) || i(e) ? { before: !0, after: !0 } : void 0 + }, + VariableDeclaration: function(e) { + for (var t = 0; t < e.declarations.length; t++) { + var r = e.declarations[t], + a = i(r.id) && !s(r.init) + if (!a) { + var o = n(r.init) + a = (i(r.init) && o.hasCall) || o.hasFunction + } + if (a) return { before: !0, after: !0 } + } + }, + IfStatement: function(e) { + return m.isBlockStatement(e.consequent) ? { before: !0, after: !0 } : void 0 + } + }), + (t.nodes.ObjectProperty = t.nodes.ObjectMethod = t.nodes.SpreadProperty = function( + e, + t + ) { + return t.properties[0] === e ? { before: !0 } : void 0 + }), + (t.list = { + VariableDeclaration: function(e) { + return h["default"](e.declarations, "init") + }, + ArrayExpression: function(e) { + return e.elements + }, + ObjectExpression: function(e) { + return e.properties + } + }), + p["default"]( + { + Function: !0, + Class: !0, + Loop: !0, + LabeledStatement: !0, + SwitchStatement: !0, + TryStatement: !0 + }, + function(e, r) { + l["default"](e) && (e = { after: e, before: e }), + p["default"]([r].concat(m.FLIPPED_ALIAS_KEYS[r] || []), function( + r + ) { + t.nodes[r] = function() { + return e + } + }) + } + ) + }, + function(e, t, r) { + "use strict" + var n = r(80)["default"] + t.__esModule = !0 + var i = (function() { + function e() { + n(this, e), (this.line = 1), (this.column = 0) + } + return ( + (e.prototype.push = function(e) { + for (var t = 0; t < e.length; t++) + "\n" === e[t] ? (this.line++, (this.column = 0)) : this.column++ + }), + (e.prototype.unshift = function(e) { + for (var t = 0; t < e.length; t++) + "\n" === e[t] ? this.line-- : this.column-- + }), + e + ) + })() + ;(t["default"] = i), (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(374)["default"], + i = r(80)["default"], + s = r(796)["default"], + a = r(5)["default"], + o = r(3)["default"] + t.__esModule = !0 + var u = r(554), + l = a(u), + c = r(2534), + p = a(c), + f = r(1373), + h = o(f), + d = r(16), + m = o(d), + y = (function(e) { + function t() { + i(this, t) + for (var r = arguments.length, n = Array(r), s = 0; r > s; s++) + n[s] = arguments[s] + e.call.apply(e, [this].concat(n)), + (this.insideAux = !1), + (this.printAuxAfterOnNextUserNode = !1), + (this._printStack = []) + } + return ( + n(t, e), + (t.prototype.print = function(e, t) { + var r = + arguments.length <= 2 || void 0 === arguments[2] + ? {} + : arguments[2] + if (e) { + ;(this._lastPrintedIsEmptyStatement = !1), + t && t._compact && (e._compact = !0) + var n = this.insideAux + this.insideAux = !e.loc + var i = this.format.concise + e._compact && (this.format.concise = !0) + var s = this[e.type] + if (!s) + throw new ReferenceError( + "unknown node of type " + + JSON.stringify(e.type) + + " with constructor " + + JSON.stringify(e && e.constructor.name) + ) + this._printStack.push(e), + e.loc && this.printAuxAfterComment(), + this.printAuxBeforeComment(n) + var a = h.needsParens(e, t, this._printStack) + a && this.push("("), + this.printLeadingComments(e, t), + this.catchUp(e), + this._printNewline(!0, e, t, r), + r.before && r.before(), + this.map.mark(e), + this._print(e, t), + e.loc && this.printAuxAfterComment(), + this.printTrailingComments(e, t), + a && this.push(")"), + this._printStack.pop(), + t && this.map.mark(t), + r.after && r.after(), + (this.format.concise = i), + (this.insideAux = n), + this._printNewline(!1, e, t, r) + } + }), + (t.prototype.printAuxBeforeComment = function(e) { + var t = this.format.auxiliaryCommentBefore + e || + !this.insideAux || + this.printAuxAfterOnNextUserNode || + ((this.printAuxAfterOnNextUserNode = !0), + t && this.printComment({ type: "CommentBlock", value: t })) + }), + (t.prototype.printAuxAfterComment = function() { + if (this.printAuxAfterOnNextUserNode) { + this.printAuxAfterOnNextUserNode = !1 + var e = this.format.auxiliaryCommentAfter + e && this.printComment({ type: "CommentBlock", value: e }) + } + }), + (t.prototype.getPossibleRaw = function(e) { + var t = e.extra + return t && + null != t.raw && + null != t.rawValue && + e.value === t.rawValue + ? t.raw + : void 0 + }), + (t.prototype._print = function(e, t) { + if (!this.format.minified) { + var r = this.getPossibleRaw(e) + if (r) return this.push(""), void this._push(r) + } + var n = this[e.type] + n.call(this, e, t) + }), + (t.prototype.printJoin = function(e, t) { + var r = this, + n = + arguments.length <= 2 || void 0 === arguments[2] + ? {} + : arguments[2] + if (e && e.length) { + var i = e.length, + s = void 0, + a = void 0 + n.indent && this.indent() + var o = { + statement: n.statement, + addNewlines: n.addNewlines, + after: function() { + n.iterator && n.iterator(s, a), + n.separator && t.loc && r.printAuxAfterComment(), + n.separator && i - 1 > a && r.push(n.separator) + } + } + for (a = 0; a < e.length; a++) (s = e[a]), this.print(s, t, o) + n.indent && this.dedent() + } + }), + (t.prototype.printAndIndentOnComments = function(e, t) { + var r = !!e.leadingComments + r && this.indent(), this.print(e, t), r && this.dedent() + }), + (t.prototype.printBlock = function(e) { + var t = e.body + m.isEmptyStatement(t) || this.space(), this.print(t, e) + }), + (t.prototype.generateComment = function(e) { + var t = e.value + return (t = "CommentLine" === e.type ? "//" + t : "/*" + t + "*/") + }), + (t.prototype.printTrailingComments = function(e, t) { + this.printComments(this.getComments("trailingComments", e, t)) + }), + (t.prototype.printLeadingComments = function(e, t) { + this.printComments(this.getComments("leadingComments", e, t)) + }), + (t.prototype.printInnerComments = function(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? !0 + : arguments[1] + e.innerComments && + (t && this.indent(), + this.printComments(e.innerComments), + t && this.dedent()) + }), + (t.prototype.printSequence = function(e, t) { + var r = + arguments.length <= 2 || void 0 === arguments[2] + ? {} + : arguments[2] + return (r.statement = !0), this.printJoin(e, t, r) + }), + (t.prototype.printList = function(e, t) { + var r = + arguments.length <= 2 || void 0 === arguments[2] + ? {} + : arguments[2] + return ( + null == r.separator && + ((r.separator = ","), + this.format.compact || (r.separator += " ")), + this.printJoin(e, t, r) + ) + }), + (t.prototype._printNewline = function(e, t, r, n) { + if (n.statement || h.isUserWhitespacable(t, r)) { + var i = 0 + if ( + null != t.start && + !t._ignoreUserWhitespace && + this.tokens.length + ) + i = e + ? this.whitespace.getNewlinesBefore(t) + : this.whitespace.getNewlinesAfter(t) + else { + e || i++, n.addNewlines && (i += n.addNewlines(e, t) || 0) + var s = h.needsWhitespaceAfter + e && (s = h.needsWhitespaceBefore), + s(t, r) && i++, + this.buf || (i = 0) + } + this.newline(i) + } + }), + (t.prototype.getComments = function(e, t) { + return (t && t[e]) || [] + }), + (t.prototype.shouldPrintComment = function(e) { + return this.format.shouldPrintComment + ? this.format.shouldPrintComment(e.value) + : !this.format.minified && + (e.value.indexOf("@license") >= 0 || + e.value.indexOf("@preserve") >= 0) + ? !0 + : this.format.comments + }), + (t.prototype.printComment = function(e) { + if (this.shouldPrintComment(e) && !e.ignore) { + if (((e.ignore = !0), null != e.start)) { + if (this.printedCommentStarts[e.start]) return + this.printedCommentStarts[e.start] = !0 + } + this.catchUp(e), + this.newline(this.whitespace.getNewlinesBefore(e)) + var t = this.position.column, + r = this.generateComment(e) + if ( + (t && + !this.isLast(["\n", " ", "[", "{"]) && + (this._push(" "), t++), + "CommentBlock" === e.type && + this.format.indent.adjustMultilineComment) + ) { + var n = e.loc && e.loc.start.column + if (n) { + var i = new RegExp("\\n\\s{1," + n + "}", "g") + r = r.replace(i, "\n") + } + var s = Math.max(this.indentSize(), t) + r = r.replace(/\n/g, "\n" + l["default"](" ", s)) + } + 0 === t && (r = this.getIndent() + r), + (this.format.compact || + this.format.concise || + this.format.retainLines) && + "CommentLine" === e.type && + (r += "\n"), + this._push(r), + this.newline(this.whitespace.getNewlinesAfter(e)) + } + }), + (t.prototype.printComments = function(e) { + if (e && e.length) + for (var t = 0; t < e.length; t++) { + var r = e[t] + this.printComment(r) + } + }), + t + ) + })(p["default"]) + t["default"] = y + for ( + var v = [ + r(2543), + r(2537), + r(2542), + r(2536), + r(2540), + r(2541), + r(1371), + r(2538), + r(2535), + r(2539) + ], + g = 0; + g < v.length; + g++ + ) { + var E = v[g] + s(y.prototype, E) + } + e.exports = t["default"] + }, + function(e, t, r) { + "use strict" + function n(e, t) { + return e.line === t.line && e.column === t.column + } + var i = r(80)["default"], + s = r(5)["default"], + a = r(3)["default"] + t.__esModule = !0 + var o = r(1425), + u = s(o), + l = r(16), + c = a(l), + p = (function() { + function e(t, r, n) { + i(this, e), + (this.position = t), + (this.opts = r), + (this.last = { generated: {}, original: {} }), + r.sourceMaps + ? ((this.map = new u["default"].SourceMapGenerator({ + file: r.sourceMapTarget, + sourceRoot: r.sourceRoot + })), + this.map.setSourceContent(r.sourceFileName, n)) + : (this.map = null) + } + return ( + (e.prototype.get = function() { + var e = this.map + return e ? e.toJSON() : e + }), + (e.prototype.mark = function(e) { + var t = e.loc + if (t) { + var r = this.map + if (r && !c.isProgram(e) && !c.isFile(e)) { + var i = this.position, + s = { line: i.line, column: i.column }, + a = t.start + n(a, this.last.original) || + n(s, this.last.generated) || + ((this.last = { + source: this.opts.sourceFileName, + generated: s, + original: a + }), + r.addMapping(this.last)) + } + } + }), + e + ) + })() + ;(t["default"] = p), (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(80)["default"] + t.__esModule = !0 + var i = (function() { + function e(t) { + n(this, e), (this.tokens = t), (this.used = {}) + } + return ( + (e.prototype.getNewlinesBefore = function(e) { + var t = void 0, + r = void 0, + n = this.tokens, + i = this._findToken( + function(t) { + return t.start - e.start + }, + 0, + n.length + ) + if (i >= 0) { + for (; i && e.start === n[i - 1].start; ) --i + ;(t = n[i - 1]), (r = n[i]) + } + return this.getNewlinesBetween(t, r) + }), + (e.prototype.getNewlinesAfter = function(e) { + var t = void 0, + r = void 0, + n = this.tokens, + i = this._findToken( + function(t) { + return t.end - e.end + }, + 0, + n.length + ) + if (i >= 0) { + for (; i && e.end === n[i - 1].end; ) --i + ;(t = n[i]), (r = n[i + 1]), "," === r.type.label && (r = n[i + 2]) + } + if (r && "eof" === r.type.label) return 1 + var s = this.getNewlinesBetween(t, r) + return "CommentLine" !== e.type || s ? s : 1 + }), + (e.prototype.getNewlinesBetween = function(e, t) { + if (!t || !t.loc) return 0 + for ( + var r = e ? e.loc.end.line : 1, n = t.loc.start.line, i = 0, s = r; + n > s; + s++ + ) + "undefined" == typeof this.used[s] && ((this.used[s] = !0), i++) + return i + }), + (e.prototype._findToken = function(e, t, r) { + if (t >= r) return -1 + var n = (t + r) >>> 1, + i = e(this.tokens[n]) + return 0 > i + ? this._findToken(e, n + 1, r) + : i > 0 + ? this._findToken(e, t, n) + : 0 === i + ? n + : -1 + }), + e + ) + })() + ;(t["default"] = i), (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + function n(e) { + var t = 0, + r = 0, + n = 0 + for (var i in e) { + var s = e[i], + a = s[0], + o = s[1] + ;(a > r || (a === r && o > n)) && ((r = a), (n = o), (t = +i)) + } + return t + } + var i = r(554), + s = /^(?:( )+|\t+)/ + e.exports = function(e) { + if ("string" != typeof e) throw new TypeError("Expected a string") + var t, + r, + a = 0, + o = 0, + u = 0, + l = {} + e.split(/\n/g).forEach(function(e) { + if (e) { + var n, + i = e.match(s) + i ? ((n = i[0].length), i[1] ? o++ : a++) : (n = 0) + var c = n - u + ;(u = n), + c + ? ((r = c > 0), + (t = l[r ? c : -c]), + t ? t[0]++ : (t = l[c] = [1, 0])) + : t && (t[1] += +r) + } + }) + var c, + p, + f = n(l) + return ( + f + ? o >= a + ? ((c = "space"), (p = i(" ", f))) + : ((c = "tab"), (p = i(" ", f))) + : ((c = null), (p = "")), + { amount: f, type: c, indent: p } + ) + } + }, + function(e, t, r) { + var n = r(2552) + e.exports = + Number.isInteger || + function(e) { + return "number" == typeof e && n(e) && Math.floor(e) === e + } + }, + [7329, 2553], + 2533, + [7329, 2555], + 2533, + function(e, t) { + "use strict" + e.exports = function(e) { + for (var t = e.length; /[\s\uFEFF\u00A0]/.test(e[t - 1]); ) t-- + return e.slice(0, t) + } + }, + function(e, t, r) { + "use strict" + var n = r(5)["default"] + t.__esModule = !0 + var i = r(807), + s = n(i), + a = {} + ;(t["default"] = a), + (a["typeof"] = s["default"]( + '\n (typeof Symbol === "function" && typeof Symbol.iterator === "symbol")\n ? function (obj) { return typeof obj; }\n : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };\n' + )), + (a.jsx = s["default"]( + '\n (function () {\n var REACT_ELEMENT_TYPE = (typeof Symbol === "function" && Symbol.for && Symbol.for("react.element")) || 0xeac7;\n\n return function createRawReactElement (type, props, key, children) {\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n // If we\'re going to assign props.children, we create a new object now\n // to avoid mutating defaultProps.\n props = {};\n }\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = Array(childrenLength);\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : \'\' + key,\n ref: null,\n props: props,\n _owner: null,\n };\n };\n\n })()\n' + )), + (a.asyncToGenerator = s["default"]( + '\n (function (fn) {\n return function () {\n var gen = fn.apply(this, arguments);\n return new Promise(function (resolve, reject) {\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n return Promise.resolve(value).then(function (value) {\n return step("next", value);\n }, function (err) {\n return step("throw", err);\n });\n }\n }\n\n return step("next");\n });\n };\n })\n' + )), + (a.classCallCheck = s["default"]( + '\n (function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError("Cannot call a class as a function");\n }\n });\n' + )), + (a.createClass = s["default"]( + '\n (function() {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i ++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if ("value" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n })()\n' + )), + (a.defineEnumerableProperties = s["default"]( + '\n (function (obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if ("value" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n return obj;\n })\n' + )), + (a.defaults = s["default"]( + "\n (function (obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n return obj;\n })\n" + )), + (a.defineProperty = s["default"]( + "\n (function (obj, key, value) {\n // Shortcircuit the slow defineProperty path when possible.\n // We are trying to avoid issues where setters defined on the\n // prototype cause side effects under the fast path of simple\n // assignment. By checking for existence of the property with\n // the in operator, we can optimize most of this overhead away.\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n return obj;\n });\n" + )), + (a["extends"] = s["default"]( + "\n Object.assign || (function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n })\n" + )), + (a.get = s["default"]( + '\n (function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if ("value" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n });\n' + )), + (a.inherits = s["default"]( + '\n (function (subClass, superClass) {\n if (typeof superClass !== "function" && superClass !== null) {\n throw new TypeError("Super expression must either be null or a function, not " + typeof superClass);\n }\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n })\n' + )), + (a["instanceof"] = s["default"]( + '\n (function (left, right) {\n if (right != null && typeof Symbol !== "undefined" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n });\n' + )), + (a.interopRequireDefault = s["default"]( + "\n (function (obj) {\n return obj && obj.__esModule ? obj : { default: obj };\n })\n" + )), + (a.interopRequireWildcard = s["default"]( + "\n (function (obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];\n }\n }\n newObj.default = obj;\n return newObj;\n }\n })\n" + )), + (a.newArrowCheck = s["default"]( + '\n (function (innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError("Cannot instantiate an arrow function");\n }\n });\n' + )), + (a.objectDestructuringEmpty = s["default"]( + '\n (function (obj) {\n if (obj == null) throw new TypeError("Cannot destructure undefined");\n });\n' + )), + (a.objectWithoutProperties = s["default"]( + "\n (function (obj, keys) {\n var target = {};\n for (var i in obj) {\n if (keys.indexOf(i) >= 0) continue;\n if (!Object.prototype.hasOwnProperty.call(obj, i)) continue;\n target[i] = obj[i];\n }\n return target;\n })\n" + )), + (a.possibleConstructorReturn = s["default"]( + '\n (function (self, call) {\n if (!self) {\n throw new ReferenceError("this hasn\'t been initialised - super() hasn\'t been called");\n }\n return call && (typeof call === "object" || typeof call === "function") ? call : self;\n });\n' + )), + (a.selfGlobal = s["default"]( + '\n typeof global === "undefined" ? self : global\n' + )), + (a.set = s["default"]( + '\n (function set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n set(parent, property, value, receiver);\n }\n } else if ("value" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n });\n' + )), + (a.slicedToArray = s["default"]( + '\n (function () {\n // Broken out into a separate function to avoid deoptimizations due to the try/catch for the\n // array iterator case.\n function sliceIterator(arr, i) {\n // this is an expanded form of `for...of` that properly supports abrupt completions of\n // iterators etc. variable names have been minimised to reduce the size of this massive\n // helper. sometimes spec compliancy is annoying :(\n //\n // _n = _iteratorNormalCompletion\n // _d = _didIteratorError\n // _e = _iteratorError\n // _i = _iterator\n // _s = _step\n\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i["return"]) _i["return"]();\n } finally {\n if (_d) throw _e;\n }\n }\n return _arr;\n }\n\n return function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n return sliceIterator(arr, i);\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n };\n })();\n' + )), + (a.slicedToArrayLoose = s["default"]( + '\n (function (arr, i) {\n if (Array.isArray(arr)) {\n return arr;\n } else if (Symbol.iterator in Object(arr)) {\n var _arr = [];\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n if (i && _arr.length === i) break;\n }\n return _arr;\n } else {\n throw new TypeError("Invalid attempt to destructure non-iterable instance");\n }\n });\n' + )), + (a.taggedTemplateLiteral = s["default"]( + "\n (function (strings, raw) {\n return Object.freeze(Object.defineProperties(strings, {\n raw: { value: Object.freeze(raw) }\n }));\n });\n" + )), + (a.taggedTemplateLiteralLoose = s["default"]( + "\n (function (strings, raw) {\n strings.raw = raw;\n return strings;\n });\n" + )), + (a.temporalRef = s["default"]( + '\n (function (val, name, undef) {\n if (val === undef) {\n throw new ReferenceError(name + " is not defined - temporal dead zone");\n } else {\n return val;\n }\n })\n' + )), + (a.temporalUndefined = s["default"]("\n ({})\n")), + (a.toArray = s["default"]( + "\n (function (arr) {\n return Array.isArray(arr) ? arr : Array.from(arr);\n });\n" + )), + (a.toConsumableArray = s["default"]( + "\n (function (arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n return arr2;\n } else {\n return Array.from(arr);\n }\n });\n" + )), + (e.exports = t["default"]) + }, + function(e, t, r) { + e.exports = { default: r(2569), __esModule: !0 } + }, + [7332, 2570], + [7336, 2574], + [7337, 2575], + [7338, 2576], + [7340, 2578], + [7342, 2579], + [7343, 1375], + [7344, 2561, 2560, 1375], + 1937, + [7346, 1389, 1388, 2597], + function(e, t, r) { + r(1387), r(1388), r(1389), r(2599), r(2606), (e.exports = r(98).Map) + }, + [7347, 2600], + [7348, 2601, 98], + [7349, 81], + [7350, 81], + [7351, 81, 2602], + [7352, 81, 2603], + [7353, 806, 98], + [7354, 2604, 98], + [7355, 2605, 98], + [7356, 806, 98], + [7357, 806, 1387, 98], + function(e, t) { + e.exports = function(e) { + if ("function" != typeof e) throw TypeError(e + " is not a function!") + return e + } + }, + function(e, t) { + e.exports = function() {} + }, + function(e, t, r) { + "use strict" + var n = r(81), + i = r(467), + s = r(1381), + a = r(556), + o = r(1383), + u = r(557), + l = r(800), + c = r(801), + p = r(1379), + f = r(805)("id"), + h = r(558), + d = r(559), + m = r(2594), + y = r(464), + v = Object.isExtensible || d, + g = y ? "_s" : "size", + E = 0, + b = function(e, t) { + if (!d(e)) + return "symbol" == typeof e ? e : ("string" == typeof e ? "S" : "P") + e + if (!h(e, f)) { + if (!v(e)) return "F" + if (!t) return "E" + i(e, f, ++E) + } + return "O" + e[f] + }, + x = function(e, t) { + var r, + n = b(t) + if ("F" !== n) return e._i[n] + for (r = e._f; r; r = r.n) if (r.k == t) return r + } + e.exports = { + getConstructor: function(e, t, r, i) { + var c = e(function(e, s) { + o(e, c, t), + (e._i = n.create(null)), + (e._f = void 0), + (e._l = void 0), + (e[g] = 0), + void 0 != s && l(s, r, e[i], e) + }) + return ( + s(c.prototype, { + clear: function() { + for (var e = this, t = e._i, r = e._f; r; r = r.n) + (r.r = !0), r.p && (r.p = r.p.n = void 0), delete t[r.i] + ;(e._f = e._l = void 0), (e[g] = 0) + }, + delete: function(e) { + var t = this, + r = x(t, e) + if (r) { + var n = r.n, + i = r.p + delete t._i[r.i], + (r.r = !0), + i && (i.n = n), + n && (n.p = i), + t._f == r && (t._f = n), + t._l == r && (t._l = i), + t[g]-- + } + return !!r + }, + forEach: function(e) { + for ( + var t, + r = a( + e, + arguments.length > 1 ? arguments[1] : void 0, + 3 + ); + (t = t ? t.n : this._f); + + ) + for (r(t.v, t.k, this); t && t.r; ) t = t.p + }, + has: function(e) { + return !!x(this, e) + } + }), + y && + n.setDesc(c.prototype, "size", { + get: function() { + return u(this[g]) + } + }), + c + ) + }, + def: function(e, t, r) { + var n, + i, + s = x(e, t) + return ( + s + ? (s.v = r) + : ((e._l = s = { + i: (i = b(t, !0)), + k: t, + v: r, + p: (n = e._l), + n: void 0, + r: !1 + }), + e._f || (e._f = s), + n && (n.n = s), + e[g]++, + "F" !== i && (e._i[i] = s)), + e + ) + }, + getEntry: x, + setStrong: function(e, t, r) { + c( + e, + t, + function(e, t) { + ;(this._t = e), (this._k = t), (this._l = void 0) + }, + function() { + for (var e = this, t = e._k, r = e._l; r && r.r; ) r = r.p + return e._t && (e._l = r = r ? r.n : e._t._f) + ? "keys" == t + ? p(0, r.k) + : "values" == t + ? p(0, r.v) + : p(0, [r.k, r.v]) + : ((e._t = void 0), p(1)) + }, + r ? "entries" : "values", + !r, + !0 + ), + m(t) + } + } + }, + function(e, t, r) { + var n = r(800), + i = r(1376) + e.exports = function(e) { + return function() { + if (i(this) != e) throw TypeError(e + "#toJSON isn't generic") + var t = [] + return n(this, !1, t.push, t), t + } + } + }, + function(e, t, r) { + "use strict" + var n = r(81), + i = r(466), + s = r(177), + a = r(465), + o = r(467), + u = r(1381), + l = r(800), + c = r(1383), + p = r(559), + f = r(560), + h = r(464) + e.exports = function(e, t, r, d, m, y) { + var v = i[e], + g = v, + E = m ? "set" : "add", + b = g && g.prototype, + x = {} + return ( + h && + "function" == typeof g && + (y || + (b.forEach && + !a(function() { + new g().entries().next() + }))) + ? ((g = t(function(t, r) { + c(t, g, e), (t._c = new v()), void 0 != r && l(r, m, t[E], t) + })), + n.each.call( + "add,clear,delete,forEach,get,has,set,keys,values,entries".split( + "," + ), + function(e) { + var t = "add" == e || "set" == e + e in b && + (!y || "clear" != e) && + o(g.prototype, e, function(r, n) { + if (!t && y && !p(r)) return "get" == e ? void 0 : !1 + var i = this._c[e](0 === r ? 0 : r, n) + return t ? this : i + }) + } + ), + "size" in b && + n.setDesc(g.prototype, "size", { + get: function() { + return this._c.size + } + })) + : ((g = d.getConstructor(t, e, m, E)), u(g.prototype, r)), + f(g, e), + (x[e] = g), + s(s.G + s.W + s.F, x), + y || d.setStrong(g, e, m), + g + ) + } + }, + [7362, 81], + function(e, t, r) { + var n = r(468), + i = r(178)("iterator"), + s = Array.prototype + e.exports = function(e) { + return void 0 !== e && (n.Array === e || s[i] === e) + } + }, + [7367, 799], + function(e, t, r) { + var n = r(463) + e.exports = function(e, t, r, i) { + try { + return i ? t(n(r)[0], r[1]) : t(r) + } catch (s) { + var a = e["return"] + throw (void 0 !== a && n(a.call(e)), s) + } + } + }, + [7368, 81, 803, 560, 467, 178], + [7370, 81, 469], + [7371, 81, 1385, 1378, 465], + [7374, 81, 559, 463, 556], + function(e, t, r) { + "use strict" + var n = r(98), + i = r(81), + s = r(464), + a = r(178)("species") + e.exports = function(e) { + var t = n[e] + s && + t && + !t[a] && + i.setDesc(t, a, { + configurable: !0, + get: function() { + return this + } + }) + } + }, + [7377, 1384, 557], + function(e, t, r) { + var n = r(1384), + i = Math.min + e.exports = function(e) { + return e > 0 ? i(n(e), 9007199254740991) : 0 + } + }, + [7382, 463, 1386, 98], + [7383, 2582, 1379, 468, 469, 801], + function(e, t, r) { + "use strict" + var n = r(2583) + r(2585)( + "Map", + function(e) { + return function() { + return e(this, arguments.length > 0 ? arguments[0] : void 0) + } + }, + { + get: function(e) { + var t = n.getEntry(this, e) + return t && t.v + }, + set: function(e, t) { + return n.def(this, 0 === e ? 0 : e, t) + } + }, + n, + !0 + ) + }, + [7384, 177], + [7385, 177, 2592], + [7386, 469, 802], + [7387, 802, 1377], + [7388, 1385, 802], + [7389, 177, 2593], + function(e, t, r) { + var n = r(177) + n(n.P, "Map", { toJSON: r(2584)("Map") }) + }, + [7394, 80, 146, 5, 3, 308, 16], + [7397, 3, 5, 16, 308], + function(e, t) { + "use strict" + function r() { + var e = this.node + if (e) { + var t = e.trailingComments, + r = e.leadingComments + if (t || r) { + var n = this.getSibling(this.key - 1), + i = this.getSibling(this.key + 1) + n.node || (n = i), + i.node || (i = n), + n.addComments("trailing", r), + i.addComments("leading", t) + } + } + } + function n(e, t, r) { + this.addComments(e, [{ type: r ? "CommentLine" : "CommentBlock", value: t }]) + } + function i(e, t) { + if (t) { + var r = this.node + if (r) { + var n = e + "Comments" + r[n] ? (r[n] = r[n].concat(t)) : (r[n] = t) + } + } + } + ;(t.__esModule = !0), + (t.shareCommentsWithSiblings = r), + (t.addComment = n), + (t.addComments = i) + }, + [7398, 146, 5, 147], + [7399, 3, 16], + function(e, t) { + ;(function(e) { + "use strict" + function r() { + var e = this.evaluate() + return e.confident ? !!e.value : void 0 + } + function n() { + function t(e) { + n && ((a = e), (n = !1)) + } + function r(a) { + if (n) { + var o = a.node + if (a.isSequenceExpression()) { + var u = a.get("expressions") + return r(u[u.length - 1]) + } + if ( + a.isStringLiteral() || + a.isNumericLiteral() || + a.isBooleanLiteral() + ) + return o.value + if (a.isNullLiteral()) return null + if (a.isTemplateLiteral()) { + for ( + var l = "", + c = 0, + u = a.get("expressions"), + p = o.quasis, + f = 0; + f < p.length; + f++ + ) { + var h = p[f] + if (!n) break + l += h.value.cooked + var d = u[c++] + d && (l += String(r(d))) + } + if (!n) return + return l + } + if (a.isConditionalExpression()) { + var m = r(a.get("test")) + if (!n) return + return r(m ? a.get("consequent") : a.get("alternate")) + } + if (a.isExpressionWrapper()) return r(a.get("expression")) + if ( + a.isMemberExpression() && + !a.parentPath.isCallExpression({ callee: o }) + ) { + var y = a.get("property"), + v = a.get("object") + if (v.isLiteral() && y.isIdentifier()) { + var g = v.node.value, + E = typeof g + if ("number" === E || "string" === E) return g[y.node.name] + } + } + if (a.isReferencedIdentifier()) { + var b = a.scope.getBinding(o.name) + if (b && b.hasValue) return b.value + if ("undefined" === o.name) return + if ("Infinity" === o.name) return 1 / 0 + if ("NaN" === o.name) return NaN + var x = a.resolve() + return x === a ? t(a) : r(x) + } + if (a.isUnaryExpression({ prefix: !0 })) { + if ("void" === o.operator) return + var A = a.get("argument") + if ("typeof" === o.operator && (A.isFunction() || A.isClass())) + return "function" + var D = r(A) + if (!n) return + switch (o.operator) { + case "!": + return !D + case "+": + return +D + case "-": + return -D + case "~": + return ~D + case "typeof": + return typeof D + } + } + if (a.isArrayExpression()) { + for ( + var C = [], S = a.get("elements"), F = 0; + F < S.length; + F++ + ) { + var h = S[F] + if (((h = h.evaluate()), !h.confident)) return t(h) + C.push(h.value) + } + return C + } + if ((a.isObjectExpression(), a.isLogicalExpression())) { + var w = n, + _ = r(a.get("left")), + T = n + n = w + var P = r(a.get("right")), + B = n + switch (((n = T && B), o.operator)) { + case "||": + if (_ && T) return (n = !0), _ + if (!n) return + return _ || P + case "&&": + if ((((!_ && T) || (!P && B)) && (n = !0), !n)) return + return _ && P + } + } + if (a.isBinaryExpression()) { + var _ = r(a.get("left")) + if (!n) return + var P = r(a.get("right")) + if (!n) return + switch (o.operator) { + case "-": + return _ - P + case "+": + return _ + P + case "/": + return _ / P + case "*": + return _ * P + case "%": + return _ % P + case "**": + return Math.pow(_, P) + case "<": + return P > _ + case ">": + return _ > P + case "<=": + return P >= _ + case ">=": + return _ >= P + case "==": + return _ == P + case "!=": + return _ != P + case "===": + return _ === P + case "!==": + return _ !== P + case "|": + return _ | P + case "&": + return _ & P + case "^": + return _ ^ P + case "<<": + return _ << P + case ">>": + return _ >> P + case ">>>": + return _ >>> P + } + } + if (a.isCallExpression()) { + var k = a.get("callee"), + I = void 0, + O = void 0 + if ( + (k.isIdentifier() && + !a.scope.getBinding(k.node.name, !0) && + i.indexOf(k.node.name) >= 0 && + (O = e[o.callee.name]), + k.isMemberExpression()) + ) { + var v = k.get("object"), + y = k.get("property") + if ( + (v.isIdentifier() && + y.isIdentifier() && + i.indexOf(v.node.name) >= 0 && + s.indexOf(y.node.name) < 0 && + ((I = e[v.node.name]), (O = I[y.node.name])), + v.isLiteral() && y.isIdentifier()) + ) { + var E = typeof v.node.value + ;("string" !== E && "number" !== E) || + ((I = v.node.value), (O = I[y.node.name])) + } + } + if (O) { + var M = a.get("arguments").map(r) + if (!n) return + return O.apply(I, M) + } + } + t(a) + } + } + var n = !0, + a = void 0, + o = r(this) + return n || (o = void 0), { confident: n, deopt: a, value: o } + } + ;(t.__esModule = !0), (t.evaluateTruthy = r), (t.evaluate = n) + var i = ["String", "Number", "Math"], + s = ["random"] + }.call( + t, + (function() { + return this + })() + )) + }, + [7400, 5, 3, 308, 16], + [7402, 3, 2616, 16], + [7403, 3, 16], + [7404, 3, 798, 16, 2615], + [7405, 5, 3, 561, 16], + [7406, 80, 3, 16], + function(e, t) { + "use strict" + t.__esModule = !0 + var r = [ + function(e, t) { + return "body" === e.key && t.isArrowFunctionExpression() + ? (e.replaceWith(e.scope.buildUndefinedNode()), !0) + : void 0 + }, + function(e, t) { + var r = !1 + return ( + (r = r || ("test" === e.key && (t.isWhile() || t.isSwitchCase()))), + (r = r || ("declaration" === e.key && t.isExportDeclaration())), + (r = r || ("body" === e.key && t.isLabeledStatement())), + (r = + r || + ("declarations" === e.listKey && + t.isVariableDeclaration() && + 1 === t.node.declarations.length)), + (r = r || ("expression" === e.key && t.isExpressionStatement())), + r ? (t.remove(), !0) : void 0 + ) + }, + function(e, t) { + return t.isSequenceExpression() && 1 === t.node.expressions.length + ? (t.replaceWith(t.node.expressions[0]), !0) + : void 0 + }, + function(e, t) { + return t.isBinary() + ? ("left" === e.key + ? t.replaceWith(t.node.right) + : t.replaceWith(t.node.left), + !0) + : void 0 + } + ] + t.hooks = r + }, + [7408, 146, 5, 3, 1391, 2618, 308, 16], + [7409, 2619], + [7410, 5, 3, 1368, 147, 308, 810, 16], + [7413, 80, 5, 3, 1393, 16], + [7414, 462, 146, 3, 5, 1392, 176, 16, 564], + [7415, 7278], + function(e, t, r) { + "use strict" + var n = function(e, t, r, n, i, s, a, o) { + if (!e) { + var u + if (void 0 === t) + u = new Error( + "Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings." + ) + else { + var l = [r, n, i, s, a, o], + c = 0 + ;(u = new Error( + t.replace(/%s/g, function() { + return l[c++] + }) + )), + (u.name = "Invariant Violation") + } + throw ((u.framesToPop = 1), u) + } + } + e.exports = n + }, + [7328, 2628], + [7329, 2629], + 2533, + [7417, 2559, 5, 3, 1417, 1416, 1418, 819, 147, 16], + [7418, 3, 5, 16, 809, 179], + [7419, 5, 179], + [7420, 5, 179], + [7421, 5, 179], + [7423, 179, 2631, 2632, 2634, 2636, 2637, 2633], + [7424, 5, 179], + [7425, 5, 179], + [7426, 3, 16], + [7428, 3, 16], + [7430, 5, 3, 1394, 2643, 16, 809], + 2525, + [7325, 1395], + [7326, 2641, 1395, 2642], + function(e, t) { + "use strict" + e.exports = function r(e) { + function t() {} + ;(t.prototype = e), new t() + } + }, + function(e, t, r) { + ;(function(e) { + "use strict" + function n(t) { + return new e(t, "base64").toString() + } + function i(e) { + return e.split(",").pop() + } + function s(e, t) { + var r = p.exec(e) + p.lastIndex = 0 + var n = r[1] || r[2], + i = l.join(t, n) + try { + return u.readFileSync(i, "utf8") + } catch (s) { + throw new Error( + "An error occurred while trying to read the map file at " + + i + + "\n" + + s + ) + } + } + function a(e, t) { + ;(t = t || {}), + t.isFileComment && (e = s(e, t.commentFileDir)), + t.hasComment && (e = i(e)), + t.isEncoded && (e = n(e)), + (t.isJSON || t.isEncoded) && (e = JSON.parse(e)), + (this.sourcemap = e) + } + function o(e) { + for (var r, n = e.split("\n"), i = n.length - 1; i > 0; i--) + if (((r = n[i]), ~r.indexOf("sourceMappingURL=data:"))) + return t.fromComment(r) + } + var u = r(373), + l = r(175), + c = /^\s*\/(?:\/|\*)[@#]\s+sourceMappingURL=data:(?:application|text)\/json;(?:charset[:=]\S+;)?base64,(.*)$/gm, + p = /(?:\/\/[@#][ \t]+sourceMappingURL=([^\s'"]+?)[ \t]*$)|(?:\/\*[@#][ \t]+sourceMappingURL=([^\*]+?)[ \t]*(?:\*\/){1}[ \t]*$)/gm + ;(a.prototype.toJSON = function(e) { + return JSON.stringify(this.sourcemap, null, e) + }), + (a.prototype.toBase64 = function() { + var t = this.toJSON() + return new e(t).toString("base64") + }), + (a.prototype.toComment = function(e) { + var t = this.toBase64(), + r = "sourceMappingURL=data:application/json;base64," + t + return e && e.multiline ? "/*# " + r + " */" : "//# " + r + }), + (a.prototype.toObject = function() { + return JSON.parse(this.toJSON()) + }), + (a.prototype.addProperty = function(e, t) { + if (this.sourcemap.hasOwnProperty(e)) + throw new Error( + "property %s already exists on the sourcemap, use set property instead" + ) + return this.setProperty(e, t) + }), + (a.prototype.setProperty = function(e, t) { + return (this.sourcemap[e] = t), this + }), + (a.prototype.getProperty = function(e) { + return this.sourcemap[e] + }), + (t.fromObject = function(e) { + return new a(e) + }), + (t.fromJSON = function(e) { + return new a(e, { isJSON: !0 }) + }), + (t.fromBase64 = function(e) { + return new a(e, { isEncoded: !0 }) + }), + (t.fromComment = function(e) { + return ( + (e = e.replace(/^\/\*/g, "//").replace(/\*\/$/g, "")), + new a(e, { isEncoded: !0, hasComment: !0 }) + ) + }), + (t.fromMapFileComment = function(e, t) { + return new a(e, { commentFileDir: t, isFileComment: !0, isJSON: !0 }) + }), + (t.fromSource = function(e, r) { + if (r) { + var n = o(e) + return n ? n : null + } + var i = e.match(c) + return (c.lastIndex = 0), i ? t.fromComment(i.pop()) : null + }), + (t.fromMapFileSource = function(e, r) { + var n = e.match(p) + return (p.lastIndex = 0), n ? t.fromMapFileComment(n.pop(), r) : null + }), + (t.removeComments = function(e) { + return (c.lastIndex = 0), e.replace(c, "") + }), + (t.removeMapFileComments = function(e) { + return (p.lastIndex = 0), e.replace(p, "") + }), + (t.generateMapFileComment = function(e, t) { + var r = "sourceMappingURL=" + e + return t && t.multiline ? "/*# " + r + " */" : "//# " + r + }), + Object.defineProperty(t, "commentRegex", { + get: function() { + return (c.lastIndex = 0), c + } + }), + Object.defineProperty(t, "mapFileCommentRegex", { + get: function() { + return (p.lastIndex = 0), p + } + }) + }.call(t, r(2502).Buffer)) + }, + [7431, 1396], + function(e, t, r) { + ;(function(n) { + function i() { + var e = (n.env.DEBUG_COLORS || "").trim().toLowerCase() + return 0 === e.length + ? c.isatty(f) + : "0" !== e && "no" !== e && "false" !== e && "disabled" !== e + } + function s() { + var e = arguments, + r = this.useColors, + n = this.namespace + if (r) { + var i = this.color + e[0] = + " [3" + + i + + ";1m" + + n + + " " + + e[0] + + "[3" + + i + + "m +" + + t.humanize(this.diff) + + "" + } else e[0] = new Date().toUTCString() + " " + n + " " + e[0] + return e + } + function a() { + return h.write(p.format.apply(this, arguments) + "\n") + } + function o(e) { + null == e ? delete n.env.DEBUG : (n.env.DEBUG = e) + } + function u() { + return n.env.DEBUG + } + function l(e) { + var t, + i = n.binding("tty_wrap") + switch (i.guessHandleType(e)) { + case "TTY": + ;(t = new c.WriteStream(e)), + (t._type = "tty"), + t._handle && t._handle.unref && t._handle.unref() + break + case "FILE": + var s = r(373) + ;(t = new s.SyncWriteStream(e, { autoClose: !1 })), (t._type = "fs") + break + case "PIPE": + case "TCP": + var a = r(373) + ;(t = new a.Socket({ fd: e, readable: !1, writable: !0 })), + (t.readable = !1), + (t.read = null), + (t._type = "pipe"), + t._handle && t._handle.unref && t._handle.unref() + break + default: + throw new Error("Implement me. Unknown stream file type!") + } + return (t.fd = e), (t._isStdio = !0), t + } + var c = r(7314), + p = r(22) + ;(t = e.exports = r(1396)), + (t.log = a), + (t.formatArgs = s), + (t.save = o), + (t.load = u), + (t.useColors = i), + (t.colors = [6, 2, 3, 4, 5, 1]) + var f = parseInt(n.env.DEBUG_FD, 10) || 2, + h = 1 === f ? n.stdout : 2 === f ? n.stderr : l(f), + d = + 4 === p.inspect.length + ? function(e, t) { + return p.inspect(e, void 0, void 0, t) + } + : function(e, t) { + return p.inspect(e, { colors: t }) + } + ;(t.formatters.o = function(e) { + return d(e, this.useColors).replace(/\s*\n\s*/g, " ") + }), + t.enable(u()) + }.call(t, r(1))) + }, + function(e, t) { + function r(e) { + if (((e = "" + e), !(e.length > 1e4))) { + var t = /^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec( + e + ) + if (t) { + var r = parseFloat(t[1]), + n = (t[2] || "ms").toLowerCase() + switch (n) { + case "years": + case "year": + case "yrs": + case "yr": + case "y": + return r * c + case "days": + case "day": + case "d": + return r * l + case "hours": + case "hour": + case "hrs": + case "hr": + case "h": + return r * u + case "minutes": + case "minute": + case "mins": + case "min": + case "m": + return r * o + case "seconds": + case "second": + case "secs": + case "sec": + case "s": + return r * a + case "milliseconds": + case "millisecond": + case "msecs": + case "msec": + case "ms": + return r + } + } + } + } + function n(e) { + return e >= l + ? Math.round(e / l) + "d" + : e >= u + ? Math.round(e / u) + "h" + : e >= o + ? Math.round(e / o) + "m" + : e >= a + ? Math.round(e / a) + "s" + : e + "ms" + } + function i(e) { + return ( + s(e, l, "day") || + s(e, u, "hour") || + s(e, o, "minute") || + s(e, a, "second") || + e + " ms" + ) + } + function s(e, t, r) { + return t > e + ? void 0 + : 1.5 * t > e + ? Math.floor(e / t) + " " + r + : Math.ceil(e / t) + " " + r + "s" + } + var a = 1e3, + o = 60 * a, + u = 60 * o, + l = 24 * u, + c = 365.25 * l + e.exports = function(e, t) { + return (t = t || {}), "string" == typeof e ? r(e) : t["long"] ? i(e) : n(e) + } + }, + function(e, t, r) { + var n = t + ;(n.parse = (function() { + "use strict" + var e, + t, + r, + n, + i = { + "'": "'", + '"': '"', + "\\": "\\", + "/": "/", + "\n": "", + b: "\b", + f: "\f", + n: "\n", + r: "\r", + t: " " + }, + s = [" ", " ", "\r", "\n", "\x0B", "\f", " ", "\ufeff"], + a = function(t) { + var n = new SyntaxError() + throw ((n.message = t), (n.at = e), (n.text = r), n) + }, + o = function(n) { + return ( + n && n !== t && a("Expected '" + n + "' instead of '" + t + "'"), + (t = r.charAt(e)), + (e += 1), + t + ) + }, + u = function() { + return r.charAt(e) + }, + l = function() { + var e = t + for ( + "_" !== t && + "$" !== t && + ("a" > t || t > "z") && + ("A" > t || t > "Z") && + a("Bad identifier"); + o() && + ("_" === t || + "$" === t || + (t >= "a" && "z" >= t) || + (t >= "A" && "Z" >= t) || + (t >= "0" && "9" >= t)); + + ) + e += t + return e + }, + c = function() { + var e, + r = "", + n = "", + i = 10 + if ((("-" !== t && "+" !== t) || ((r = t), o(t)), "I" === t)) + return ( + (e = y()), + ("number" != typeof e || isNaN(e)) && + a("Unexpected word for number"), + "-" === r ? -e : e + ) + if ("N" === t) + return (e = y()), isNaN(e) || a("expected word to be NaN"), e + switch ( + ("0" === t && + ((n += t), + o(), + "x" === t || "X" === t + ? ((n += t), o(), (i = 16)) + : t >= "0" && "9" >= t && a("Octal literal")), + i) + ) { + case 10: + for (; t >= "0" && "9" >= t; ) (n += t), o() + if ("." === t) + for (n += "."; o() && t >= "0" && "9" >= t; ) n += t + if ("e" === t || "E" === t) + for ( + n += t, + o(), + ("-" !== t && "+" !== t) || ((n += t), o()); + t >= "0" && "9" >= t; + + ) + (n += t), o() + break + case 16: + for ( + ; + (t >= "0" && "9" >= t) || + (t >= "A" && "F" >= t) || + (t >= "a" && "f" >= t); + + ) + (n += t), o() + } + return (e = "-" === r ? -n : +n), isFinite(e) ? e : void a("Bad number") + }, + p = function() { + var e, + r, + n, + s, + l = "" + if ('"' === t || "'" === t) + for (n = t; o(); ) { + if (t === n) return o(), l + if ("\\" === t) + if ((o(), "u" === t)) { + for ( + s = 0, r = 0; + 4 > r && ((e = parseInt(o(), 16)), isFinite(e)); + r += 1 + ) + s = 16 * s + e + l += String.fromCharCode(s) + } else if ("\r" === t) "\n" === u() && o() + else { + if ("string" != typeof i[t]) break + l += i[t] + } + else { + if ("\n" === t) break + l += t + } + } + a("Bad string") + }, + f = function() { + "/" !== t && a("Not an inline comment") + do if ((o(), "\n" === t || "\r" === t)) return void o() + while (t) + }, + h = function() { + "*" !== t && a("Not a block comment") + do for (o(); "*" === t; ) if ((o("*"), "/" === t)) return void o("/") + while (t) + a("Unterminated block comment") + }, + d = function() { + "/" !== t && a("Not a comment"), + o("/"), + "/" === t ? f() : "*" === t ? h() : a("Unrecognized comment") + }, + m = function() { + for (; t; ) + if ("/" === t) d() + else { + if (!(s.indexOf(t) >= 0)) return + o() + } + }, + y = function() { + switch (t) { + case "t": + return o("t"), o("r"), o("u"), o("e"), !0 + case "f": + return o("f"), o("a"), o("l"), o("s"), o("e"), !1 + case "n": + return o("n"), o("u"), o("l"), o("l"), null + case "I": + return ( + o("I"), + o("n"), + o("f"), + o("i"), + o("n"), + o("i"), + o("t"), + o("y"), + 1 / 0 + ) + case "N": + return o("N"), o("a"), o("N"), NaN + } + a("Unexpected '" + t + "'") + }, + v = function() { + var e = [] + if ("[" === t) + for (o("["), m(); t; ) { + if ("]" === t) return o("]"), e + if ( + ("," === t ? a("Missing array element") : e.push(n()), + m(), + "," !== t) + ) + return o("]"), e + o(","), m() + } + a("Bad array") + }, + g = function() { + var e, + r = {} + if ("{" === t) + for (o("{"), m(); t; ) { + if ("}" === t) return o("}"), r + if ( + ((e = '"' === t || "'" === t ? p() : l()), + m(), + o(":"), + (r[e] = n()), + m(), + "," !== t) + ) + return o("}"), r + o(","), m() + } + a("Bad object") + } + return ( + (n = function() { + switch ((m(), t)) { + case "{": + return g() + case "[": + return v() + case '"': + case "'": + return p() + case "-": + case "+": + case ".": + return c() + default: + return t >= "0" && "9" >= t ? c() : y() + } + }), + function(i, s) { + var o + return ( + (r = String(i)), + (e = 0), + (t = " "), + (o = n()), + m(), + t && a("Syntax error"), + "function" == typeof s + ? (function u(e, t) { + var r, + n, + i = e[t] + if (i && "object" == typeof i) + for (r in i) + Object.prototype.hasOwnProperty.call(i, r) && + ((n = u(i, r)), + void 0 !== n ? (i[r] = n) : delete i[r]) + return s.call(e, t, i) + })({ "": o }, "") + : o + ) + } + ) + })()), + (n.stringify = function(e, t, r) { + function i(e) { + return ( + (e >= "a" && "z" >= e) || + (e >= "A" && "Z" >= e) || + (e >= "0" && "9" >= e) || + "_" === e || + "$" === e + ) + } + function s(e) { + return ( + (e >= "a" && "z" >= e) || + (e >= "A" && "Z" >= e) || + "_" === e || + "$" === e + ) + } + function a(e) { + if ("string" != typeof e) return !1 + if (!s(e[0])) return !1 + for (var t = 1, r = e.length; r > t; ) { + if (!i(e[t])) return !1 + t++ + } + return !0 + } + function o(e) { + return Array.isArray + ? Array.isArray(e) + : "[object Array]" === Object.prototype.toString.call(e) + } + function u(e) { + return "[object Date]" === Object.prototype.toString.call(e) + } + function l(e) { + for (var t = 0; t < m.length; t++) + if (m[t] === e) + throw new TypeError("Converting circular structure to JSON") + } + function c(e, t, r) { + if (!e) return "" + e.length > 10 && (e = e.substring(0, 10)) + for (var n = r ? "" : "\n", i = 0; t > i; i++) n += e + return n + } + function p(e) { + return ( + (y.lastIndex = 0), + y.test(e) + ? '"' + + e.replace(y, function(e) { + var t = v[e] + return "string" == typeof t + ? t + : "\\u" + + ("0000" + e.charCodeAt(0).toString(16)).slice( + -4 + ) + }) + + '"' + : '"' + e + '"' + ) + } + function f(e, t, r) { + var n, + i, + s = h(e, t, r) + switch ((s && !u(s) && (s = s.valueOf()), typeof s)) { + case "boolean": + return s.toString() + case "number": + return isNaN(s) || !isFinite(s) ? "null" : s.toString() + case "string": + return p(s.toString()) + case "object": + if (null === s) return "null" + if (o(s)) { + l(s), (n = "["), m.push(s) + for (var y = 0; y < s.length; y++) + (i = f(s, y, !1)), + (n += c(d, m.length)), + (n += + null === i || "undefined" == typeof i + ? "null" + : i), + y < s.length - 1 ? (n += ",") : d && (n += "\n") + m.pop(), (n += c(d, m.length, !0) + "]") + } else { + l(s), (n = "{") + var v = !1 + m.push(s) + for (var g in s) + if (s.hasOwnProperty(g)) { + var E = f(s, g, !1) + if ( + ((r = !1), + "undefined" != typeof E && null !== E) + ) { + ;(n += c(d, m.length)), (v = !0) + var t = a(g) ? g : p(g) + n += t + ":" + (d ? " " : "") + E + "," + } + } + m.pop(), + (n = v + ? n.substring(0, n.length - 1) + + c(d, m.length) + + "}" + : "{}") + } + return n + default: + return + } + } + if (t && "function" != typeof t && !o(t)) + throw new Error("Replacer must be a function or an array") + var h = function(e, r, n) { + var i = e[r] + return ( + i && i.toJSON && "function" == typeof i.toJSON && (i = i.toJSON()), + "function" == typeof t + ? t.call(e, r, i) + : t + ? n || o(e) || t.indexOf(r) >= 0 + ? i + : void 0 + : i + ) + } + ;(n.isWord = a), + (isNaN = + isNaN || + function(e) { + return "number" == typeof e && e !== e + }) + var d, + m = [] + r && + ("string" == typeof r + ? (d = r) + : "number" == typeof r && r >= 0 && (d = c(" ", r, !0))) + var y = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, + v = { + "\b": "\\b", + " ": "\\t", + "\n": "\\n", + "\f": "\\f", + "\r": "\\r", + '"': '\\"', + "\\": "\\\\" + }, + g = { "": e } + return void 0 === e ? h(g, "", !0) : f(g, "", !0) + }) + }, + function(e, t) { + function r(e) { + for (var t = -1, r = e ? e.length : 0, n = -1, i = []; ++t < r; ) { + var s = e[t] + s && (i[++n] = s) + } + return i + } + e.exports = r + }, + [7433, 813, 2671, 471, 2692], + function(e, t, r) { + e.exports = r(561) + }, + [7435, 812, 1403, 2681], + function(e, t, r) { + function n(e, t, r) { + var n = o(e) ? i : a + return (t = s(t, r, 3)), n(e, t) + } + var i = r(2657), + s = r(813), + a = r(1408), + o = r(94) + e.exports = n + }, + function(e, t, r) { + function n(e, t, r) { + if (null == e) return [] + r && u(e, t, r) && (t = void 0) + var n = -1 + t = i(t, r, 3) + var l = s(e, function(e, r, i) { + return { criteria: t(e, r, i), index: ++n, value: e } + }) + return a(l, o) + } + var i = r(813), + s = r(1408), + a = r(2670), + o = r(2676), + u = r(471) + e.exports = n + }, + [7437, 2675, 562], + function(e, t) { + function r(e, t) { + for (var r = -1, n = e.length, i = Array(n); ++r < n; ) i[r] = t(e[r], r, e) + return i + } + e.exports = r + }, + function(e, t) { + function r(e, t) { + for (var r = -1, n = e.length; ++r < n; ) if (t(e[r], r, e)) return !0 + return !1 + } + e.exports = r + }, + function(e, t) { + function r(e, t) { + return void 0 === e ? t : e + } + e.exports = r + }, + [7438, 309], + function(e, t) { + function r(e, t) { + if (e !== t) { + var r = null === e, + n = void 0 === e, + i = e === e, + s = null === t, + a = void 0 === t, + o = t === t + if ((e > t && !s) || !i || (r && !a && o) || (n && o)) return 1 + if ((t > e && !r) || !o || (s && !n && i) || (a && i)) return -1 + } + return 0 + } + e.exports = r + }, + [7444, 1404, 821], + [7449, 2682, 2683, 2684, 94, 820], + [7450, 1407, 181], + [7451, 2664, 2686, 181], + [7452, 814, 1407, 1410, 94, 817, 1412, 1397, 181, 818], + function(e, t, r) { + function n(e, t, r, f, h) { + if (!u(e)) return e + var d = o(t) && (a(t) || c(t)), + m = d ? void 0 : p(t) + return ( + i(m || t, function(i, a) { + if ((m && ((a = i), (i = t[a])), l(i))) + f || (f = []), h || (h = []), s(e, t, a, n, r, f, h) + else { + var o = e[a], + u = r ? r(o, i, a, e, t) : void 0, + c = void 0 === u + c && (u = i), + (void 0 === u && (!d || a in e)) || + (!c && (u === u ? u === o : o !== o)) || + (e[a] = u) + } + }), + e + ) + } + var i = r(812), + s = r(2668), + a = r(94), + o = r(375), + u = r(99), + l = r(148), + c = r(820), + p = r(309) + e.exports = n + }, + function(e, t, r) { + function n(e, t, r, n, p, f, h) { + for (var d = f.length, m = t[r]; d--; ) if (f[d] == m) return void (e[r] = h[d]) + var y = e[r], + v = p ? p(y, m, r, e, t) : void 0, + g = void 0 === v + g && + ((v = m), + o(m) && (a(m) || l(m)) + ? (v = a(y) ? y : o(y) ? i(y) : []) + : u(m) || s(m) + ? (v = s(y) ? c(y) : u(y) ? y : {}) + : (g = !1)), + f.push(m), + h.push(v), + g ? (e[r] = n(v, m, p, f, h)) : (v === v ? v !== y : y === y) && (e[r] = v) + } + var i = r(1399), + s = r(472), + a = r(94), + o = r(375), + u = r(1417), + l = r(820), + c = r(2694) + e.exports = n + }, + [7453, 814, 818], + function(e, t) { + function r(e, t) { + var r = e.length + for (e.sort(t); r--; ) e[r] = e[r].value + return e + } + e.exports = r + }, + [7454, 1406, 2674, 2679], + function(e, t) { + function r(e, t) { + for (var r = -1, n = t.length, i = Array(n); ++r < n; ) i[r] = e[t[r]] + return i + } + e.exports = r + }, + function(e, t) { + ;(function(t) { + function r(e) { + var t = new n(e.byteLength), + r = new i(t) + return r.set(new i(e)), t + } + var n = t.ArrayBuffer, + i = t.Uint8Array + e.exports = r + }.call( + t, + (function() { + return this + })() + )) + }, + [7456, 99], + [7457, 99], + function(e, t, r) { + function n(e, t) { + return i(e.criteria, t.criteria) || e.index - t.index + } + var i = r(2661) + e.exports = n + }, + [7459, 816, 180, 181], + [7460, 181], + [7461, 2656, 562], + [7462, 1398], + [7463, 470, 94], + [7464, 2658], + function(e, t) { + function r(e, t, r) { + switch (r) { + case n: + case i: + return +e == +t + case s: + return e.name == t.name && e.message == t.message + case a: + return e != +e ? t != +t : e == +t + case o: + case u: + return e == t + "" + } + return !1 + } + var n = "[object Boolean]", + i = "[object Date]", + s = "[object Error]", + a = "[object Number]", + o = "[object RegExp]", + u = "[object String]" + e.exports = r + }, + [7465, 309], + function(e, t) { + function r(e, t, r) { + return t ? (e = n[e]) : r && (e = i[e]), "\\" + e + } + var n = { + 0: "x30", + 1: "x31", + 2: "x32", + 3: "x33", + 4: "x34", + 5: "x35", + 6: "x36", + 7: "x37", + 8: "x38", + 9: "x39", + A: "x41", + B: "x42", + C: "x43", + D: "x44", + E: "x45", + F: "x46", + a: "x61", + b: "x62", + c: "x63", + d: "x64", + e: "x65", + f: "x66", + n: "x6e", + r: "x72", + t: "x74", + u: "x75", + v: "x76", + x: "x78" + }, + i = { + "\\": "\\", + "'": "'", + "\n": "n", + "\r": "r", + "\u2028": "u2028", + "\u2029": "u2029" + } + e.exports = r + }, + [7467, 1412, 2697], + function(e, t) { + function r(e, t, r) { + for (var n = e.length, i = t + (r ? 0 : -1); r ? i-- : ++i < n; ) { + var s = e[i] + if (s !== s) return i + } + return -1 + } + e.exports = r + }, + function(e, t) { + function r(e) { + var t = e.length, + r = new e.constructor(t) + return ( + t && + "string" == typeof e[0] && + i.call(e, "index") && + ((r.index = e.index), (r.input = e.input)), + r + ) + } + var n = Object.prototype, + i = n.hasOwnProperty + e.exports = r + }, + [7469, 2673], + function(e, t) { + function r(e) { + var t = e.constructor + return ("function" == typeof t && t instanceof t) || (t = Object), new t() + } + e.exports = r + }, + [7474, 472, 94, 563, 180, 821], + function(e, t) { + function r(e, t) { + for (var r, n = -1, i = e.length, s = -1, a = []; ++n < i; ) { + var o = e[n], + u = t ? t(o, n, e) : o + ;(n && r === u) || ((r = u), (a[++s] = o)) + } + return a + } + e.exports = r + }, + [7482, 1415, 148], + function(e, t, r) { + function n(e) { + return i(e, s(e)) + } + var i = r(1402), + s = r(821) + e.exports = n + }, + [7490, 814, 1410, 472, 94, 563, 817, 180, 1397, 818], + function(e, t, r) { + var n = r(2667), + i = r(1411), + s = i(n) + e.exports = s + }, + [7493, 309, 181], + [7494, 2672, 309], + function(e, t, r) { + function n(e) { + return (e = i(e)), e && o.test(e) ? e.replace(a, s) : e || "(?:)" + } + var i = r(815), + s = r(2685), + a = /^[:!,]|[\\^$.*+?()[\]{}|\/]|(^[0-9a-fA-Fnrtuvx])|([\n\r\u2028\u2029])/g, + o = RegExp(a.source) + e.exports = n + }, + function(e, t, r) { + function n(e, t, r) { + return ( + (e = i(e)), + (r = null == r ? 0 : s(0 > r ? 0 : +r || 0, e.length)), + e.lastIndexOf(t, r) == r + ) + } + var i = r(815), + s = Math.min + e.exports = n + }, + [7495, 1409, 2669, 817], + function(e, t, r) { + function n(e) { + return e.split("").reduce(function(e, t) { + return (e[t] = !0), e + }, {}) + } + function i(e, t) { + return ( + (t = t || {}), + function(r, n, i) { + return a(r, e, t) + } + ) + } + function s(e, t) { + ;(e = e || {}), (t = t || {}) + var r = {} + return ( + Object.keys(t).forEach(function(e) { + r[e] = t[e] + }), + Object.keys(e).forEach(function(t) { + r[t] = e[t] + }), + r + ) + } + function a(e, t, r) { + if ("string" != typeof t) throw new TypeError("glob pattern string required") + return ( + r || (r = {}), + r.nocomment || "#" !== t.charAt(0) + ? "" === t.trim() + ? "" === e + : new o(t, r).match(e) + : !1 + ) + } + function o(e, t) { + if (!(this instanceof o)) return new o(e, t) + if ("string" != typeof e) throw new TypeError("glob pattern string required") + t || (t = {}), + (e = e.trim()), + "/" !== y.sep && (e = e.split(y.sep).join("/")), + (this.options = t), + (this.set = []), + (this.pattern = e), + (this.regexp = null), + (this.negate = !1), + (this.comment = !1), + (this.empty = !1), + this.make() + } + function u() { + if (!this._made) { + var e = this.pattern, + t = this.options + if (!t.nocomment && "#" === e.charAt(0)) return void (this.comment = !0) + if (!e) return void (this.empty = !0) + this.parseNegate() + var r = (this.globSet = this.braceExpand()) + t.debug && (this.debug = console.error), + this.debug(this.pattern, r), + (r = this.globParts = r.map(function(e) { + return e.split(S) + })), + this.debug(this.pattern, r), + (r = r.map(function(e, t, r) { + return e.map(this.parse, this) + }, this)), + this.debug(this.pattern, r), + (r = r.filter(function(e) { + return -1 === e.indexOf(!1) + })), + this.debug(this.pattern, r), + (this.set = r) + } + } + function l() { + var e = this.pattern, + t = !1, + r = this.options, + n = 0 + if (!r.nonegate) { + for (var i = 0, s = e.length; s > i && "!" === e.charAt(i); i++) + (t = !t), n++ + n && (this.pattern = e.substr(n)), (this.negate = t) + } + } + function c(e, t) { + if ( + (t || (t = this instanceof o ? this.options : {}), + (e = "undefined" == typeof e ? this.pattern : e), + "undefined" == typeof e) + ) + throw new Error("undefined pattern") + return t.nobrace || !e.match(/\{.*\}/) ? [e] : E(e) + } + function p(e, t) { + function r() { + if (s) { + switch (s) { + case "*": + ;(o += x), (u = !0) + break + case "?": + ;(o += b), (u = !0) + break + default: + o += "\\" + s + } + v.debug("clearStateChar %j %j", s, o), (s = !1) + } + } + var n = this.options + if (!n.noglobstar && "**" === e) return g + if ("" === e) return "" + for ( + var i, + s, + a, + o = "", + u = !!n.nocase, + l = !1, + c = [], + p = [], + f = !1, + h = -1, + m = -1, + y = + "." === e.charAt(0) + ? "" + : n.dot + ? "(?!(?:^|\\/)\\.{1,2}(?:$|\\/))" + : "(?!\\.)", + v = this, + E = 0, + A = e.length; + A > E && (a = e.charAt(E)); + E++ + ) + if ((this.debug("%s %s %s %j", e, E, o, a), l && C[a])) + (o += "\\" + a), (l = !1) + else + switch (a) { + case "/": + return !1 + case "\\": + r(), (l = !0) + continue + case "?": + case "*": + case "+": + case "@": + case "!": + if ((this.debug("%s %s %s %j <-- stateChar", e, E, o, a), f)) { + this.debug(" in class"), + "!" === a && E === m + 1 && (a = "^"), + (o += a) + continue + } + v.debug("call clearStateChar %j", s), + r(), + (s = a), + n.noext && r() + continue + case "(": + if (f) { + o += "(" + continue + } + if (!s) { + o += "\\(" + continue + } + ;(i = s), + c.push({ type: i, start: E - 1, reStart: o.length }), + (o += "!" === s ? "(?:(?!(?:" : "(?:"), + this.debug("plType %j %j", s, o), + (s = !1) + continue + case ")": + if (f || !c.length) { + o += "\\)" + continue + } + r(), (u = !0), (o += ")") + var D = c.pop() + switch ((i = D.type)) { + case "!": + p.push(D), (o += ")[^/]*?)"), (D.reEnd = o.length) + break + case "?": + case "+": + case "*": + o += i + break + case "@": + } + continue + case "|": + if (f || !c.length || l) { + ;(o += "\\|"), (l = !1) + continue + } + r(), (o += "|") + continue + case "[": + if ((r(), f)) { + o += "\\" + a + continue + } + ;(f = !0), (m = E), (h = o.length), (o += a) + continue + case "]": + if (E === m + 1 || !f) { + ;(o += "\\" + a), (l = !1) + continue + } + if (f) { + var S = e.substring(m + 1, E) + try { + RegExp("[" + S + "]") + } catch (w) { + var _ = this.parse(S, F) + ;(o = o.substr(0, h) + "\\[" + _[0] + "\\]"), + (u = u || _[1]), + (f = !1) + continue + } + } + ;(u = !0), (f = !1), (o += a) + continue + default: + r(), + l ? (l = !1) : !C[a] || ("^" === a && f) || (o += "\\"), + (o += a) + } + for ( + f && + ((S = e.substr(m + 1)), + (_ = this.parse(S, F)), + (o = o.substr(0, h) + "\\[" + _[0]), + (u = u || _[1])), + D = c.pop(); + D; + D = c.pop() + ) { + var T = o.slice(D.reStart + 3) + ;(T = T.replace(/((?:\\{2})*)(\\?)\|/g, function(e, t, r) { + return r || (r = "\\"), t + t + r + "|" + })), + this.debug("tail=%j\n %s", T, T) + var P = "*" === D.type ? x : "?" === D.type ? b : "\\" + D.type + ;(u = !0), (o = o.slice(0, D.reStart) + P + "\\(" + T) + } + r(), l && (o += "\\\\") + var B = !1 + switch (o.charAt(0)) { + case ".": + case "[": + case "(": + B = !0 + } + for (var k = p.length - 1; k > -1; k--) { + var I = p[k], + O = o.slice(0, I.reStart), + M = o.slice(I.reStart, I.reEnd - 8), + R = o.slice(I.reEnd - 8, I.reEnd), + L = o.slice(I.reEnd) + R += L + var N = O.split("(").length - 1, + j = L + for (E = 0; N > E; E++) j = j.replace(/\)[+*?]?/, "") + L = j + var U = "" + "" === L && t !== F && (U = "$") + var V = O + M + L + U + R + o = V + } + if (("" !== o && u && (o = "(?=.)" + o), B && (o = y + o), t === F)) + return [o, u] + if (!u) return d(e) + var G = n.nocase ? "i" : "", + W = new RegExp("^" + o + "$", G) + return (W._glob = e), (W._src = o), W + } + function f() { + if (this.regexp || this.regexp === !1) return this.regexp + var e = this.set + if (!e.length) return (this.regexp = !1), this.regexp + var t = this.options, + r = t.noglobstar ? x : t.dot ? A : D, + n = t.nocase ? "i" : "", + i = e + .map(function(e) { + return e + .map(function(e) { + return e === g ? r : "string" == typeof e ? m(e) : e._src + }) + .join("\\/") + }) + .join("|") + ;(i = "^(?:" + i + ")$"), this.negate && (i = "^(?!" + i + ").*$") + try { + this.regexp = new RegExp(i, n) + } catch (s) { + this.regexp = !1 + } + return this.regexp + } + function h(e, t) { + if ((this.debug("match", e, this.pattern), this.comment)) return !1 + if (this.empty) return "" === e + if ("/" === e && t) return !0 + var r = this.options + "/" !== y.sep && (e = e.split(y.sep).join("/")), + (e = e.split(S)), + this.debug(this.pattern, "split", e) + var n = this.set + this.debug(this.pattern, "set", n) + var i, s + for (s = e.length - 1; s >= 0 && !(i = e[s]); s--); + for (s = 0; s < n.length; s++) { + var a = n[s], + o = e + r.matchBase && 1 === a.length && (o = [i]) + var u = this.matchOne(o, a, t) + if (u) return r.flipNegate ? !0 : !this.negate + } + return r.flipNegate ? !1 : this.negate + } + function d(e) { + return e.replace(/\\(.)/g, "$1") + } + function m(e) { + return e.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&") + } + ;(e.exports = a), (a.Minimatch = o) + var y = { sep: "/" } + try { + y = r(175) + } catch (v) {} + var g = (a.GLOBSTAR = o.GLOBSTAR = {}), + E = r(2703), + b = "[^/]", + x = b + "*?", + A = "(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?", + D = "(?:(?!(?:\\/|^)\\.).)*?", + C = n("().*{}+?[]^$\\!"), + S = /\/+/ + ;(a.filter = i), + (a.defaults = function(e) { + if (!e || !Object.keys(e).length) return a + var t = a, + r = function(r, n, i) { + return t.minimatch(r, n, s(e, i)) + } + return ( + (r.Minimatch = function(r, n) { + return new t.Minimatch(r, s(e, n)) + }), + r + ) + }), + (o.defaults = function(e) { + return e && Object.keys(e).length ? a.defaults(e).Minimatch : o + }), + (o.prototype.debug = function() {}), + (o.prototype.make = u), + (o.prototype.parseNegate = l), + (a.braceExpand = function(e, t) { + return c(e, t) + }), + (o.prototype.braceExpand = c), + (o.prototype.parse = p) + var F = {} + ;(a.makeRe = function(e, t) { + return new o(e, t || {}).makeRe() + }), + (o.prototype.makeRe = f), + (a.match = function(e, t, r) { + r = r || {} + var n = new o(t, r) + return ( + (e = e.filter(function(e) { + return n.match(e) + })), + n.options.nonull && !e.length && e.push(t), + e + ) + }), + (o.prototype.match = h), + (o.prototype.matchOne = function(e, t, r) { + var n = this.options + this.debug("matchOne", { this: this, file: e, pattern: t }), + this.debug("matchOne", e.length, t.length) + for ( + var i = 0, s = 0, a = e.length, o = t.length; + a > i && o > s; + i++, s++ + ) { + this.debug("matchOne loop") + var u = t[s], + l = e[i] + if ((this.debug(t, u, l), u === !1)) return !1 + if (u === g) { + this.debug("GLOBSTAR", [t, u, l]) + var c = i, + p = s + 1 + if (p === o) { + for (this.debug("** at the end"); a > i; i++) + if ( + "." === e[i] || + ".." === e[i] || + (!n.dot && "." === e[i].charAt(0)) + ) + return !1 + return !0 + } + for (; a > c; ) { + var f = e[c] + if ( + (this.debug("\nglobstar while", e, c, t, p, f), + this.matchOne(e.slice(c), t.slice(p), r)) + ) + return this.debug("globstar found match!", c, a, f), !0 + if ( + "." === f || + ".." === f || + (!n.dot && "." === f.charAt(0)) + ) { + this.debug("dot detected!", e, c, t, p) + break + } + this.debug("globstar swallow a segment, and continue"), c++ + } + return !( + !r || + (this.debug("\n>>> no match, partial?", e, c, t, p), c !== a) + ) + } + var h + if ( + ("string" == typeof u + ? ((h = n.nocase + ? l.toLowerCase() === u.toLowerCase() + : l === u), + this.debug("string match", u, l, h)) + : ((h = l.match(u)), this.debug("pattern match", u, l, h)), + !h) + ) + return !1 + } + if (i === a && s === o) return !0 + if (i === a) return r + if (s === o) { + var d = i === a - 1 && "" === e[i] + return d + } + throw new Error("wtf?") + }) + }, + function(e, t, r) { + function n(e) { + return parseInt(e, 10) == e ? parseInt(e, 10) : e.charCodeAt(0) + } + function i(e) { + return e + .split("\\\\") + .join(m) + .split("\\{") + .join(y) + .split("\\}") + .join(v) + .split("\\,") + .join(g) + .split("\\.") + .join(E) + } + function s(e) { + return e + .split(m) + .join("\\") + .split(y) + .join("{") + .split(v) + .join("}") + .split(g) + .join(",") + .split(E) + .join(".") + } + function a(e) { + if (!e) return [""] + var t = [], + r = d("{", "}", e) + if (!r) return e.split(",") + var n = r.pre, + i = r.body, + s = r.post, + o = n.split(",") + o[o.length - 1] += "{" + i + "}" + var u = a(s) + return ( + s.length && ((o[o.length - 1] += u.shift()), o.push.apply(o, u)), + t.push.apply(t, o), + t + ) + } + function o(e) { + return e ? f(i(e), !0).map(s) : [] + } + function u(e) { + return "{" + e + "}" + } + function l(e) { + return /^-?0\d/.test(e) + } + function c(e, t) { + return t >= e + } + function p(e, t) { + return e >= t + } + function f(e, t) { + var r = [], + i = d("{", "}", e) + if (!i || /\$$/.test(i.pre)) return [e] + var s = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(i.body), + o = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(i.body), + m = s || o, + y = /^(.*,)+(.+)?$/.test(i.body) + if (!m && !y) + return i.post.match(/,.*\}/) + ? ((e = i.pre + "{" + i.body + v + i.post), f(e)) + : [e] + var g + if (m) g = i.body.split(/\.\./) + else if ( + ((g = a(i.body)), + 1 === g.length && ((g = f(g[0], !1).map(u)), 1 === g.length)) + ) { + var E = i.post.length ? f(i.post, !1) : [""] + return E.map(function(e) { + return i.pre + g[0] + e + }) + } + var b, + x = i.pre, + E = i.post.length ? f(i.post, !1) : [""] + if (m) { + var A = n(g[0]), + D = n(g[1]), + C = Math.max(g[0].length, g[1].length), + S = 3 == g.length ? Math.abs(n(g[2])) : 1, + F = c, + w = A > D + w && ((S *= -1), (F = p)) + var _ = g.some(l) + b = [] + for (var T = A; F(T, D); T += S) { + var P + if (o) (P = String.fromCharCode(T)), "\\" === P && (P = "") + else if (((P = String(T)), _)) { + var B = C - P.length + if (B > 0) { + var k = new Array(B + 1).join("0") + P = 0 > T ? "-" + k + P.slice(1) : k + P + } + } + b.push(P) + } + } else + b = h(g, function(e) { + return f(e, !1) + }) + for (var I = 0; I < b.length; I++) + for (var O = 0; O < E.length; O++) { + var M = x + b[I] + E[O] + ;(!t || m || M) && r.push(M) + } + return r + } + var h = r(2705), + d = r(2704) + e.exports = o + var m = "\x00SLASH" + Math.random() + "\x00", + y = "\x00OPEN" + Math.random() + "\x00", + v = "\x00CLOSE" + Math.random() + "\x00", + g = "\x00COMMA" + Math.random() + "\x00", + E = "\x00PERIOD" + Math.random() + "\x00" + }, + function(e, t) { + function r(e, t, r) { + var i = n(e, t, r) + return ( + i && { + start: i[0], + end: i[1], + pre: r.slice(0, i[0]), + body: r.slice(i[0] + e.length, i[1]), + post: r.slice(i[1] + t.length) + } + ) + } + function n(e, t, r) { + var n, + i, + s, + a, + o, + u = r.indexOf(e), + l = r.indexOf(t, u + 1), + c = u + if (u >= 0 && l > 0) { + for (n = [], s = r.length; c < r.length && c >= 0 && !o; ) + c == u + ? (n.push(c), (u = r.indexOf(e, c + 1))) + : 1 == n.length + ? (o = [n.pop(), l]) + : ((i = n.pop()), + s > i && ((s = i), (a = l)), + (l = r.indexOf(t, c + 1))), + (c = l > u && u >= 0 ? u : l) + n.length && (o = [s, a]) + } + return o + } + ;(e.exports = r), (r.range = n) + }, + function(e, t) { + e.exports = function(e, t) { + for (var n = [], i = 0; i < e.length; i++) { + var s = t(e[i], i) + r(s) ? n.push.apply(n, s) : n.push(s) + } + return n + } + var r = + Array.isArray || + function(e) { + return "[object Array]" === Object.prototype.toString.call(e) + } + }, + function(e, t, r) { + "use strict" + var n = r(373) + ;(e.exports = function(e, t) { + var r = "function" == typeof n.access ? n.access : n.stat + r(e, function(e) { + t(null, !e) + }) + }), + (e.exports.sync = function(e) { + var t = "function" == typeof n.accessSync ? n.accessSync : n.statSync + try { + return t(e), !0 + } catch (r) { + return !1 + } + }) + }, + function(e, t, r) { + ;(function(t) { + "use strict" + function r(e) { + return "/" === e.charAt(0) + } + function n(e) { + var t = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/, + r = t.exec(e), + n = r[1] || "", + i = !!n && ":" !== n.charAt(1) + return !!r[2] || i + } + ;(e.exports = "win32" === t.platform ? n : r), + (e.exports.posix = r), + (e.exports.win32 = n) + }.call(t, r(1))) + }, + function(e, t) { + "use strict" + e.exports = /^#!.*/ + }, + function(e, t) { + var r = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".split("") + ;(t.encode = function(e) { + if (e >= 0 && e < r.length) return r[e] + throw new TypeError("Must be between 0 and 63: " + e) + }), + (t.decode = function(e) { + var t = 65, + r = 90, + n = 97, + i = 122, + s = 48, + a = 57, + o = 43, + u = 47, + l = 26, + c = 52 + return e >= t && r >= e + ? e - t + : e >= n && i >= e + ? e - n + l + : e >= s && a >= e + ? e - s + c + : e == o + ? 62 + : e == u + ? 63 + : -1 + }) + }, + function(e, t) { + function r(e, n, i, s, a, o) { + var u = Math.floor((n - e) / 2) + e, + l = a(i, s[u], !0) + return 0 === l + ? u + : l > 0 + ? n - u > 1 + ? r(u, n, i, s, a, o) + : o == t.LEAST_UPPER_BOUND + ? n < s.length + ? n + : -1 + : u + : u - e > 1 + ? r(e, u, i, s, a, o) + : o == t.LEAST_UPPER_BOUND + ? u + : 0 > e + ? -1 + : e + } + ;(t.GREATEST_LOWER_BOUND = 1), + (t.LEAST_UPPER_BOUND = 2), + (t.search = function(e, n, i, s) { + if (0 === n.length) return -1 + var a = r(-1, n.length, e, n, i, s || t.GREATEST_LOWER_BOUND) + if (0 > a) return -1 + for (; a - 1 >= 0 && 0 === i(n[a], n[a - 1], !0); ) --a + return a + }) + }, + function(e, t, r) { + function n(e, t) { + var r = e.generatedLine, + n = t.generatedLine, + i = e.generatedColumn, + a = t.generatedColumn + return ( + n > r || + (n == r && a >= i) || + s.compareByGeneratedPositionsInflated(e, t) <= 0 + ) + } + function i() { + ;(this._array = []), + (this._sorted = !0), + (this._last = { generatedLine: -1, generatedColumn: 0 }) + } + var s = r(473) + ;(i.prototype.unsortedForEach = function(e, t) { + this._array.forEach(e, t) + }), + (i.prototype.add = function(e) { + n(this._last, e) + ? ((this._last = e), this._array.push(e)) + : ((this._sorted = !1), this._array.push(e)) + }), + (i.prototype.toArray = function() { + return ( + this._sorted || + (this._array.sort(s.compareByGeneratedPositionsInflated), + (this._sorted = !0)), + this._array + ) + }), + (t.MappingList = i) + }, + function(e, t) { + function r(e, t, r) { + var n = e[t] + ;(e[t] = e[r]), (e[r] = n) + } + function n(e, t) { + return Math.round(e + Math.random() * (t - e)) + } + function i(e, t, s, a) { + if (a > s) { + var o = n(s, a), + u = s - 1 + r(e, o, a) + for (var l = e[a], c = s; a > c; c++) + t(e[c], l) <= 0 && ((u += 1), r(e, u, c)) + r(e, u + 1, c) + var p = u + 1 + i(e, t, s, p - 1), i(e, t, p + 1, a) + } + } + t.quickSort = function(e, t) { + i(e, t, 0, e.length - 1) + } + }, + function(e, t, r) { + function n(e) { + var t = e + return ( + "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ""))), + null != t.sections ? new a(t) : new i(t) + ) + } + function i(e) { + var t = e + "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ""))) + var r = o.getArg(t, "version"), + n = o.getArg(t, "sources"), + i = o.getArg(t, "names", []), + s = o.getArg(t, "sourceRoot", null), + a = o.getArg(t, "sourcesContent", null), + u = o.getArg(t, "mappings"), + c = o.getArg(t, "file", null) + if (r != this._version) throw new Error("Unsupported version: " + r) + ;(n = n.map(o.normalize).map(function(e) { + return s && o.isAbsolute(s) && o.isAbsolute(e) ? o.relative(s, e) : e + })), + (this._names = l.fromArray(i, !0)), + (this._sources = l.fromArray(n, !0)), + (this.sourceRoot = s), + (this.sourcesContent = a), + (this._mappings = u), + (this.file = c) + } + function s() { + ;(this.generatedLine = 0), + (this.generatedColumn = 0), + (this.source = null), + (this.originalLine = null), + (this.originalColumn = null), + (this.name = null) + } + function a(e) { + var t = e + "string" == typeof e && (t = JSON.parse(e.replace(/^\)\]\}'/, ""))) + var r = o.getArg(t, "version"), + i = o.getArg(t, "sections") + if (r != this._version) throw new Error("Unsupported version: " + r) + ;(this._sources = new l()), (this._names = new l()) + var s = { line: -1, column: 0 } + this._sections = i.map(function(e) { + if (e.url) + throw new Error("Support for url field in sections not implemented.") + var t = o.getArg(e, "offset"), + r = o.getArg(t, "line"), + i = o.getArg(t, "column") + if (r < s.line || (r === s.line && i < s.column)) + throw new Error("Section offsets must be ordered and non-overlapping.") + return ( + (s = t), + { + generatedOffset: { generatedLine: r + 1, generatedColumn: i + 1 }, + consumer: new n(o.getArg(e, "map")) + } + ) + }) + } + var o = r(473), + u = r(2710), + l = r(1422).ArraySet, + c = r(1423), + p = r(2712).quickSort + ;(n.fromSourceMap = function(e) { + return i.fromSourceMap(e) + }), + (n.prototype._version = 3), + (n.prototype.__generatedMappings = null), + Object.defineProperty(n.prototype, "_generatedMappings", { + get: function() { + return ( + this.__generatedMappings || + this._parseMappings(this._mappings, this.sourceRoot), + this.__generatedMappings + ) + } + }), + (n.prototype.__originalMappings = null), + Object.defineProperty(n.prototype, "_originalMappings", { + get: function() { + return ( + this.__originalMappings || + this._parseMappings(this._mappings, this.sourceRoot), + this.__originalMappings + ) + } + }), + (n.prototype._charIsMappingSeparator = function(e, t) { + var r = e.charAt(t) + return ";" === r || "," === r + }), + (n.prototype._parseMappings = function(e, t) { + throw new Error("Subclasses must implement _parseMappings") + }), + (n.GENERATED_ORDER = 1), + (n.ORIGINAL_ORDER = 2), + (n.GREATEST_LOWER_BOUND = 1), + (n.LEAST_UPPER_BOUND = 2), + (n.prototype.eachMapping = function(e, t, r) { + var i, + s = t || null, + a = r || n.GENERATED_ORDER + switch (a) { + case n.GENERATED_ORDER: + i = this._generatedMappings + break + case n.ORIGINAL_ORDER: + i = this._originalMappings + break + default: + throw new Error("Unknown order of iteration.") + } + var u = this.sourceRoot + i.map(function(e) { + var t = null === e.source ? null : this._sources.at(e.source) + return ( + null != t && null != u && (t = o.join(u, t)), + { + source: t, + generatedLine: e.generatedLine, + generatedColumn: e.generatedColumn, + originalLine: e.originalLine, + originalColumn: e.originalColumn, + name: null === e.name ? null : this._names.at(e.name) + } + ) + }, this).forEach(e, s) + }), + (n.prototype.allGeneratedPositionsFor = function(e) { + var t = o.getArg(e, "line"), + r = { + source: o.getArg(e, "source"), + originalLine: t, + originalColumn: o.getArg(e, "column", 0) + } + if ( + (null != this.sourceRoot && + (r.source = o.relative(this.sourceRoot, r.source)), + !this._sources.has(r.source)) + ) + return [] + r.source = this._sources.indexOf(r.source) + var n = [], + i = this._findMapping( + r, + this._originalMappings, + "originalLine", + "originalColumn", + o.compareByOriginalPositions, + u.LEAST_UPPER_BOUND + ) + if (i >= 0) { + var s = this._originalMappings[i] + if (void 0 === e.column) + for (var a = s.originalLine; s && s.originalLine === a; ) + n.push({ + line: o.getArg(s, "generatedLine", null), + column: o.getArg(s, "generatedColumn", null), + lastColumn: o.getArg(s, "lastGeneratedColumn", null) + }), + (s = this._originalMappings[++i]) + else + for ( + var l = s.originalColumn; + s && s.originalLine === t && s.originalColumn == l; + + ) + n.push({ + line: o.getArg(s, "generatedLine", null), + column: o.getArg(s, "generatedColumn", null), + lastColumn: o.getArg(s, "lastGeneratedColumn", null) + }), + (s = this._originalMappings[++i]) + } + return n + }), + (t.SourceMapConsumer = n), + (i.prototype = Object.create(n.prototype)), + (i.prototype.consumer = n), + (i.fromSourceMap = function(e) { + var t = Object.create(i.prototype), + r = (t._names = l.fromArray(e._names.toArray(), !0)), + n = (t._sources = l.fromArray(e._sources.toArray(), !0)) + ;(t.sourceRoot = e._sourceRoot), + (t.sourcesContent = e._generateSourcesContent( + t._sources.toArray(), + t.sourceRoot + )), + (t.file = e._file) + for ( + var a = e._mappings.toArray().slice(), + u = (t.__generatedMappings = []), + c = (t.__originalMappings = []), + f = 0, + h = a.length; + h > f; + f++ + ) { + var d = a[f], + m = new s() + ;(m.generatedLine = d.generatedLine), + (m.generatedColumn = d.generatedColumn), + d.source && + ((m.source = n.indexOf(d.source)), + (m.originalLine = d.originalLine), + (m.originalColumn = d.originalColumn), + d.name && (m.name = r.indexOf(d.name)), + c.push(m)), + u.push(m) + } + return p(t.__originalMappings, o.compareByOriginalPositions), t + }), + (i.prototype._version = 3), + Object.defineProperty(i.prototype, "sources", { + get: function() { + return this._sources.toArray().map(function(e) { + return null != this.sourceRoot ? o.join(this.sourceRoot, e) : e + }, this) + } + }), + (i.prototype._parseMappings = function(e, t) { + for ( + var r, + n, + i, + a, + u, + l = 1, + f = 0, + h = 0, + d = 0, + m = 0, + y = 0, + v = e.length, + g = 0, + E = {}, + b = {}, + x = [], + A = []; + v > g; + + ) + if (";" === e.charAt(g)) l++, g++, (f = 0) + else if ("," === e.charAt(g)) g++ + else { + for ( + r = new s(), r.generatedLine = l, a = g; + v > a && !this._charIsMappingSeparator(e, a); + a++ + ); + if (((n = e.slice(g, a)), (i = E[n]))) g += n.length + else { + for (i = []; a > g; ) + c.decode(e, g, b), (u = b.value), (g = b.rest), i.push(u) + if (2 === i.length) + throw new Error("Found a source, but no line and column") + if (3 === i.length) + throw new Error("Found a source and line, but no column") + E[n] = i + } + ;(r.generatedColumn = f + i[0]), + (f = r.generatedColumn), + i.length > 1 && + ((r.source = m + i[1]), + (m += i[1]), + (r.originalLine = h + i[2]), + (h = r.originalLine), + (r.originalLine += 1), + (r.originalColumn = d + i[3]), + (d = r.originalColumn), + i.length > 4 && ((r.name = y + i[4]), (y += i[4]))), + A.push(r), + "number" == typeof r.originalLine && x.push(r) + } + p(A, o.compareByGeneratedPositionsDeflated), + (this.__generatedMappings = A), + p(x, o.compareByOriginalPositions), + (this.__originalMappings = x) + }), + (i.prototype._findMapping = function(e, t, r, n, i, s) { + if (e[r] <= 0) + throw new TypeError( + "Line must be greater than or equal to 1, got " + e[r] + ) + if (e[n] < 0) + throw new TypeError( + "Column must be greater than or equal to 0, got " + e[n] + ) + return u.search(e, t, i, s) + }), + (i.prototype.computeColumnSpans = function() { + for (var e = 0; e < this._generatedMappings.length; ++e) { + var t = this._generatedMappings[e] + if (e + 1 < this._generatedMappings.length) { + var r = this._generatedMappings[e + 1] + if (t.generatedLine === r.generatedLine) { + t.lastGeneratedColumn = r.generatedColumn - 1 + continue + } + } + t.lastGeneratedColumn = 1 / 0 + } + }), + (i.prototype.originalPositionFor = function(e) { + var t = { + generatedLine: o.getArg(e, "line"), + generatedColumn: o.getArg(e, "column") + }, + r = this._findMapping( + t, + this._generatedMappings, + "generatedLine", + "generatedColumn", + o.compareByGeneratedPositionsDeflated, + o.getArg(e, "bias", n.GREATEST_LOWER_BOUND) + ) + if (r >= 0) { + var i = this._generatedMappings[r] + if (i.generatedLine === t.generatedLine) { + var s = o.getArg(i, "source", null) + null !== s && + ((s = this._sources.at(s)), + null != this.sourceRoot && (s = o.join(this.sourceRoot, s))) + var a = o.getArg(i, "name", null) + return ( + null !== a && (a = this._names.at(a)), + { + source: s, + line: o.getArg(i, "originalLine", null), + column: o.getArg(i, "originalColumn", null), + name: a + } + ) + } + } + return { source: null, line: null, column: null, name: null } + }), + (i.prototype.hasContentsOfAllSources = function() { + return this.sourcesContent + ? this.sourcesContent.length >= this._sources.size() && + !this.sourcesContent.some(function(e) { + return null == e + }) + : !1 + }), + (i.prototype.sourceContentFor = function(e, t) { + if (!this.sourcesContent) return null + if ( + (null != this.sourceRoot && (e = o.relative(this.sourceRoot, e)), + this._sources.has(e)) + ) + return this.sourcesContent[this._sources.indexOf(e)] + var r + if (null != this.sourceRoot && (r = o.urlParse(this.sourceRoot))) { + var n = e.replace(/^file:\/\//, "") + if ("file" == r.scheme && this._sources.has(n)) + return this.sourcesContent[this._sources.indexOf(n)] + if ((!r.path || "/" == r.path) && this._sources.has("/" + e)) + return this.sourcesContent[this._sources.indexOf("/" + e)] + } + if (t) return null + throw new Error('"' + e + '" is not in the SourceMap.') + }), + (i.prototype.generatedPositionFor = function(e) { + var t = o.getArg(e, "source") + if ( + (null != this.sourceRoot && (t = o.relative(this.sourceRoot, t)), + !this._sources.has(t)) + ) + return { line: null, column: null, lastColumn: null } + t = this._sources.indexOf(t) + var r = { + source: t, + originalLine: o.getArg(e, "line"), + originalColumn: o.getArg(e, "column") + }, + i = this._findMapping( + r, + this._originalMappings, + "originalLine", + "originalColumn", + o.compareByOriginalPositions, + o.getArg(e, "bias", n.GREATEST_LOWER_BOUND) + ) + if (i >= 0) { + var s = this._originalMappings[i] + if (s.source === r.source) + return { + line: o.getArg(s, "generatedLine", null), + column: o.getArg(s, "generatedColumn", null), + lastColumn: o.getArg(s, "lastGeneratedColumn", null) + } + } + return { line: null, column: null, lastColumn: null } + }), + (t.BasicSourceMapConsumer = i), + (a.prototype = Object.create(n.prototype)), + (a.prototype.constructor = n), + (a.prototype._version = 3), + Object.defineProperty(a.prototype, "sources", { + get: function() { + for (var e = [], t = 0; t < this._sections.length; t++) + for (var r = 0; r < this._sections[t].consumer.sources.length; r++) + e.push(this._sections[t].consumer.sources[r]) + return e + } + }), + (a.prototype.originalPositionFor = function(e) { + var t = { + generatedLine: o.getArg(e, "line"), + generatedColumn: o.getArg(e, "column") + }, + r = u.search(t, this._sections, function(e, t) { + var r = e.generatedLine - t.generatedOffset.generatedLine + return r ? r : e.generatedColumn - t.generatedOffset.generatedColumn + }), + n = this._sections[r] + return n + ? n.consumer.originalPositionFor({ + line: t.generatedLine - (n.generatedOffset.generatedLine - 1), + column: + t.generatedColumn - + (n.generatedOffset.generatedLine === t.generatedLine + ? n.generatedOffset.generatedColumn - 1 + : 0), + bias: e.bias + }) + : { source: null, line: null, column: null, name: null } + }), + (a.prototype.hasContentsOfAllSources = function() { + return this._sections.every(function(e) { + return e.consumer.hasContentsOfAllSources() + }) + }), + (a.prototype.sourceContentFor = function(e, t) { + for (var r = 0; r < this._sections.length; r++) { + var n = this._sections[r], + i = n.consumer.sourceContentFor(e, !0) + if (i) return i + } + if (t) return null + throw new Error('"' + e + '" is not in the SourceMap.') + }), + (a.prototype.generatedPositionFor = function(e) { + for (var t = 0; t < this._sections.length; t++) { + var r = this._sections[t] + if (-1 !== r.consumer.sources.indexOf(o.getArg(e, "source"))) { + var n = r.consumer.generatedPositionFor(e) + if (n) { + var i = { + line: n.line + (r.generatedOffset.generatedLine - 1), + column: + n.column + + (r.generatedOffset.generatedLine === n.line + ? r.generatedOffset.generatedColumn - 1 + : 0) + } + return i + } + } + } + return { line: null, column: null } + }), + (a.prototype._parseMappings = function(e, t) { + ;(this.__generatedMappings = []), (this.__originalMappings = []) + for (var r = 0; r < this._sections.length; r++) + for ( + var n = this._sections[r], i = n.consumer._generatedMappings, s = 0; + s < i.length; + s++ + ) { + var a = i[s], + u = n.consumer._sources.at(a.source) + null !== n.consumer.sourceRoot && + (u = o.join(n.consumer.sourceRoot, u)), + this._sources.add(u), + (u = this._sources.indexOf(u)) + var l = n.consumer._names.at(a.name) + this._names.add(l), (l = this._names.indexOf(l)) + var c = { + source: u, + generatedLine: + a.generatedLine + (n.generatedOffset.generatedLine - 1), + generatedColumn: + a.generatedColumn + + (n.generatedOffset.generatedLine === a.generatedLine + ? n.generatedOffset.generatedColumn - 1 + : 0), + originalLine: a.originalLine, + originalColumn: a.originalColumn, + name: l + } + this.__generatedMappings.push(c), + "number" == typeof c.originalLine && + this.__originalMappings.push(c) + } + p(this.__generatedMappings, o.compareByGeneratedPositionsDeflated), + p(this.__originalMappings, o.compareByOriginalPositions) + }), + (t.IndexedSourceMapConsumer = a) + }, + function(e, t, r) { + function n(e, t, r, n, i) { + ;(this.children = []), + (this.sourceContents = {}), + (this.line = null == e ? null : e), + (this.column = null == t ? null : t), + (this.source = null == r ? null : r), + (this.name = null == i ? null : i), + (this[u] = !0), + null != n && this.add(n) + } + var i = r(1424).SourceMapGenerator, + s = r(473), + a = /(\r?\n)/, + o = 10, + u = "$$$isSourceNode$$$" + ;(n.fromStringWithSourceMap = function(e, t, r) { + function i(e, t) { + if (null === e || void 0 === e.source) o.add(t) + else { + var i = r ? s.join(r, e.source) : e.source + o.add(new n(e.originalLine, e.originalColumn, i, t, e.name)) + } + } + var o = new n(), + u = e.split(a), + l = function() { + var e = u.shift(), + t = u.shift() || "" + return e + t + }, + c = 1, + p = 0, + f = null + return ( + t.eachMapping(function(e) { + if (null !== f) { + if (!(c < e.generatedLine)) { + var t = u[0], + r = t.substr(0, e.generatedColumn - p) + return ( + (u[0] = t.substr(e.generatedColumn - p)), + (p = e.generatedColumn), + i(f, r), + void (f = e) + ) + } + i(f, l()), c++, (p = 0) + } + for (; c < e.generatedLine; ) o.add(l()), c++ + if (p < e.generatedColumn) { + var t = u[0] + o.add(t.substr(0, e.generatedColumn)), + (u[0] = t.substr(e.generatedColumn)), + (p = e.generatedColumn) + } + f = e + }, this), + u.length > 0 && (f && i(f, l()), o.add(u.join(""))), + t.sources.forEach(function(e) { + var n = t.sourceContentFor(e) + null != n && (null != r && (e = s.join(r, e)), o.setSourceContent(e, n)) + }), + o + ) + }), + (n.prototype.add = function(e) { + if (Array.isArray(e)) + e.forEach(function(e) { + this.add(e) + }, this) + else { + if (!e[u] && "string" != typeof e) + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + + e + ) + e && this.children.push(e) + } + return this + }), + (n.prototype.prepend = function(e) { + if (Array.isArray(e)) + for (var t = e.length - 1; t >= 0; t--) this.prepend(e[t]) + else { + if (!e[u] && "string" != typeof e) + throw new TypeError( + "Expected a SourceNode, string, or an array of SourceNodes and strings. Got " + + e + ) + this.children.unshift(e) + } + return this + }), + (n.prototype.walk = function(e) { + for (var t, r = 0, n = this.children.length; n > r; r++) + (t = this.children[r]), + t[u] + ? t.walk(e) + : "" !== t && + e(t, { + source: this.source, + line: this.line, + column: this.column, + name: this.name + }) + }), + (n.prototype.join = function(e) { + var t, + r, + n = this.children.length + if (n > 0) { + for (t = [], r = 0; n - 1 > r; r++) t.push(this.children[r]), t.push(e) + t.push(this.children[r]), (this.children = t) + } + return this + }), + (n.prototype.replaceRight = function(e, t) { + var r = this.children[this.children.length - 1] + return ( + r[u] + ? r.replaceRight(e, t) + : "string" == typeof r + ? (this.children[this.children.length - 1] = r.replace(e, t)) + : this.children.push("".replace(e, t)), + this + ) + }), + (n.prototype.setSourceContent = function(e, t) { + this.sourceContents[s.toSetString(e)] = t + }), + (n.prototype.walkSourceContents = function(e) { + for (var t = 0, r = this.children.length; r > t; t++) + this.children[t][u] && this.children[t].walkSourceContents(e) + for ( + var n = Object.keys(this.sourceContents), t = 0, r = n.length; + r > t; + t++ + ) + e(s.fromSetString(n[t]), this.sourceContents[n[t]]) + }), + (n.prototype.toString = function() { + var e = "" + return ( + this.walk(function(t) { + e += t + }), + e + ) + }), + (n.prototype.toStringWithSourceMap = function(e) { + var t = { code: "", line: 1, column: 0 }, + r = new i(e), + n = !1, + s = null, + a = null, + u = null, + l = null + return ( + this.walk(function(e, i) { + ;(t.code += e), + null !== i.source && null !== i.line && null !== i.column + ? ((s === i.source && + a === i.line && + u === i.column && + l === i.name) || + r.addMapping({ + source: i.source, + original: { line: i.line, column: i.column }, + generated: { line: t.line, column: t.column }, + name: i.name + }), + (s = i.source), + (a = i.line), + (u = i.column), + (l = i.name), + (n = !0)) + : n && + (r.addMapping({ + generated: { line: t.line, column: t.column } + }), + (s = null), + (n = !1)) + for (var c = 0, p = e.length; p > c; c++) + e.charCodeAt(c) === o + ? (t.line++, + (t.column = 0), + c + 1 === p + ? ((s = null), (n = !1)) + : n && + r.addMapping({ + source: i.source, + original: { line: i.line, column: i.column }, + generated: { line: t.line, column: t.column }, + name: i.name + })) + : t.column++ + }), + this.walkSourceContents(function(e, t) { + r.setSourceContent(e, t) + }), + { code: t.code, map: r } + ) + }), + (t.SourceNode = n) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + pre: function(e) { + e.set("helpersNamespace", t.identifier("babelHelpers")) + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + manipulateOptions: function(e, t) { + t.plugins.push("asyncGenerators") + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { inherits: r(567) } + }), + (e.exports = t["default"]) + }, + [7496, 2892, 48, 29, 2719, 1436, 33], + [7497, 48, 29, 2720, 1436, 33], + [7498, 29, 33], + 810, + 1397, + 1398, + 1399, + 812, + [7438, 828], + [7441, 2724, 2725, 1437, 2730, 2739, 2740, 2741, 376, 377], + 1402, + [7443, 2737], + [7445, 2729, 828], + [7446, 826], + 1409, + 1410, + 815, + 2673, + [7458, 1438, 2742, 2723], + [7460, 826], + [7466, 2732], + 2688, + [7469, 2735], + 2690, + [7471, 824, 568, 377], + [7472, 376, 826], + [7474, 827, 376, 568, 474, 2751], + [7476, 2734, 376], + [7478, 2727, 1438], + [7481, 377], + [7482, 2747, 825], + [7488, 2726, 1437, 2736], + [7490, 2731, 2733, 827, 376, 568, 2743, 474, 2722, 2745], + [7492, 827, 376, 568, 474, 377], + 1420, + [7394, 311, 186, 48, 29, 310, 33], + [7397, 29, 48, 33, 310], + 2609, + [7398, 186, 48, 378], + [7399, 29, 33], + 2612, + [7400, 48, 29, 310, 33], + [7402, 29, 2762, 33], + [7403, 29, 33], + [7404, 29, 1471, 33, 2761], + [7405, 48, 29, 831, 33], + [7406, 311, 29, 33], + 2619, + [7408, 186, 48, 29, 1441, 2764, 310, 33], + [7409, 2765], + [7410, 48, 29, 2771, 378, 310, 2789, 33], + [7413, 311, 48, 29, 1443, 33], + [7414, 840, 186, 29, 48, 1442, 830, 33, 2816], + [7317, 48, 2787, 1453, 2786, 2785, 2772], + [7318, 2777, 2773, 2780, 2778, 2782], + [7319, 2775], + 2516, + [7321, 1444, 2776], + [7322, 1444], + 2519, + [7323, 2779], + 2521, + [7324, 2781], + 2521, + 2524, + 2525, + [7325, 1445], + [7326, 2783, 1445, 2784], + 2528, + [7327, 2788], + 2530, + 810, + [7431, 2791], + [7432, 2792], + 2648, + [7415, 7280], + 2626, + 1399, + 812, + 2659, + [7438, 571], + [7441, 2795, 2796, 1447, 2802, 2811, 2812, 2813, 570, 379], + 1402, + [7443, 2808], + [7445, 2801, 571], + [7447, 2810], + 1409, + 2672, + 2673, + [7458, 1448, 834, 1446], + [7460, 2815], + [7462, 1446], + 2687, + 2688, + [7469, 2806], + 2690, + [7474, 1451, 570, 833, 475, 2821], + [7475, 379], + [7477, 2799, 1448, 834], + [7481, 379], + [7482, 2817, 569], + [7486, 569], + [7489, 1452, 2797, 2809], + [7492, 1451, 570, 833, 475, 379], + [7494, 2805, 571], + 1420, + [7329, 2825], + 2533, + [7417, 2891, 48, 29, 2884, 2883, 2885, 2886, 378, 33], + [7418, 29, 48, 33, 835, 182], + [7419, 48, 182], + [7420, 48, 182], + [7421, 48, 182], + [7423, 182, 2827, 2828, 2830, 2832, 2833, 2829], + [7424, 48, 182], + [7425, 48, 182], + [7426, 29, 33], + [7428, 29, 33], + [7430, 48, 29, 1454, 2839, 33, 835], + 2525, + [7325, 1455], + [7326, 2837, 1455, 2838], + 2650, + 1397, + [7433, 2849, 2862, 1463, 2879], + [7434, 2844], + [7435, 1456, 2852, 2869], + [7437, 2865, 572], + 1399, + 2658, + [7439, 2851, 573], + [7440, 2857, 2858, 836, 1468, 2889], + [7441, 2846, 1456, 2848, 1458, 2875, 2876, 2877, 185, 121], + 1402, + [7442, 1458, 2866], + [7444, 1457, 1467], + [7447, 2874], + [7449, 2870, 2871, 2872, 185, 2887], + [7450, 1460, 184], + [7451, 2856, 2873, 184], + [7452, 1459, 1460, 2860, 185, 1464, 1465, 2841, 184, 1466], + [7453, 1459, 1466], + 1410, + 815, + [7454, 2854, 2864, 2868], + 2673, + [7456, 121], + [7457, 121], + [7459, 1462, 380, 184], + [7460, 184], + [7461, 2845, 572], + [7463, 836, 185], + [7464, 2847], + 2683, + [7465, 573], + [7467, 1465, 2888], + 2687, + 2688, + [7469, 2863], + 2690, + [7474, 839, 185, 838, 380, 1467], + 2692, + [7477, 2850, 836, 1463], + [7481, 121], + [7482, 2881, 183], + [7483, 183], + [7484, 2853, 839, 183], + [7485, 121], + [7486, 183], + [7487, 380, 183], + [7493, 573, 184], + [7495, 1461, 2859, 1464], + 2644, + [7332, 2901], + [7333, 2902], + [7336, 2905], + [7337, 2906], + [7338, 2907], + [7342, 2909], + [7343, 1470], + [7344, 2894, 2893, 1470], + 1937, + [7346, 2934, 2933, 2925], + [7347, 2927], + [7348, 2928, 157], + [7349, 95], + [7350, 95], + [7351, 95, 2929], + [7352, 95, 2930], + [7353, 849, 157], + [7354, 2931, 157], + [7356, 849, 157], + [7357, 849, 2932, 157], + 2581, + 2582, + [7359, 842, 381], + [7360, 2911], + [7362, 95], + [7367, 842], + 559, + [7368, 95, 847, 848, 845, 381], + 1379, + [7370, 95, 477], + [7371, 95, 1480, 1475, 574], + [7377, 2923, 843], + 1384, + [7381, 2913, 381, 576, 157], + [7382, 1472, 2924, 157], + [7383, 2912, 2919, 576, 477, 1476], + [7384, 476], + [7385, 476, 2921], + [7386, 477, 846], + [7387, 846, 1474], + [7388, 1480, 846], + 373, + [7390, 2922, 1476], + [7392, 2926, 576], + function(e, t, r) { + "use strict" + var n = r(17)["default"] + t.__esModule = !0 + var i = r(2936), + s = n(i) + ;(t["default"] = function() { + return { + inherits: r(567), + visitor: { + Function: function(e, t) { + e.node.async && + !e.node.generator && + s["default"](e, t.addImport(t.opts.module, t.opts.method)) + } + } + } + }), + (e.exports = t["default"]) + }, + [7496, 3045, 17, 6, 2937, 1482, 11], + [7497, 17, 6, 2938, 1482, 11], + [7498, 6, 11], + 810, + 1397, + 1398, + 1399, + 812, + [7438, 854], + [7441, 2942, 2943, 1483, 2948, 2957, 2958, 2959, 382, 383], + 1402, + [7443, 2955], + [7445, 2947, 854], + [7446, 852], + 1409, + 1410, + 815, + 2673, + [7458, 1484, 2960, 2941], + [7460, 852], + [7466, 2950], + 2688, + [7469, 2953], + 2690, + [7471, 850, 577, 383], + [7472, 382, 852], + [7474, 853, 382, 577, 478, 2969], + [7476, 2952, 382], + [7478, 2945, 1484], + [7481, 383], + [7482, 2965, 851], + [7488, 2944, 1483, 2954], + [7490, 2949, 2951, 853, 382, 577, 2961, 478, 2940, 2963], + [7492, 853, 382, 577, 478, 383], + 1420, + [7394, 86, 85, 17, 6, 312, 11], + [7397, 6, 17, 11, 312], + 2609, + [7398, 85, 17, 479], + [7399, 6, 11], + 2612, + [7400, 17, 6, 312, 11], + [7402, 6, 2980, 11], + [7403, 6, 11], + [7404, 6, 581, 11, 2979], + [7405, 17, 6, 857, 11], + [7406, 86, 6, 11], + 2619, + [7408, 85, 17, 6, 1487, 2982, 312, 11], + [7409, 2983], + [7410, 17, 6, 2989, 479, 312, 3007, 11], + [7413, 86, 17, 6, 1489, 11], + [7414, 481, 85, 6, 17, 1488, 856, 11, 3034], + [7317, 17, 3005, 1499, 3004, 3003, 2990], + [7318, 2995, 2991, 2998, 2996, 3e3], + [7319, 2993], + 2516, + [7321, 1490, 2994], + [7322, 1490], + 2519, + [7323, 2997], + 2521, + [7324, 2999], + 2521, + 2524, + 2525, + [7325, 1491], + [7326, 3001, 1491, 3002], + 2528, + [7327, 3006], + 2530, + 810, + [7431, 3009], + [7432, 3010], + 2648, + [7415, 7281], + 2626, + 1399, + 812, + 2659, + [7438, 580], + [7441, 3013, 3014, 1493, 3020, 3029, 3030, 3031, 579, 384], + 1402, + [7443, 3026], + [7445, 3019, 580], + [7447, 3028], + 1409, + 2672, + 2673, + [7458, 1494, 860, 1492], + [7460, 3033], + [7462, 1492], + 2687, + 2688, + [7469, 3024], + 2690, + [7474, 1497, 579, 859, 480, 3039], + [7475, 384], + [7477, 3017, 1494, 860], + [7481, 384], + [7482, 3035, 578], + [7486, 578], + [7489, 1498, 3015, 3027], + [7492, 1497, 579, 859, 480, 384], + [7494, 3023, 580], + 1420, + [7329, 3043], + 2533, + [7332, 3052], + [7333, 3053], + [7336, 3056], + [7337, 3057], + [7342, 3060], + [7344, 3047, 3046, 1500], + 1937, + [7346, 3085, 3084, 3076], + [7347, 3078], + [7348, 3079, 158], + [7349, 96], + [7350, 96], + [7351, 96, 3080], + [7352, 96, 3081], + [7353, 869, 158], + [7354, 3082, 158], + [7356, 869, 158], + [7357, 869, 3083, 158], + 2581, + 2582, + [7359, 862, 385], + [7360, 3062], + [7362, 96], + [7367, 862], + 559, + [7368, 96, 867, 868, 865, 385], + 1379, + [7370, 96, 484], + [7371, 96, 1511, 1506, 582], + [7377, 3074, 863], + 1384, + [7381, 3064, 385, 584, 158], + [7382, 1503, 3075, 158], + [7383, 3063, 3070, 584, 484, 1507], + [7384, 483], + [7385, 483, 3072], + [7386, 484, 866], + [7387, 866, 1505], + [7388, 1511, 866], + 373, + [7390, 3073, 1507], + [7392, 3077, 584], + [7417, 3044, 17, 6, 3186, 3185, 3187, 1535, 485, 11], + [7418, 6, 17, 11, 870, 187], + [7419, 17, 187], + [7420, 17, 187], + [7421, 17, 187], + [7423, 187, 3087, 3088, 3090, 3092, 3093, 3089], + [7424, 17, 187], + [7425, 17, 187], + [7426, 6, 11], + [7428, 6, 11], + [7430, 17, 6, 1513, 1521, 11, 870], + [7394, 86, 85, 17, 6, 313, 11], + [7397, 6, 17, 11, 313], + 2609, + [7398, 85, 17, 485], + [7399, 6, 11], + 2612, + [7400, 17, 6, 313, 11], + [7402, 6, 3106, 11], + [7403, 6, 11], + [7404, 6, 581, 11, 3105], + [7405, 17, 6, 873, 11], + [7406, 86, 6, 11], + 2619, + [7408, 85, 17, 6, 1515, 3108, 313, 11], + [7409, 3109], + [7410, 17, 6, 3115, 485, 313, 3130, 11], + [7413, 86, 17, 6, 1517, 11], + [7414, 481, 85, 6, 17, 1516, 872, 11, 1534], + [7317, 17, 3128, 1519, 3127, 1521, 3116], + [7318, 3121, 3117, 3124, 3122, 3126], + [7319, 3119], + 2516, + [7321, 1518, 3120], + [7322, 1518], + 2519, + [7323, 3123], + 2521, + [7324, 3125], + 2521, + 2524, + 2528, + [7327, 3129], + 2530, + 810, + [7431, 3132], + [7432, 3133], + 2648, + [7415, 7282], + 2626, + [7329, 3137], + 2533, + 2525, + [7325, 1520], + 2650, + 1397, + [7433, 3150, 3162, 587, 3182], + [7434, 3144], + [7435, 1523, 3153, 3172], + [7437, 3166, 586], + 1399, + 2658, + 2659, + [7438, 386], + [7440, 3157, 3158, 585, 1538, 3192], + [7441, 3146, 1523, 1524, 1526, 3178, 3179, 3180, 159, 122], + 1402, + [7442, 1526, 3168], + [7444, 1525, 1537], + [7449, 3173, 3174, 3175, 159, 3188], + [7450, 1529, 189], + [7451, 3156, 3176, 189], + [7452, 1527, 1529, 3160, 159, 1531, 1532, 3141, 189, 1533], + [7453, 1527, 1533], + 1410, + 815, + [7454, 1528, 3165, 3170], + 2672, + 2673, + [7456, 122], + [7457, 122], + [7458, 585, 587, 1522], + [7459, 874, 314, 189], + [7460, 189], + [7461, 3145, 586], + [7462, 1522], + [7463, 585, 159], + [7464, 3147], + 2683, + [7465, 386], + [7467, 1532, 3190], + 2687, + 2688, + [7469, 3164], + 2690, + [7474, 877, 159, 876, 314, 1537], + 2692, + [7481, 122], + [7482, 3183, 188], + [7483, 188], + [7484, 3154, 877, 188], + [7485, 122], + [7487, 314, 188], + [7489, 1536, 3148, 3171], + [7493, 386, 189], + [7494, 3163, 386], + [7495, 1530, 3159, 1531], + 2644, + [7332, 3203], + [7336, 3206], + [7337, 3207], + [7338, 3208], + [7342, 3210], + [7343, 1541], + [7344, 3196, 3195, 1541], + 1937, + [7346, 3235, 3234, 3227], + [7347, 3229], + [7349, 100], + [7350, 100], + [7351, 100, 3230], + [7352, 100, 3231], + [7353, 887, 191], + [7354, 3232, 191], + [7356, 887, 191], + [7357, 887, 3233, 191], + 2581, + 2582, + [7359, 879, 387], + [7360, 3212], + [7362, 100], + [7366, 879], + [7367, 879], + 559, + [7368, 100, 885, 886, 883, 387], + 1379, + [7370, 100, 486], + [7377, 3224, 880], + 1384, + [7379, 880], + [7381, 3214, 387, 591, 191], + [7382, 1543, 3226, 191], + [7383, 3213, 3221, 591, 486, 1546], + [7384, 589], + [7386, 486, 884], + [7387, 884, 1545], + [7388, 3225, 884], + 373, + [7390, 3223, 1546], + [7392, 3228, 591], + [7393, 588, 66, 38, 3335, 897, 3343, 388, 1560, 54], + [7394, 315, 190, 66, 38, 316, 54], + [7397, 38, 66, 54, 316], + 2609, + [7398, 190, 66, 388], + [7399, 38, 54], + 2612, + [7400, 66, 38, 316, 54], + [7402, 38, 3246, 54], + [7403, 38, 54], + [7404, 38, 1542, 54, 3245], + [7405, 66, 38, 891, 54], + [7406, 315, 38, 54], + 2619, + [7408, 190, 66, 38, 1552, 3248, 316, 54], + [7409, 3249], + [7410, 66, 38, 3255, 388, 316, 1560, 54], + [7413, 315, 66, 38, 1554, 54], + [7414, 878, 190, 38, 66, 1553, 889, 54, 1573], + [7317, 66, 3271, 1557, 3270, 3269, 3256], + [7318, 3261, 3257, 3264, 3262, 3266], + [7319, 3259], + 2516, + [7321, 1555, 3260], + [7322, 1555], + 2519, + [7323, 3263], + 2521, + [7324, 3265], + 2521, + 2524, + 2525, + [7325, 1556], + [7326, 3267, 1556, 3268], + 2528, + [7327, 3272], + 2530, + [7431, 3274], + [7432, 3275], + 2648, + [7415, 7283], + 2626, + [7329, 3279], + 2533, + [7417, 3194, 66, 38, 3339, 3338, 3340, 1574, 388, 54], + [7418, 38, 66, 54, 890, 192], + [7419, 66, 192], + [7420, 66, 192], + [7421, 66, 192], + [7423, 192, 3281, 3282, 3284, 3286, 3287, 3283], + [7424, 66, 192], + [7425, 66, 192], + [7426, 38, 54], + [7428, 38, 54], + [7430, 66, 38, 1558, 3293, 54, 890], + 2525, + [7325, 1559], + [7326, 3291, 1559, 3292], + 2644, + 2650, + [7433, 3304, 3314, 594, 3334], + [7434, 3298], + [7435, 1563, 3306, 3324], + [7437, 3318, 592], + 1399, + 2658, + 2659, + [7438, 389], + [7440, 3310, 3311, 487, 1576, 3346], + 1402, + [7442, 1567, 3320], + [7444, 1566, 1575], + [7449, 3325, 3326, 3327, 149, 3341], + [7450, 1569, 195], + [7451, 3309, 3328, 195], + [7452, 892, 1569, 1571, 149, 895, 1572, 1561, 195, 896], + [7453, 892, 896], + 815, + [7454, 1568, 3317, 3322], + 2672, + 2673, + [7456, 123], + [7457, 123], + [7458, 487, 594, 1562], + [7459, 893, 193, 195], + [7460, 195], + [7461, 3299, 592], + [7462, 1562], + [7463, 487, 149], + [7464, 3301], + 2683, + [7465, 389], + [7467, 1572, 3344], + 2687, + 2688, + [7469, 3316], + 2690, + [7474, 595, 149, 593, 193, 1575], + 2692, + [7478, 1565, 487], + [7481, 123], + [7482, 3336, 194], + [7483, 194], + [7484, 3307, 595, 194], + [7485, 123], + [7487, 193, 194], + [7489, 897, 3302, 3323], + [7490, 892, 1571, 595, 149, 593, 895, 193, 1561, 896], + [7493, 389, 195], + [7494, 3315, 389], + [7495, 1570, 3312, 895], + [7331, 3348], + [7346, 3372, 3371, 3369], + 2581, + 2582, + [7358, 3358], + [7359, 1578, 488], + [7360, 3349], + [7361, 3356], + [7363, 899, 898, 3353], + 465, + [7366, 1578], + 559, + [7368, 597, 1582, 1583, 900, 488], + 1379, + 1380, + [7373, 900], + [7376, 899], + [7377, 3365, 1579], + 1384, + [7378, 3357, 1579], + 805, + [7381, 3352, 488, 596, 898], + [7382, 3351, 3368, 898], + [7383, 3350, 3360, 596, 3366, 1581], + [7390, 3364, 1581], + [7392, 3370, 596], + function(e, t, r) { + "use strict" + function n(e) { + return e && e.__esModule ? e : { default: e } + } + Object.defineProperty(t, "__esModule", { value: !0 }), + (t["default"] = function(e) { + function t(e, t) { + if (!t.applyDecoratedDescriptor) { + t.applyDecoratedDescriptor = e.scope.generateUidIdentifier( + "applyDecoratedDescriptor" + ) + var r = f({ NAME: t.applyDecoratedDescriptor }) + e.scope.getProgramParent().path.unshiftContainer("body", r) + } + return t.applyDecoratedDescriptor + } + function n(e, t) { + if (!t.initializerDefineProp) { + t.initializerDefineProp = e.scope.generateUidIdentifier( + "initDefineProp" + ) + var r = p({ NAME: t.initializerDefineProp }) + e.scope.getProgramParent().path.unshiftContainer("body", r) + } + return t.initializerDefineProp + } + function i(e, t) { + if (!t.initializerWarningHelper) { + t.initializerWarningHelper = e.scope.generateUidIdentifier( + "initializerWarningHelper" + ) + var r = c({ NAME: t.initializerWarningHelper }) + e.scope.getProgramParent().path.unshiftContainer("body", r) + } + return t.initializerWarningHelper + } + function s(e) { + var t = (e.isClass() + ? [e].concat(e.get("body.body")) + : e.get("properties") + ).reduce(function(e, t) { + return e.concat(t.node.decorators || []) + }, []), + r = t.filter(function(e) { + return !v.isIdentifier(e.expression) + }) + return 0 !== r.length + ? v.sequenceExpression( + r + .map(function(t) { + var r = t.expression, + n = (t.expression = e.scope.generateDeclaredUidIdentifier( + "dec" + )) + return v.assignmentExpression("=", n, r) + }) + .concat([e.node]) + ) + : void 0 + } + function h(e, t) { + var r = e.node.decorators || [] + if (((e.node.decorators = null), 0 !== r.length)) { + var n = e.scope.generateDeclaredUidIdentifier("class") + return r + .map(function(e) { + return e.expression + }) + .reverse() + .reduce(function(e, t) { + return a({ + CLASS_REF: n, + DECORATOR: t, + INNER: e + }).expression + }, e.node) + } + } + function d(e, t) { + var r = e.node.body.body.some(function(e) { + return (e.decorators || []).length > 0 + }) + if (r) return y(e, t, e.node.body.body) + } + function m(e, t) { + var r = e.node.properties.some(function(e) { + return (e.decorators || []).length > 0 + }) + if (r) return y(e, t, e.node.properties) + } + function y(e, r, n) { + var s = (e.scope.generateDeclaredUidIdentifier("desc"), + e.scope.generateDeclaredUidIdentifier("value"), + e.scope.generateDeclaredUidIdentifier( + e.isClass() ? "class" : "obj" + )), + a = n.reduce(function(n, a) { + var c = a.decorators || [] + if (((a.decorators = null), 0 === c.length)) return n + if (a.computed) + throw e.buildCodeFrameError( + "Computed method/property decorators are not yet supported." + ) + var p = v.isLiteral(a.key) + ? a.key + : v.stringLiteral(a.key.name), + f = + e.isClass() && !a["static"] + ? o({ CLASS_REF: s }).expression + : s + if (v.isClassProperty(a, { static: !1 })) { + var h = e.scope.generateDeclaredUidIdentifier("descriptor"), + d = a.value + ? v.functionExpression( + null, + [], + v.blockStatement([v.returnStatement(a.value)]) + ) + : v.nullLiteral() + ;(a.value = v.callExpression(i(e, r), [ + h, + v.thisExpression() + ])), + (n = n.concat([ + v.assignmentExpression( + "=", + h, + v.callExpression(t(e, r), [ + f, + p, + v.arrayExpression( + c.map(function(e) { + return e.expression + }) + ), + v.objectExpression([ + v.objectProperty( + v.identifier("enumerable"), + v.booleanLiteral(!0) + ), + v.objectProperty( + v.identifier("initializer"), + d + ) + ]) + ]) + ) + ])) + } else + n = n.concat( + v.callExpression(t(e, r), [ + f, + p, + v.arrayExpression( + c.map(function(e) { + return e.expression + }) + ), + v.isObjectProperty(a) || + v.isClassProperty(a, { static: !0 }) + ? l({ + TEMP: e.scope.generateDeclaredUidIdentifier( + "init" + ), + TARGET: f, + PROPERTY: p + }).expression + : u({ TARGET: f, PROPERTY: p }).expression, + f + ]) + ) + return n + }, []) + return v.sequenceExpression([ + v.assignmentExpression("=", s, e.node), + v.sequenceExpression(a), + s + ]) + } + var v = e.types + return { + inherits: r(3374), + visitor: { + ExportDefaultDeclaration: function(e) { + if (e.get("declaration").isClassDeclaration()) { + var t = e.node, + r = + t.declaration.id || + e.scope.generateUidIdentifier("default") + ;(t.declaration.id = r), + e.replaceWith(t.declaration), + e.insertAfter( + v.exportNamedDeclaration(null, [ + v.exportSpecifier(r, v.identifier("default")) + ]) + ) + } + }, + ClassDeclaration: function(e) { + var t = e.node, + r = t.id || e.scope.generateUidIdentifier("class") + e.replaceWith( + v.variableDeclaration("let", [ + v.variableDeclarator(r, v.toExpression(t)) + ]) + ) + }, + ClassExpression: function(e, t) { + var r = s(e) || h(e, t) || d(e, t) + r && e.replaceWith(r) + }, + ObjectExpression: function(e, t) { + var r = s(e) || m(e, t) + r && e.replaceWith(r) + }, + AssignmentExpression: function(e, t) { + t.initializerWarningHelper && + e.get("left").isMemberExpression() && + e.get("left.property").isIdentifier() && + e.get("right").isCallExpression() && + e.get("right.callee").isIdentifier({ + name: t.initializerWarningHelper.name + }) && + e.replaceWith( + v.callExpression(n(e, t), [ + e.get("left.object").node, + v.stringLiteral(e.get("left.property").node.name), + e.get("right.arguments")[0].node, + e.get("right.arguments")[1].node + ]) + ) + } + } + } + }) + var i = r(3375), + s = n(i), + a = (0, s["default"])("\n DECORATOR(CLASS_REF = INNER) || CLASS_REF;\n"), + o = (0, s["default"])("\n CLASS_REF.prototype;\n"), + u = (0, s["default"])( + "\n Object.getOwnPropertyDescriptor(TARGET, PROPERTY);\n" + ), + l = (0, s["default"])( + "\n (TEMP = Object.getOwnPropertyDescriptor(TARGET, PROPERTY), (TEMP = TEMP ? TEMP.value : undefined), {\n enumerable: true,\n configurable: true,\n writable: true,\n initializer: function(){\n return TEMP;\n }\n })\n" + ), + c = (0, s["default"])( + "\n function NAME(descriptor, context){\n throw new Error('Decorating class property failed. Please ensure that transform-class-properties is enabled.');\n }\n" + ), + p = (0, s["default"])( + "\n function NAME(target, property, descriptor, context){\n if (!descriptor) return;\n\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0,\n });\n }\n" + ), + f = (0, s["default"])( + "\n function NAME(target, property, decorators, descriptor, context){\n var desc = {};\n Object['ke' + 'ys'](descriptor).forEach(function(key){\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n if ('value' in desc || desc.initializer){\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function(desc, decorator){\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0){\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0){\n // This is a hack to avoid this being processed by 'transform-runtime'.\n // See issue #9.\n Object['define' + 'Property'](target, property, desc);\n desc = null;\n }\n\n return desc;\n }\n" + ) + }, + 1428, + [7393, 902, 73, 39, 3516, 921, 3524, 391, 1604, 55], + [7332, 3385], + [7336, 3388], + [7337, 3389], + [7338, 3390], + [7342, 3392], + [7343, 1585], + [7344, 3378, 3377, 1585], + 1937, + [7346, 3417, 3416, 3409], + [7347, 3411], + [7349, 101], + [7350, 101], + [7351, 101, 3412], + [7352, 101, 3413], + [7353, 911, 197], + [7354, 3414, 197], + [7356, 911, 197], + [7357, 911, 3415, 197], + 2581, + 2582, + [7359, 903, 390], + [7360, 3394], + [7362, 101], + [7366, 903], + [7367, 903], + 559, + [7368, 101, 909, 910, 907, 390], + 1379, + [7370, 101, 489], + [7377, 3406, 904], + 1384, + [7379, 904], + [7381, 3396, 390, 600, 197], + [7382, 1587, 3408, 197], + [7383, 3395, 3403, 600, 489, 1590], + [7384, 598], + [7386, 489, 908], + [7387, 908, 1589], + [7388, 3407, 908], + 373, + [7390, 3405, 1590], + [7392, 3410, 600], + [7394, 317, 196, 73, 39, 318, 55], + [7397, 39, 73, 55, 318], + 2609, + [7398, 196, 73, 391], + [7399, 39, 55], + 2612, + [7400, 73, 39, 318, 55], + [7402, 39, 3427, 55], + [7403, 39, 55], + [7404, 39, 1586, 55, 3426], + [7405, 73, 39, 915, 55], + [7406, 317, 39, 55], + 2619, + [7408, 196, 73, 39, 1596, 3429, 318, 55], + [7409, 3430], + [7410, 73, 39, 3436, 391, 318, 1604, 55], + [7413, 317, 73, 39, 1598, 55], + [7414, 901, 196, 39, 73, 1597, 913, 55, 1617], + [7317, 73, 3452, 1601, 3451, 3450, 3437], + [7318, 3442, 3438, 3445, 3443, 3447], + [7319, 3440], + 2516, + [7321, 1599, 3441], + [7322, 1599], + 2519, + [7323, 3444], + 2521, + [7324, 3446], + 2521, + 2524, + 2525, + [7325, 1600], + [7326, 3448, 1600, 3449], + 2528, + [7327, 3453], + 2530, + [7431, 3455], + [7432, 3456], + 2648, + [7415, 7284], + 2626, + [7329, 3460], + 2533, + [7417, 3376, 73, 39, 3520, 3519, 3521, 1618, 391, 55], + [7418, 39, 73, 55, 914, 198], + [7419, 73, 198], + [7420, 73, 198], + [7421, 73, 198], + [7423, 198, 3462, 3463, 3465, 3467, 3468, 3464], + [7424, 73, 198], + [7425, 73, 198], + [7426, 39, 55], + [7428, 39, 55], + [7430, 73, 39, 1602, 3474, 55, 914], + 2525, + [7325, 1603], + [7326, 3472, 1603, 3473], + 2644, + 2650, + [7433, 3485, 3495, 603, 3515], + [7434, 3479], + [7435, 1607, 3487, 3505], + [7437, 3499, 601], + 1399, + 2658, + 2659, + [7438, 392], + [7440, 3491, 3492, 490, 1620, 3527], + 1402, + [7442, 1611, 3501], + [7444, 1610, 1619], + [7449, 3506, 3507, 3508, 150, 3522], + [7450, 1613, 201], + [7451, 3490, 3509, 201], + [7452, 916, 1613, 1615, 150, 919, 1616, 1605, 201, 920], + [7453, 916, 920], + 815, + [7454, 1612, 3498, 3503], + 2672, + 2673, + [7456, 124], + [7457, 124], + [7458, 490, 603, 1606], + [7459, 917, 199, 201], + [7460, 201], + [7461, 3480, 601], + [7462, 1606], + [7463, 490, 150], + [7464, 3482], + 2683, + [7465, 392], + [7467, 1616, 3525], + 2687, + 2688, + [7469, 3497], + 2690, + [7474, 604, 150, 602, 199, 1619], + 2692, + [7478, 1609, 490], + [7481, 124], + [7482, 3517, 200], + [7483, 200], + [7484, 3488, 604, 200], + [7485, 124], + [7487, 199, 200], + [7489, 921, 3483, 3504], + [7490, 916, 1615, 604, 150, 602, 919, 199, 1605, 920], + [7493, 392, 201], + [7494, 3496, 392], + [7495, 1614, 3493, 919], + function(e, t, r) { + "use strict" + var n = r(18)["default"], + i = r(7)["default"] + t.__esModule = !0 + var s = r(3529), + a = n(s), + o = r(13), + u = i(o) + ;(t["default"] = function(e) { + function t(t) { + if (t.node && !t.isPure()) { + var r = e.scope.generateDeclaredUidIdentifier() + n.push(u.assignmentExpression("=", r, t.node)), t.replaceWith(r) + } + } + function r(e) { + if (Array.isArray(e) && e.length) { + ;(e = e.reverse()), a["default"](e) + for (var r = 0; r < e.length; r++) { + var n = e[r] + t(n) + } + } + } + e.assertClass() + var n = [] + t(e.get("superClass")), r(e.get("decorators"), !0) + for (var i = e.get("body.body"), s = 0; s < i.length; s++) { + var o = i[s] + o.is("computed") && t(o.get("key")), + o.has("decorators") && r(e.get("decorators")) + } + n && + e.insertBefore( + n.map(function(e) { + return u.expressionStatement(e) + }) + ) + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + function n(e) { + for (var t = 0; t < e.length; t++) { + var r = e[t], + n = r.node, + i = n.expression + if (a.isMemberExpression(i)) { + var s = r.scope.maybeGenerateMemoised(i.object), + o = void 0, + u = [] + s + ? ((o = s), u.push(a.assignmentExpression("=", s, i.object))) + : (o = i.object), + u.push( + a.callExpression( + a.memberExpression( + a.memberExpression(o, i.property, i.computed), + a.identifier("bind") + ), + [o] + ) + ), + 1 === u.length + ? (n.expression = u[0]) + : (n.expression = a.sequenceExpression(u)) + } + } + } + var i = r(7)["default"] + ;(t.__esModule = !0), (t["default"] = n) + var s = r(13), + a = i(s) + e.exports = t["default"] + }, + [7332, 3537], + [7336, 3540], + [7337, 3541], + [7342, 3544], + [7344, 3532, 3531, 1622], + 1937, + [7346, 3569, 3568, 3561], + [7347, 3563], + [7349, 102], + [7350, 102], + [7351, 102, 3564], + [7352, 102, 3565], + [7353, 930, 202], + [7354, 3566, 202], + [7356, 930, 202], + [7357, 930, 3567, 202], + 2581, + 2582, + [7359, 922, 393], + [7360, 3546], + [7362, 102], + [7366, 922], + [7367, 922], + 559, + [7368, 102, 928, 929, 926, 393], + 1379, + [7370, 102, 493], + [7377, 3558, 923], + 1384, + [7379, 923], + [7381, 3548, 393, 609, 202], + [7382, 1625, 3560, 202], + [7383, 3547, 3555, 609, 493, 1628], + [7384, 607], + [7386, 493, 927], + [7387, 927, 1627], + [7388, 3559, 927], + 373, + [7390, 3557, 1628], + [7392, 3562, 609], + [7393, 492, 18, 7, 3640, 939, 3645, 494, 1640, 13], + [7394, 87, 83, 18, 7, 319, 13], + [7397, 7, 18, 13, 319], + 2609, + [7398, 83, 18, 494], + [7399, 7, 13], + 2612, + [7400, 18, 7, 319, 13], + [7402, 7, 3580, 13], + [7403, 7, 13], + [7404, 7, 606, 13, 3579], + [7405, 18, 7, 933, 13], + [7406, 87, 7, 13], + 2619, + [7408, 83, 18, 7, 1634, 3582, 319, 13], + [7409, 3583], + [7410, 18, 7, 3589, 494, 319, 1640, 13], + [7413, 87, 18, 7, 1636, 13], + [7414, 491, 83, 7, 18, 1635, 932, 13, 3639], + [7317, 18, 3605, 1639, 3604, 3603, 3590], + [7318, 3595, 3591, 3598, 3596, 3600], + [7319, 3593], + 2516, + [7321, 1637, 3594], + [7322, 1637], + 2519, + [7323, 3597], + 2521, + [7324, 3599], + 2521, + 2524, + 2525, + [7325, 1638], + [7326, 3601, 1638, 3602], + 2528, + [7327, 3606], + 2530, + [7431, 3608], + [7432, 3609], + 2648, + [7415, 7285], + 2626, + [7329, 3613], + 2533, + 1397, + 1399, + 812, + 2659, + [7438, 612], + 1402, + [7443, 3630], + [7445, 3620, 612], + [7446, 937], + [7447, 3632], + 1409, + 1410, + 815, + 2672, + 2673, + [7458, 934, 936, 1641], + [7460, 937], + [7462, 1641], + 2687, + 2688, + [7469, 3628], + 2690, + [7472, 320, 937], + [7474, 938, 320, 610, 394, 3646], + [7476, 3626, 320], + [7477, 1643, 934, 936], + [7478, 1643, 934], + [7481, 395], + [7482, 3641, 611], + [7486, 611], + [7489, 939, 3617, 3631], + [7490, 3622, 3625, 938, 320, 610, 3636, 394, 3614, 3638], + [7492, 938, 320, 610, 394, 395], + [7494, 3627, 612], + 1420, + [7417, 3530, 18, 7, 3749, 3748, 3750, 1668, 495, 13], + [7418, 7, 18, 13, 940, 203], + [7419, 18, 203], + [7420, 18, 203], + [7421, 18, 203], + [7423, 203, 3650, 3651, 3653, 3655, 3656, 3652], + [7424, 18, 203], + [7425, 18, 203], + [7426, 7, 13], + [7428, 7, 13], + [7430, 18, 7, 1646, 1654, 13, 940], + [7394, 87, 83, 18, 7, 321, 13], + [7397, 7, 18, 13, 321], + 2609, + [7398, 83, 18, 495], + [7399, 7, 13], + 2612, + [7400, 18, 7, 321, 13], + [7402, 7, 3669, 13], + [7403, 7, 13], + [7404, 7, 606, 13, 3668], + [7405, 18, 7, 943, 13], + [7406, 87, 7, 13], + 2619, + [7408, 83, 18, 7, 1648, 3671, 321, 13], + [7409, 3672], + [7410, 18, 7, 3678, 495, 321, 3693, 13], + [7413, 87, 18, 7, 1650, 13], + [7414, 491, 83, 7, 18, 1649, 942, 13, 1667], + [7317, 18, 3691, 1652, 3690, 1654, 3679], + [7318, 3684, 3680, 3687, 3685, 3689], + [7319, 3682], + 2516, + [7321, 1651, 3683], + [7322, 1651], + 2519, + [7323, 3686], + 2521, + [7324, 3688], + 2521, + 2524, + 2528, + [7327, 3692], + 2530, + 810, + [7431, 3695], + [7432, 3696], + 2648, + [7415, 7286], + 2626, + [7329, 3700], + 2533, + 2525, + [7325, 1653], + 2650, + 1397, + [7433, 3713, 3725, 615, 3745], + [7434, 3707], + [7435, 1656, 3716, 3735], + [7437, 3729, 614], + 1399, + 2658, + 2659, + [7438, 396], + [7440, 3720, 3721, 613, 1671, 3755], + [7441, 3709, 1656, 1657, 1659, 3741, 3742, 3743, 160, 125], + 1402, + [7442, 1659, 3731], + [7444, 1658, 1670], + [7449, 3736, 3737, 3738, 160, 3751], + [7450, 1662, 205], + [7451, 3719, 3739, 205], + [7452, 1660, 1662, 3723, 160, 1664, 1665, 3704, 205, 1666], + [7453, 1660, 1666], + 1410, + 815, + [7454, 1661, 3728, 3733], + 2672, + 2673, + [7456, 125], + [7457, 125], + [7458, 613, 615, 1655], + [7459, 944, 322, 205], + [7460, 205], + [7461, 3708, 614], + [7462, 1655], + [7463, 613, 160], + [7464, 3710], + 2683, + [7465, 396], + [7467, 1665, 3753], + 2687, + 2688, + [7469, 3727], + 2690, + [7474, 947, 160, 946, 322, 1670], + 2692, + [7481, 125], + [7482, 3746, 204], + [7483, 204], + [7484, 3717, 947, 204], + [7485, 125], + [7487, 322, 204], + [7489, 1669, 3711, 3734], + [7493, 396, 205], + [7494, 3726, 396], + [7495, 1663, 3722, 1664], + 2644, + function(e, t, r) { + "use strict" + function n(e, t) { + var r = t._guessExecutionStatusRelativeTo(e) + return "before" === r ? "inside" : "after" === r ? "outside" : "maybe" + } + function i(e, t) { + return u.callExpression(t.addHelper("temporalRef"), [ + e, + u.stringLiteral(e.name), + t.addHelper("temporalUndefined") + ]) + } + function s(e, t, r) { + var n = r.letReferences[e.name] + return n ? t.getBindingIdentifier(e.name) === n : !1 + } + var a = r(31)["default"] + t.__esModule = !0 + var o = r(40), + u = a(o), + l = { + ReferencedIdentifier: function(e, t) { + if (this.file.opts.tdz) { + var r = e.node, + a = e.parent, + o = e.scope + if (!e.parentPath.isFor({ left: r }) && s(r, o, t)) { + var l = o.getBinding(r.name).path, + c = n(e, l) + if ("inside" !== c) + if ("maybe" === c) { + var p = i(r, t.file) + if ( + ((l.parent._tdzThis = !0), + e.skip(), + e.parentPath.isUpdateExpression()) + ) { + if (a._ignoreBlockScopingTDZ) return + e.parentPath.replaceWith( + u.sequenceExpression([p, a]) + ) + } else e.replaceWith(p) + } else + "outside" === c && + e.replaceWith( + u.throwStatement( + u.inherits( + u.newExpression( + u.identifier("ReferenceError"), + [ + u.stringLiteral( + r.name + + " is not defined - temporal dead zone" + ) + ] + ), + r + ) + ) + ) + } + } + }, + AssignmentExpression: { + exit: function(e, t) { + if (this.file.opts.tdz) { + var r = e.node + if (!r._ignoreBlockScopingTDZ) { + var n = [], + a = e.getBindingIdentifiers() + for (var o in a) { + var l = a[o] + s(l, e.scope, t) && n.push(i(l, t.file)) + } + n.length && + ((r._ignoreBlockScopingTDZ = !0), + n.push(r), + e.replaceWithMultiple(n.map(u.expressionStatement))) + } + } + } + } + } + t.visitor = l + }, + [7332, 3767], + [7336, 3770], + [7337, 3771], + [7338, 3772], + [7342, 3774], + [7343, 1673], + [7344, 3760, 3759, 1673], + 1937, + [7346, 3799, 3798, 3791], + [7347, 3793], + [7349, 103], + [7350, 103], + [7351, 103, 3794], + [7352, 103, 3795], + [7353, 958, 208], + [7354, 3796, 208], + [7356, 958, 208], + [7357, 958, 3797, 208], + 2581, + 2582, + [7359, 950, 397], + [7360, 3776], + [7362, 103], + [7366, 950], + [7367, 950], + 559, + [7368, 103, 956, 957, 954, 397], + 1379, + [7370, 103, 496], + [7377, 3788, 951], + 1384, + [7379, 951], + [7381, 3778, 397, 622, 208], + [7382, 1675, 3790, 208], + [7383, 3777, 3785, 622, 496, 1678], + [7384, 620], + [7386, 496, 955], + [7387, 955, 1677], + [7388, 3789, 955], + 373, + [7390, 3787, 1678], + [7392, 3792, 622], + [7393, 619, 67, 31, 3901, 627, 3910, 323, 3801, 40], + 810, + [7394, 207, 206, 67, 31, 324, 40], + [7397, 31, 67, 40, 324], + 2609, + [7398, 206, 67, 323], + [7399, 31, 40], + 2612, + [7400, 67, 31, 324, 40], + [7402, 31, 3811, 40], + [7403, 31, 40], + [7404, 31, 1674, 40, 3810], + [7405, 67, 31, 962, 40], + [7406, 207, 31, 40], + 2619, + [7408, 206, 67, 31, 1684, 3813, 324, 40], + [7409, 3814], + [7410, 67, 31, 3820, 323, 324, 3838, 40], + [7413, 207, 67, 31, 1686, 40], + [7414, 949, 206, 31, 67, 1685, 960, 40, 1704], + [7317, 67, 3836, 1689, 3835, 3834, 3821], + [7318, 3826, 3822, 3829, 3827, 3831], + [7319, 3824], + 2516, + [7321, 1687, 3825], + [7322, 1687], + 2519, + [7323, 3828], + 2521, + [7324, 3830], + 2521, + 2524, + 2525, + [7325, 1688], + [7326, 3832, 1688, 3833], + 2528, + [7327, 3837], + 2530, + 810, + [7431, 3840], + [7432, 3841], + 2648, + [7415, 7287], + 2626, + [7329, 3845], + 2533, + [7417, 3758, 67, 31, 3905, 3904, 3906, 1705, 323, 40], + [7418, 31, 67, 40, 961, 209], + [7419, 67, 209], + [7420, 67, 209], + [7421, 67, 209], + [7423, 209, 3847, 3848, 3850, 3852, 3853, 3849], + [7424, 67, 209], + [7425, 67, 209], + [7426, 31, 40], + [7428, 31, 40], + [7430, 67, 31, 1690, 3859, 40, 961], + 2525, + [7325, 1691], + [7326, 3857, 1691, 3858], + 2644, + 2650, + [7433, 3870, 3880, 625, 3900], + [7434, 3864], + [7435, 1694, 3872, 3890], + [7437, 3884, 623], + 1399, + 2658, + 2659, + [7438, 398], + [7440, 3876, 3877, 497, 1708, 3912], + 1402, + [7442, 1698, 3886], + [7444, 1697, 1706], + [7449, 3891, 3892, 3893, 151, 3907], + [7450, 1700, 212], + [7451, 3875, 3894, 212], + [7452, 963, 1700, 1702, 151, 966, 1703, 1692, 212, 967], + [7453, 963, 967], + 815, + [7454, 1699, 3883, 3888], + 2672, + 2673, + [7456, 126], + [7457, 126], + [7458, 497, 625, 1693], + [7459, 964, 210, 212], + [7460, 212], + [7461, 3865, 623], + [7462, 1693], + [7463, 497, 151], + [7464, 3867], + 2683, + [7465, 398], + [7467, 1703, 3911], + 2687, + 2688, + [7469, 3882], + 2690, + [7474, 626, 151, 624, 210, 1706], + 2692, + [7478, 1696, 497], + [7481, 126], + [7482, 3902, 211], + [7483, 211], + [7484, 3873, 626, 211], + [7485, 126], + [7487, 210, 211], + [7489, 627, 3868, 3889], + function(e, t, r) { + e.exports = r(627) + }, + [7490, 963, 1702, 626, 151, 624, 966, 210, 1692, 967], + [7493, 398, 212], + [7495, 1701, 3878, 966], + function(e, t, r) { + "use strict" + var n = r(3949)["default"], + i = r(152)["default"], + s = r(32)["default"], + a = r(23)["default"] + t.__esModule = !0 + var o = r(971), + u = s(o), + l = r(1709), + c = s(l), + p = r(26), + f = a(p), + h = (function(e) { + function t() { + i(this, t), e.apply(this, arguments), (this.isLoose = !0) + } + return ( + n(t, e), + (t.prototype._processMethod = function(e, t) { + if (!e.decorators) { + var r = this.classRef + e["static"] || + (r = f.memberExpression(r, f.identifier("prototype"))) + var n = f.memberExpression( + r, + e.key, + e.computed || f.isLiteral(e.key) + ), + i = f.functionExpression( + null, + e.params, + e.body, + e.generator, + e.async + ), + s = f.toComputedKey(e, e.key) + f.isStringLiteral(s) && + (i = u["default"]({ node: i, id: s, scope: t })) + var a = f.expressionStatement(f.assignmentExpression("=", n, i)) + return f.inheritsComments(a, e), this.body.push(a), !0 + } + }), + t + ) + })(c["default"]) + ;(t["default"] = h), (e.exports = t["default"]) + }, + [7499, 32, 23, 971, 3916, 3935, 26], + 1397, + [7434, 3917], + [7435, 3918, 3919, 3929], + 812, + [7442, 3921, 3927], + [7443, 3928], + [7445, 3920, 3936], + [7446, 629], + 1409, + 1410, + 815, + [7455, 3938], + [7459, 1710, 399, 629], + [7460, 629], + [7463, 3926, 400], + [7472, 400, 629], + [7474, 970, 400, 968, 399, 3937], + [7476, 3925, 400], + [7481, 630], + [7482, 3933, 969], + [7490, 3922, 3924, 970, 400, 968, 3930, 399, 3915, 3932], + [7491, 1711, 1712, 630, 3931], + [7492, 970, 400, 968, 399, 630], + 1420, + [7498, 23, 26], + [7501, 152, 498, 32, 23, 1713, 631, 26], + [7332, 3952], + [7336, 3955], + [7337, 3956], + [7338, 3957], + [7340, 3959], + [7342, 3960], + [7343, 1714], + [7344, 3943, 3942, 1714], + [7345, 972, 3945], + 1937, + [7346, 3985, 3984, 3976], + [7347, 3978], + [7349, 97], + [7350, 97], + [7351, 97, 3979], + [7352, 97, 3980], + [7353, 983, 162], + [7354, 3981, 162], + [7355, 3982, 162], + [7356, 983, 162], + [7357, 983, 3983, 162], + 2581, + 2582, + [7359, 975, 401], + [7362, 97], + [7366, 975], + [7367, 975], + [7368, 97, 981, 982, 979, 401], + 1379, + [7370, 97, 500], + [7374, 97, 1719, 974, 1716], + [7377, 3973, 976], + 1384, + [7379, 976], + [7381, 3964, 401, 633, 162], + [7382, 974, 3975, 162], + [7383, 3963, 3969, 633, 500, 1720], + [7384, 499], + [7386, 500, 980], + [7387, 980, 1718], + [7388, 3974, 980], + [7389, 499, 3971], + 373, + [7390, 3972, 1720], + [7392, 3977, 633], + 810, + 1397, + 1398, + 1399, + 812, + [7438, 988], + [7441, 3989, 3990, 1726, 3995, 4004, 4005, 4006, 402, 403], + 1402, + [7443, 4002], + [7445, 3994, 988], + [7446, 986], + 1409, + 1410, + 815, + 2673, + [7458, 1727, 4007, 3988], + [7460, 986], + [7466, 3997], + 2688, + [7469, 4e3], + 2690, + [7471, 984, 634, 403], + [7472, 402, 986], + [7474, 987, 402, 634, 501, 4016], + [7476, 3999, 402], + [7478, 3992, 1727], + [7481, 403], + [7482, 4012, 985], + [7488, 3991, 1726, 4001], + [7490, 3996, 3998, 987, 402, 634, 4008, 501, 3987, 4010], + [7492, 987, 402, 634, 501, 403], + 1420, + [7394, 152, 161, 32, 23, 326, 26], + [7397, 23, 32, 26, 326], + 2609, + [7398, 161, 32, 325], + [7399, 23, 26], + 2612, + [7400, 32, 23, 326, 26], + [7402, 23, 4027, 26], + [7403, 23, 26], + [7404, 23, 1715, 26, 4026], + [7405, 32, 23, 990, 26], + [7406, 152, 23, 26], + 2619, + [7408, 161, 32, 23, 1730, 4029, 326, 26], + [7409, 4030], + [7410, 32, 23, 4036, 325, 326, 4054, 26], + [7413, 152, 32, 23, 1732, 26], + [7414, 973, 161, 23, 32, 1731, 631, 26, 4081], + [7317, 32, 4052, 1742, 4051, 4050, 4037], + [7318, 4042, 4038, 4045, 4043, 4047], + [7319, 4040], + 2516, + [7321, 1733, 4041], + [7322, 1733], + 2519, + [7323, 4044], + 2521, + [7324, 4046], + 2521, + 2524, + 2525, + [7325, 1734], + [7326, 4048, 1734, 4049], + 2528, + [7327, 4053], + 2530, + 810, + [7431, 4056], + [7432, 4057], + 2648, + [7415, 7288], + 2626, + 1399, + 812, + 2659, + [7438, 637], + [7441, 4060, 4061, 1736, 4067, 4076, 4077, 4078, 636, 404], + 1402, + [7443, 4073], + [7445, 4066, 637], + [7447, 4075], + 1409, + 2672, + 2673, + [7458, 1737, 993, 1735], + [7460, 4080], + [7462, 1735], + 2687, + 2688, + [7469, 4071], + 2690, + [7474, 1740, 636, 992, 502, 4086], + [7475, 404], + [7477, 4064, 1737, 993], + [7481, 404], + [7482, 4082, 635], + [7486, 635], + [7489, 1741, 4062, 4074], + [7492, 1740, 636, 992, 502, 404], + [7494, 4070, 637], + 1420, + [7329, 4090], + 2533, + [7417, 3941, 32, 23, 4149, 4148, 4150, 4151, 325, 26], + [7418, 23, 32, 26, 994, 213], + [7419, 32, 213], + [7420, 32, 213], + [7421, 32, 213], + [7423, 213, 4092, 4093, 4095, 4097, 4098, 4094], + [7424, 32, 213], + [7425, 32, 213], + [7426, 23, 26], + [7428, 23, 26], + [7430, 32, 23, 1743, 4104, 26, 994], + 2525, + [7325, 1744], + [7326, 4102, 1744, 4103], + 2650, + 1397, + [7433, 4114, 4127, 1752, 4144], + [7434, 4109], + [7435, 1745, 4117, 4134], + [7437, 4130, 638], + 1399, + 2658, + [7439, 4116, 639], + [7440, 4122, 4123, 995, 1757, 4154], + [7441, 4111, 1745, 4113, 1747, 4140, 4141, 4142, 216, 127], + 1402, + [7442, 1747, 4131], + [7444, 1746, 1756], + [7447, 4139], + [7449, 4135, 4136, 4137, 216, 4152], + [7450, 1749, 215], + [7451, 4121, 4138, 215], + [7452, 1748, 1749, 4125, 216, 1753, 1754, 4106, 215, 1755], + [7453, 1748, 1755], + 1410, + 815, + [7454, 4119, 4129, 4133], + 2673, + [7456, 127], + [7457, 127], + [7459, 1751, 405, 215], + [7460, 215], + [7461, 4110, 638], + [7463, 995, 216], + [7464, 4112], + 2683, + [7465, 639], + [7467, 1754, 4153], + 2687, + 2688, + [7469, 4128], + 2690, + [7474, 998, 216, 997, 405, 1756], + 2692, + [7477, 4115, 995, 1752], + [7481, 127], + [7482, 4146, 214], + [7483, 214], + [7484, 4118, 998, 214], + [7485, 127], + [7486, 214], + [7487, 405, 214], + [7493, 639, 215], + [7495, 1750, 4124, 1753], + 2644, + [7331, 4157], + [7346, 4181, 4180, 4178], + 2581, + 2582, + [7358, 4167], + [7359, 1758, 503], + [7360, 4158], + [7361, 4165], + [7363, 1e3, 999, 4162], + 465, + [7366, 1758], + 559, + [7368, 642, 1762, 1763, 1001, 503], + 1379, + 1380, + [7373, 1001], + [7376, 1e3], + [7377, 4174, 1759], + 1384, + [7378, 4166, 1759], + 805, + [7381, 4161, 503, 641, 999], + [7382, 4160, 4177, 999], + [7383, 4159, 4169, 641, 4175, 1761], + [7390, 4173, 1761], + [7392, 4179, 641], + 80, + [7497, 19, 8, 4184, 4185, 14], + [7498, 8, 14], + [7393, 508, 19, 8, 4211, 4214, 4215, 505, 4186, 14], + 810, + 1397, + 1398, + 1399, + 812, + [7438, 1006], + [7441, 4189, 4190, 1764, 4195, 4204, 4205, 4206, 406, 407], + 1402, + [7443, 4202], + [7445, 4194, 1006], + [7446, 1004], + 1409, + 1410, + 815, + 2673, + [7458, 1765, 4207, 4188], + [7460, 1004], + [7466, 4197], + 2688, + [7469, 4200], + 2690, + [7471, 1002, 646, 407], + [7472, 406, 1004], + [7474, 1005, 406, 646, 504, 4216], + [7476, 4199, 406], + [7478, 4192, 1765], + [7481, 407], + [7482, 4212, 1003], + [7488, 4191, 1764, 4201], + [7490, 4196, 4198, 1005, 406, 646, 4208, 504, 4187, 4210], + [7492, 1005, 406, 646, 504, 407], + 1420, + [7394, 89, 88, 19, 8, 327, 14], + [7397, 8, 19, 14, 327], + 2609, + [7398, 88, 19, 505], + [7399, 8, 14], + 2612, + [7400, 19, 8, 327, 14], + [7402, 8, 4227, 14], + [7403, 8, 14], + [7404, 8, 650, 14, 4226], + [7405, 19, 8, 1009, 14], + [7406, 89, 8, 14], + 2619, + [7408, 88, 19, 8, 1768, 4229, 327, 14], + [7409, 4230], + [7410, 19, 8, 4236, 505, 327, 4254, 14], + [7413, 89, 19, 8, 1770, 14], + [7414, 507, 88, 8, 19, 1769, 1008, 14, 4281], + [7317, 19, 4252, 1780, 4251, 4250, 4237], + [7318, 4242, 4238, 4245, 4243, 4247], + [7319, 4240], + 2516, + [7321, 1771, 4241], + [7322, 1771], + 2519, + [7323, 4244], + 2521, + [7324, 4246], + 2521, + 2524, + 2525, + [7325, 1772], + [7326, 4248, 1772, 4249], + 2528, + [7327, 4253], + 2530, + 810, + [7431, 4256], + [7432, 4257], + 2648, + [7415, 7289], + 2626, + 1399, + 812, + 2659, + [7438, 649], + [7441, 4260, 4261, 1774, 4267, 4276, 4277, 4278, 648, 408], + 1402, + [7443, 4273], + [7445, 4266, 649], + [7447, 4275], + 1409, + 2672, + 2673, + [7458, 1775, 1012, 1773], + [7460, 4280], + [7462, 1773], + 2687, + 2688, + [7469, 4271], + 2690, + [7474, 1778, 648, 1011, 506, 4286], + [7475, 408], + [7477, 4264, 1775, 1012], + [7481, 408], + [7482, 4282, 647], + [7486, 647], + [7489, 1779, 4262, 4274], + [7492, 1778, 648, 1011, 506, 408], + [7494, 4270, 649], + 1420, + [7329, 4290], + 2533, + [7332, 4298], + [7336, 4301], + [7337, 4302], + [7342, 4305], + [7344, 4293, 4292, 1781], + 1937, + [7346, 4330, 4329, 4322], + [7347, 4324], + [7349, 104], + [7350, 104], + [7351, 104, 4325], + [7352, 104, 4326], + [7353, 1022, 217], + [7354, 4327, 217], + [7356, 1022, 217], + [7357, 1022, 4328, 217], + 2581, + 2582, + [7359, 1014, 409], + [7360, 4307], + [7362, 104], + [7366, 1014], + [7367, 1014], + 559, + [7368, 104, 1020, 1021, 1018, 409], + 1379, + [7370, 104, 509], + [7377, 4319, 1015], + 1384, + [7379, 1015], + [7381, 4309, 409, 653, 217], + [7382, 1784, 4321, 217], + [7383, 4308, 4316, 653, 509, 1787], + [7384, 651], + [7386, 509, 1019], + [7387, 1019, 1786], + [7388, 4320, 1019], + 373, + [7390, 4318, 1787], + [7392, 4323, 653], + [7417, 4291, 19, 8, 4431, 4430, 4432, 1814, 510, 14], + [7418, 8, 19, 14, 1023, 218], + [7419, 19, 218], + [7420, 19, 218], + [7421, 19, 218], + [7423, 218, 4332, 4333, 4335, 4337, 4338, 4334], + [7424, 19, 218], + [7425, 19, 218], + [7426, 8, 14], + [7428, 8, 14], + [7430, 19, 8, 1792, 1800, 14, 1023], + [7394, 89, 88, 19, 8, 328, 14], + [7397, 8, 19, 14, 328], + 2609, + [7398, 88, 19, 510], + [7399, 8, 14], + 2612, + [7400, 19, 8, 328, 14], + [7402, 8, 4351, 14], + [7403, 8, 14], + [7404, 8, 650, 14, 4350], + [7405, 19, 8, 1026, 14], + [7406, 89, 8, 14], + 2619, + [7408, 88, 19, 8, 1794, 4353, 328, 14], + [7409, 4354], + [7410, 19, 8, 4360, 510, 328, 4375, 14], + [7413, 89, 19, 8, 1796, 14], + [7414, 507, 88, 8, 19, 1795, 1025, 14, 1813], + [7317, 19, 4373, 1798, 4372, 1800, 4361], + [7318, 4366, 4362, 4369, 4367, 4371], + [7319, 4364], + 2516, + [7321, 1797, 4365], + [7322, 1797], + 2519, + [7323, 4368], + 2521, + [7324, 4370], + 2521, + 2524, + 2528, + [7327, 4374], + 2530, + 810, + [7431, 4377], + [7432, 4378], + 2648, + [7415, 7290], + 2626, + [7329, 4382], + 2533, + 2525, + [7325, 1799], + 2650, + 1397, + [7433, 4395, 4407, 656, 4427], + [7434, 4389], + [7435, 1802, 4398, 4417], + [7437, 4411, 655], + 1399, + 2658, + 2659, + [7438, 410], + [7440, 4402, 4403, 654, 1817, 4437], + [7441, 4391, 1802, 1803, 1805, 4423, 4424, 4425, 163, 128], + 1402, + [7442, 1805, 4413], + [7444, 1804, 1816], + [7449, 4418, 4419, 4420, 163, 4433], + [7450, 1808, 220], + [7451, 4401, 4421, 220], + [7452, 1806, 1808, 4405, 163, 1810, 1811, 4386, 220, 1812], + [7453, 1806, 1812], + 1410, + 815, + [7454, 1807, 4410, 4415], + 2672, + 2673, + [7456, 128], + [7457, 128], + [7458, 654, 656, 1801], + [7459, 1027, 329, 220], + [7460, 220], + [7461, 4390, 655], + [7462, 1801], + [7463, 654, 163], + [7464, 4392], + 2683, + [7465, 410], + [7467, 1811, 4435], + 2687, + 2688, + [7469, 4409], + 2690, + [7474, 1030, 163, 1029, 329, 1816], + 2692, + [7481, 128], + [7482, 4428, 219], + [7483, 219], + [7484, 4399, 1030, 219], + [7485, 128], + [7487, 329, 219], + [7489, 1815, 4393, 4416], + [7493, 410, 220], + [7494, 4408, 410], + [7495, 1809, 4404, 1810], + 2644, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + BinaryExpression: function(e) { + var r = e.node + "instanceof" === r.operator && + e.replaceWith( + t.callExpression(this.addHelper("instanceof"), [ + r.left, + r.right + ]) + ) + } + } + } + }), + (e.exports = t["default"]) + }, + [7332, 4449], + [7336, 4452], + [7337, 4453], + [7338, 4454], + [7342, 4456], + [7343, 1819], + [7344, 4442, 4441, 1819], + 1937, + [7346, 4481, 4480, 4473], + [7347, 4475], + [7349, 105], + [7350, 105], + [7351, 105, 4476], + [7352, 105, 4477], + [7353, 1042, 222], + [7354, 4478, 222], + [7356, 1042, 222], + [7357, 1042, 4479, 222], + 2581, + 2582, + [7359, 1034, 411], + [7360, 4458], + [7362, 105], + [7366, 1034], + [7367, 1034], + 559, + [7368, 105, 1040, 1041, 1038, 411], + 1379, + [7370, 105, 511], + [7377, 4470, 1035], + 1384, + [7379, 1035], + [7381, 4460, 411, 660, 222], + [7382, 1821, 4472, 222], + [7383, 4459, 4467, 660, 511, 1824], + [7384, 658], + [7386, 511, 1039], + [7387, 1039, 1823], + [7388, 4471, 1039], + 373, + [7390, 4469, 1824], + [7392, 4474, 660], + [7393, 1033, 68, 41, 4581, 1052, 4589, 412, 1838, 56], + [7394, 330, 221, 68, 41, 331, 56], + [7397, 41, 68, 56, 331], + 2609, + [7398, 221, 68, 412], + [7399, 41, 56], + 2612, + [7400, 68, 41, 331, 56], + [7402, 41, 4492, 56], + [7403, 41, 56], + [7404, 41, 1820, 56, 4491], + [7405, 68, 41, 1046, 56], + [7406, 330, 41, 56], + 2619, + [7408, 221, 68, 41, 1830, 4494, 331, 56], + [7409, 4495], + [7410, 68, 41, 4501, 412, 331, 1838, 56], + [7413, 330, 68, 41, 1832, 56], + [7414, 1032, 221, 41, 68, 1831, 1044, 56, 1851], + [7317, 68, 4517, 1835, 4516, 4515, 4502], + [7318, 4507, 4503, 4510, 4508, 4512], + [7319, 4505], + 2516, + [7321, 1833, 4506], + [7322, 1833], + 2519, + [7323, 4509], + 2521, + [7324, 4511], + 2521, + 2524, + 2525, + [7325, 1834], + [7326, 4513, 1834, 4514], + 2528, + [7327, 4518], + 2530, + [7431, 4520], + [7432, 4521], + 2648, + [7415, 7291], + 2626, + [7329, 4525], + 2533, + [7417, 4440, 68, 41, 4585, 4584, 4586, 1852, 412, 56], + [7418, 41, 68, 56, 1045, 223], + [7419, 68, 223], + [7420, 68, 223], + [7421, 68, 223], + [7423, 223, 4527, 4528, 4530, 4532, 4533, 4529], + [7424, 68, 223], + [7425, 68, 223], + [7426, 41, 56], + [7428, 41, 56], + [7430, 68, 41, 1836, 4539, 56, 1045], + 2525, + [7325, 1837], + [7326, 4537, 1837, 4538], + 2644, + 2650, + [7433, 4550, 4560, 663, 4580], + [7434, 4544], + [7435, 1841, 4552, 4570], + [7437, 4564, 661], + 1399, + 2658, + 2659, + [7438, 413], + [7440, 4556, 4557, 512, 1854, 4592], + 1402, + [7442, 1845, 4566], + [7444, 1844, 1853], + [7449, 4571, 4572, 4573, 153, 4587], + [7450, 1847, 226], + [7451, 4555, 4574, 226], + [7452, 1047, 1847, 1849, 153, 1050, 1850, 1839, 226, 1051], + [7453, 1047, 1051], + 815, + [7454, 1846, 4563, 4568], + 2672, + 2673, + [7456, 129], + [7457, 129], + [7458, 512, 663, 1840], + [7459, 1048, 224, 226], + [7460, 226], + [7461, 4545, 661], + [7462, 1840], + [7463, 512, 153], + [7464, 4547], + 2683, + [7465, 413], + [7467, 1850, 4590], + 2687, + 2688, + [7469, 4562], + 2690, + [7474, 664, 153, 662, 224, 1853], + 2692, + [7478, 1843, 512], + [7481, 129], + [7482, 4582, 225], + [7483, 225], + [7484, 4553, 664, 225], + [7485, 129], + [7487, 224, 225], + [7489, 1052, 4548, 4569], + [7490, 1047, 1849, 664, 153, 662, 1050, 224, 1839, 1051], + [7493, 413, 226], + [7494, 4561, 413], + [7495, 1848, 4558, 1050], + [7332, 4600], + [7336, 4603], + [7337, 4604], + [7342, 4607], + [7344, 4595, 4594, 1855], + 1937, + [7346, 4632, 4631, 4624], + [7347, 4626], + [7349, 106], + [7350, 106], + [7351, 106, 4627], + [7352, 106, 4628], + [7353, 1062, 227], + [7354, 4629, 227], + [7356, 1062, 227], + [7357, 1062, 4630, 227], + 2581, + 2582, + [7359, 1054, 416], + [7360, 4609], + [7362, 106], + [7366, 1054], + [7367, 1054], + 559, + [7368, 106, 1060, 1061, 1058, 416], + 1379, + [7370, 106, 513], + [7377, 4621, 1055], + 1384, + [7379, 1055], + [7381, 4611, 416, 669, 227], + [7382, 1858, 4623, 227], + [7383, 4610, 4618, 669, 513, 1861], + [7384, 667], + [7386, 513, 1059], + [7387, 1059, 1860], + [7388, 4622, 1059], + 373, + [7390, 4620, 1861], + [7392, 4625, 669], + [7393, 415, 21, 9, 4703, 1071, 4708, 514, 1873, 15], + [7394, 90, 84, 21, 9, 332, 15], + [7397, 9, 21, 15, 332], + 2609, + [7398, 84, 21, 514], + [7399, 9, 15], + 2612, + [7400, 21, 9, 332, 15], + [7402, 9, 4643, 15], + [7403, 9, 15], + [7404, 9, 666, 15, 4642], + [7405, 21, 9, 1065, 15], + [7406, 90, 9, 15], + 2619, + [7408, 84, 21, 9, 1867, 4645, 332, 15], + [7409, 4646], + [7410, 21, 9, 4652, 514, 332, 1873, 15], + [7413, 90, 21, 9, 1869, 15], + [7414, 414, 84, 9, 21, 1868, 1064, 15, 4702], + [7317, 21, 4668, 1872, 4667, 4666, 4653], + [7318, 4658, 4654, 4661, 4659, 4663], + [7319, 4656], + 2516, + [7321, 1870, 4657], + [7322, 1870], + 2519, + [7323, 4660], + 2521, + [7324, 4662], + 2521, + 2524, + 2525, + [7325, 1871], + [7326, 4664, 1871, 4665], + 2528, + [7327, 4669], + 2530, + [7431, 4671], + [7432, 4672], + 2648, + [7415, 7292], + 2626, + [7329, 4676], + 2533, + 1397, + 1399, + 812, + 2659, + [7438, 672], + 1402, + [7443, 4693], + [7445, 4683, 672], + [7446, 1069], + [7447, 4695], + 1409, + 1410, + 815, + 2672, + 2673, + [7458, 1066, 1068, 1874], + [7460, 1069], + [7462, 1874], + 2687, + 2688, + [7469, 4691], + 2690, + [7472, 333, 1069], + [7474, 1070, 333, 670, 417, 4709], + [7476, 4689, 333], + [7477, 1876, 1066, 1068], + [7478, 1876, 1066], + [7481, 418], + [7482, 4704, 671], + [7486, 671], + [7489, 1071, 4680, 4694], + [7490, 4685, 4688, 1070, 333, 670, 4699, 417, 4677, 4701], + [7492, 1070, 333, 670, 417, 418], + [7494, 4690, 672], + 1420, + [7417, 4593, 21, 9, 4812, 4811, 4813, 1901, 515, 15], + [7418, 9, 21, 15, 1072, 228], + [7419, 21, 228], + [7420, 21, 228], + [7421, 21, 228], + [7423, 228, 4713, 4714, 4716, 4718, 4719, 4715], + [7424, 21, 228], + [7425, 21, 228], + [7426, 9, 15], + [7428, 9, 15], + [7430, 21, 9, 1879, 1887, 15, 1072], + [7394, 90, 84, 21, 9, 334, 15], + [7397, 9, 21, 15, 334], + 2609, + [7398, 84, 21, 515], + [7399, 9, 15], + 2612, + [7400, 21, 9, 334, 15], + [7402, 9, 4732, 15], + [7403, 9, 15], + [7404, 9, 666, 15, 4731], + [7405, 21, 9, 1075, 15], + [7406, 90, 9, 15], + 2619, + [7408, 84, 21, 9, 1881, 4734, 334, 15], + [7409, 4735], + [7410, 21, 9, 4741, 515, 334, 4756, 15], + [7413, 90, 21, 9, 1883, 15], + [7414, 414, 84, 9, 21, 1882, 1074, 15, 1900], + [7317, 21, 4754, 1885, 4753, 1887, 4742], + [7318, 4747, 4743, 4750, 4748, 4752], + [7319, 4745], + 2516, + [7321, 1884, 4746], + [7322, 1884], + 2519, + [7323, 4749], + 2521, + [7324, 4751], + 2521, + 2524, + 2528, + [7327, 4755], + 2530, + 810, + [7431, 4758], + [7432, 4759], + 2648, + [7415, 7293], + 2626, + [7329, 4763], + 2533, + 2525, + [7325, 1886], + 2650, + 1397, + [7433, 4776, 4788, 675, 4808], + [7434, 4770], + [7435, 1889, 4779, 4798], + [7437, 4792, 674], + 1399, + 2658, + 2659, + [7438, 419], + [7440, 4783, 4784, 673, 1904, 4818], + [7441, 4772, 1889, 1890, 1892, 4804, 4805, 4806, 164, 130], + 1402, + [7442, 1892, 4794], + [7444, 1891, 1903], + [7449, 4799, 4800, 4801, 164, 4814], + [7450, 1895, 230], + [7451, 4782, 4802, 230], + [7452, 1893, 1895, 4786, 164, 1897, 1898, 4767, 230, 1899], + [7453, 1893, 1899], + 1410, + 815, + [7454, 1894, 4791, 4796], + 2672, + 2673, + [7456, 130], + [7457, 130], + [7458, 673, 675, 1888], + [7459, 1076, 335, 230], + [7460, 230], + [7461, 4771, 674], + [7462, 1888], + [7463, 673, 164], + [7464, 4773], + 2683, + [7465, 419], + [7467, 1898, 4816], + 2687, + 2688, + [7469, 4790], + 2690, + [7474, 1079, 164, 1078, 335, 1903], + 2692, + [7481, 130], + [7482, 4809, 229], + [7483, 229], + [7484, 4780, 1079, 229], + [7485, 130], + [7487, 335, 229], + [7489, 1902, 4774, 4797], + [7493, 419, 230], + [7494, 4789, 419], + [7495, 1896, 4785, 1897], + 2644, + function(e, t, r) { + "use strict" + var n = r(422)["default"], + i = r(82)["default"], + s = r(517)["default"], + a = r(10)["default"] + t.__esModule = !0 + var o = r(4821), + u = a(o), + l = r(4966), + c = a(l), + p = c["default"]( + "\n System.register(MODULE_NAME, [SOURCES], function (EXPORT_IDENTIFIER, CONTEXT_IDENTIFIER) {\n BEFORE_BODY;\n return {\n setters: [SETTERS],\n execute: function () {\n BODY;\n }\n };\n });\n" + ), + f = c["default"]( + '\n for (var KEY in TARGET) {\n if (KEY !== "default") EXPORT_OBJ[KEY] = TARGET[KEY];\n }\n' + ) + ;(t["default"] = function(e) { + var t = e.types, + a = n(), + o = { + "AssignmentExpression|UpdateExpression": function(e) { + if (!e.node[a]) { + e.node[a] = !0 + var t = e.get(e.isAssignmentExpression() ? "left" : "argument") + if (t.isIdentifier()) { + var r = t.node.name + if (this.scope.getBinding(r) === e.scope.getBinding(r)) { + var n = this.exports[r] + if (n) { + for ( + var s = e.node, + o = n, + u = Array.isArray(o), + l = 0, + o = u ? o : i(o); + ; + + ) { + var c + if (u) { + if (l >= o.length) break + c = o[l++] + } else { + if (((l = o.next()), l.done)) break + c = l.value + } + var p = c + s = this.buildCall(p, s).expression + } + e.replaceWith(s) + } + } + } + } + } + } + return { + inherits: r(1328), + visitor: { + ReferencedIdentifier: function(e, r) { + "__moduleName" != e.node.name || + e.scope.hasBinding("__moduleName") || + e.replaceWith( + t.memberExpression(r.contextIdent, t.identifier("id")) + ) + }, + Program: { + enter: function(e, t) { + t.contextIdent = e.scope.generateUidIdentifier("context") + }, + exit: function(e, r) { + function n(e, t) { + ;(d[e] = d[e] || []), d[e].push(t) + } + function a(e, t, r) { + var n = (m[e] = m[e] || { imports: [], exports: [] }) + n[t] = n[t].concat(r) + } + function l(e, r) { + return t.expressionStatement( + t.callExpression(c, [t.stringLiteral(e), r]) + ) + } + for ( + var c = e.scope.generateUidIdentifier("export"), + h = r.contextIdent, + d = s(null), + m = s(null), + y = [], + v = [], + g = [], + E = [], + b = e.get("body"), + x = !0, + A = 0; + A < b.length; + A++ + ) { + var D = b[A] + if ( + (D.isExportDeclaration() && (D = D.get("declaration")), + D.isVariableDeclaration() && "var" !== D.node.kind) + ) { + x = !1 + break + } + } + for (var C = 0; C < b.length; C++) { + var S = b[C] + if (x && S.isFunctionDeclaration()) + y.push(S.node), S.remove() + else if (S.isImportDeclaration()) { + var F = S.node.source.value + a(F, "imports", S.node.specifiers) + for (var w in S.getBindingIdentifiers()) + S.scope.removeBinding(w), E.push(t.identifier(w)) + S.remove() + } else if (S.isExportAllDeclaration()) + a(S.node.source.value, "exports", S.node), S.remove() + else if (S.isExportDefaultDeclaration()) { + var _ = S.get("declaration") + if ( + _.isClassDeclaration() || + _.isFunctionDeclaration() + ) { + var T = _.node.id, + P = [] + T + ? (P.push(_.node), + P.push(l("default", T)), + n(T.name, "default")) + : P.push(l("default", t.toExpression(_.node))), + !x || _.isClassDeclaration() + ? S.replaceWithMultiple(P) + : ((y = y.concat(P)), S.remove()) + } else S.replaceWith(l("default", _.node)) + } else if (S.isExportNamedDeclaration()) { + var _ = S.get("declaration") + if (_.node) { + S.replaceWith(_) + var P = [], + B = void 0 + if (S.isFunction()) { + var k + ;(k = {}), + (k[_.node.id.name] = _.node.id), + (B = k) + } else B = _.getBindingIdentifiers() + for (var I in B) + n(I, I), P.push(l(I, t.identifier(I))) + S.insertAfter(P) + } + var O = S.node.specifiers + if (O && O.length) + if (S.node.source) + a(S.node.source.value, "exports", O), S.remove() + else { + for ( + var P = [], + M = O, + R = Array.isArray(M), + L = 0, + M = R ? M : i(M); + ; + + ) { + var N + if (R) { + if (L >= M.length) break + N = M[L++] + } else { + if (((L = M.next()), L.done)) break + N = L.value + } + var j = N + P.push(l(j.exported.name, j.local)), + n(j.local.name, j.exported.name) + } + S.replaceWithMultiple(P) + } + } + } + for (var F in m) { + for ( + var O = m[F], + U = [], + V = e.scope.generateUidIdentifier(F), + G = O.imports, + W = Array.isArray(G), + q = 0, + G = W ? G : i(G); + ; + + ) { + var H + if (W) { + if (q >= G.length) break + H = G[q++] + } else { + if (((q = G.next()), q.done)) break + H = q.value + } + var j = H + t.isImportNamespaceSpecifier(j) + ? U.push( + t.expressionStatement( + t.assignmentExpression("=", j.local, V) + ) + ) + : t.isImportDefaultSpecifier(j) && + (j = t.importSpecifier( + j.local, + t.identifier("default") + )), + t.isImportSpecifier(j) && + U.push( + t.expressionStatement( + t.assignmentExpression( + "=", + j.local, + t.memberExpression(V, j.imported) + ) + ) + ) + } + if (O.exports.length) { + var Y = e.scope.generateUidIdentifier("exportObj") + U.push( + t.variableDeclaration("var", [ + t.variableDeclarator(Y, t.objectExpression([])) + ]) + ) + for ( + var J = O.exports, + K = Array.isArray(J), + X = 0, + J = K ? J : i(J); + ; + + ) { + var z + if (K) { + if (X >= J.length) break + z = J[X++] + } else { + if (((X = J.next()), X.done)) break + z = X.value + } + var $ = z + t.isExportAllDeclaration($) + ? U.push( + f({ + KEY: e.scope.generateUidIdentifier( + "key" + ), + EXPORT_OBJ: Y, + TARGET: V + }) + ) + : t.isExportSpecifier($) && + U.push( + t.expressionStatement( + t.assignmentExpression( + "=", + t.memberExpression(Y, $.exported), + t.memberExpression(V, $.local) + ) + ) + ) + } + U.push(t.expressionStatement(t.callExpression(c, [Y]))) + } + g.push(t.stringLiteral(F)), + v.push( + t.functionExpression(null, [V], t.blockStatement(U)) + ) + } + var Q = this.getModuleName() + Q && (Q = t.stringLiteral(Q)), + x && + u["default"](e, function(e) { + return E.push(e) + }), + E.length && + y.unshift( + t.variableDeclaration( + "var", + E.map(function(e) { + return t.variableDeclarator(e) + }) + ) + ), + e.traverse(o, { exports: d, buildCall: l, scope: e.scope }), + (e.node.body = [ + p({ + BEFORE_BODY: y, + MODULE_NAME: Q, + SETTERS: v, + SOURCES: g, + BODY: e.node.body, + EXPORT_IDENTIFIER: c, + CONTEXT_IDENTIFIER: h + }) + ]) + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7502, 2, 57], + [7417, 1931, 10, 2, 4922, 4921, 4923, 1927, 516, 57], + [7418, 2, 10, 57, 1080, 231], + [7419, 10, 231], + [7420, 10, 231], + [7421, 10, 231], + [7423, 231, 4823, 4824, 4826, 4828, 4829, 4825], + [7424, 10, 231], + [7425, 10, 231], + [7426, 2, 57], + [7428, 2, 57], + [7430, 10, 2, 1905, 1913, 57, 1080], + [7394, 91, 82, 10, 2, 336, 57], + [7397, 2, 10, 57, 336], + 2609, + [7398, 82, 10, 516], + [7399, 2, 57], + 2612, + [7400, 10, 2, 336, 57], + [7402, 2, 4842, 57], + [7403, 2, 57], + [7404, 2, 679, 57, 4841], + [7405, 10, 2, 1083, 57], + [7406, 91, 2, 57], + 2619, + [7408, 82, 10, 2, 1907, 4844, 336, 57], + [7409, 4845], + [7410, 10, 2, 4851, 516, 336, 4866, 57], + [7413, 91, 10, 2, 1909, 57], + [7414, 421, 82, 2, 10, 1908, 1082, 57, 1926], + [7317, 10, 4864, 1911, 4863, 1913, 4852], + [7318, 4857, 4853, 4860, 4858, 4862], + [7319, 4855], + 2516, + [7321, 1910, 4856], + [7322, 1910], + 2519, + [7323, 4859], + 2521, + [7324, 4861], + 2521, + 2524, + 2528, + [7327, 4865], + 2530, + 810, + [7431, 4868], + [7432, 4869], + 2648, + [7415, 7294], + 2626, + [7329, 4873], + 2533, + 2525, + [7325, 1912], + 2650, + 1397, + [7433, 4886, 4898, 678, 4918], + [7434, 4880], + [7435, 1915, 4889, 4908], + [7437, 4902, 677], + 1399, + 2658, + 2659, + [7438, 420], + [7440, 4893, 4894, 676, 1930, 4928], + [7441, 4882, 1915, 1916, 1918, 4914, 4915, 4916, 165, 131], + 1402, + [7442, 1918, 4904], + [7444, 1917, 1929], + [7449, 4909, 4910, 4911, 165, 4924], + [7450, 1921, 233], + [7451, 4892, 4912, 233], + [7452, 1919, 1921, 4896, 165, 1923, 1924, 4877, 233, 1925], + [7453, 1919, 1925], + 1410, + 815, + [7454, 1920, 4901, 4906], + 2672, + 2673, + [7456, 131], + [7457, 131], + [7458, 676, 678, 1914], + [7459, 1084, 337, 233], + [7460, 233], + [7461, 4881, 677], + [7462, 1914], + [7463, 676, 165], + [7464, 4883], + 2683, + [7465, 420], + [7467, 1924, 4926], + 2687, + 2688, + [7469, 4900], + 2690, + [7474, 1087, 165, 1086, 337, 1929], + 2692, + [7481, 131], + [7482, 4919, 232], + [7483, 232], + [7484, 4890, 1087, 232], + [7485, 131], + [7487, 337, 232], + [7489, 1928, 4884, 4907], + [7493, 420, 233], + [7494, 4899, 420], + [7495, 1922, 4895, 1923], + 2644, + [7336, 4936], + [7337, 4937], + [7346, 4965, 4964, 4957], + [7347, 4959], + [7349, 107], + [7350, 107], + [7351, 107, 4960], + [7352, 107, 4961], + [7353, 1096, 234], + [7354, 4962, 234], + [7356, 1096, 234], + [7357, 1096, 4963, 234], + 2581, + 2582, + [7359, 1088, 423], + [7360, 4942], + [7362, 107], + [7366, 1088], + [7367, 1088], + 559, + [7368, 107, 1094, 1095, 1092, 423], + 1379, + [7370, 107, 518], + [7377, 4954, 1089], + 1384, + [7379, 1089], + [7381, 4944, 423, 682, 234], + [7382, 1938, 4956, 234], + [7383, 4943, 4951, 682, 518, 1941], + [7384, 680], + [7386, 518, 1093], + [7387, 1093, 1940], + [7388, 4955, 1093], + 373, + [7390, 4953, 1941], + [7392, 4958, 682], + [7393, 422, 10, 2, 5065, 1106, 5073, 424, 1955, 58], + [7394, 91, 82, 10, 2, 338, 58], + [7397, 2, 10, 58, 338], + 2609, + [7398, 82, 10, 424], + [7399, 2, 58], + 2612, + [7400, 10, 2, 338, 58], + [7402, 2, 4976, 58], + [7403, 2, 58], + [7404, 2, 679, 58, 4975], + [7405, 10, 2, 1100, 58], + [7406, 91, 2, 58], + 2619, + [7408, 82, 10, 2, 1947, 4978, 338, 58], + [7409, 4979], + [7410, 10, 2, 4985, 424, 338, 1955, 58], + [7413, 91, 10, 2, 1949, 58], + [7414, 421, 82, 2, 10, 1948, 1098, 58, 1968], + [7317, 10, 5001, 1952, 5e3, 4999, 4986], + [7318, 4991, 4987, 4994, 4992, 4996], + [7319, 4989], + 2516, + [7321, 1950, 4990], + [7322, 1950], + 2519, + [7323, 4993], + 2521, + [7324, 4995], + 2521, + 2524, + 2525, + [7325, 1951], + [7326, 4997, 1951, 4998], + 2528, + [7327, 5002], + 2530, + [7431, 5004], + [7432, 5005], + 2648, + [7415, 7295], + 2626, + [7329, 5009], + 2533, + [7417, 1931, 10, 2, 5069, 5068, 5070, 1969, 424, 58], + [7418, 2, 10, 58, 1099, 235], + [7419, 10, 235], + [7420, 10, 235], + [7421, 10, 235], + [7423, 235, 5011, 5012, 5014, 5016, 5017, 5013], + [7424, 10, 235], + [7425, 10, 235], + [7426, 2, 58], + [7428, 2, 58], + [7430, 10, 2, 1953, 5023, 58, 1099], + 2525, + [7325, 1954], + [7326, 5021, 1954, 5022], + 2644, + 2650, + [7433, 5034, 5044, 685, 5064], + [7434, 5028], + [7435, 1958, 5036, 5054], + [7437, 5048, 683], + 1399, + 2658, + 2659, + [7438, 425], + [7440, 5040, 5041, 519, 1971, 5076], + 1402, + [7442, 1962, 5050], + [7444, 1961, 1970], + [7449, 5055, 5056, 5057, 154, 5071], + [7450, 1964, 238], + [7451, 5039, 5058, 238], + [7452, 1101, 1964, 1966, 154, 1104, 1967, 1956, 238, 1105], + [7453, 1101, 1105], + 815, + [7454, 1963, 5047, 5052], + 2672, + 2673, + [7456, 132], + [7457, 132], + [7458, 519, 685, 1957], + [7459, 1102, 236, 238], + [7460, 238], + [7461, 5029, 683], + [7462, 1957], + [7463, 519, 154], + [7464, 5031], + 2683, + [7465, 425], + [7467, 1967, 5074], + 2687, + 2688, + [7469, 5046], + 2690, + [7474, 686, 154, 684, 236, 1970], + 2692, + [7478, 1960, 519], + [7481, 132], + [7482, 5066, 237], + [7483, 237], + [7484, 5037, 686, 237], + [7485, 132], + [7487, 236, 237], + [7489, 1106, 5032, 5053], + [7490, 1101, 1966, 686, 154, 684, 1104, 236, 1956, 1105], + [7493, 425, 238], + [7494, 5045, 425], + [7495, 1965, 5042, 1104], + function(e, t, r) { + "use strict" + var n = r(69)["default"] + t.__esModule = !0 + var i = r(175), + s = r(5120), + a = n(s), + o = a["default"]( + '\n (function (global, factory) {\n if (typeof define === "function" && define.amd) {\n define(MODULE_NAME, AMD_ARGUMENTS, factory);\n } else if (typeof exports !== "undefined") {\n factory(COMMON_ARGUMENTS);\n } else {\n var mod = { exports: {} };\n factory(BROWSER_ARGUMENTS);\n global.GLOBAL_ARG = mod.exports;\n }\n })(this, FUNC);\n' + ) + ;(t["default"] = function(e) { + function t(e) { + if (e.isExpressionStatement()) { + var t = e.get("expression") + if (!t.isCallExpression()) return !1 + if (!t.get("callee").isIdentifier({ name: "define" })) return !1 + var r = t.get("arguments") + return 3 !== r.length || r.shift().isStringLiteral() + ? 2 !== r.length + ? !1 + : r.shift().isArrayExpression() + ? !!r.shift().isFunctionExpression() + : !1 + : !1 + } + } + var n = e.types + return { + inherits: r(1818), + visitor: { + Program: { + exit: function(e, r) { + var s = e.get("body").pop() + if (t(s)) { + var a = s.node.expression, + u = a.arguments, + l = 3 === u.length ? u.shift() : null, + c = a.arguments[0], + p = a.arguments[1], + f = r.opts.globals || {}, + h = c.elements.map(function(e) { + return "module" === e.value || "exports" === e.value + ? n.identifier(e.value) + : n.callExpression(n.identifier("require"), [e]) + }), + d = c.elements.map(function(e) { + if ("module" === e.value) return n.identifier("mod") + if ("exports" === e.value) + return n.memberExpression( + n.identifier("mod"), + n.identifier("exports") + ) + var t = i.basename(e.value, i.extname(e.value)), + r = f[t] || t + return n.memberExpression( + n.identifier("global"), + n.identifier(n.toIdentifier(r)) + ) + }), + m = n.identifier( + n.toIdentifier( + l ? l.value : this.file.opts.basename + ) + ) + s.replaceWith( + o({ + MODULE_NAME: l, + BROWSER_ARGUMENTS: d, + AMD_ARGUMENTS: c, + COMMON_ARGUMENTS: h, + GLOBAL_ARG: m, + FUNC: p + }) + ) + } + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7332, 5087], + [7336, 5090], + [7337, 5091], + [7338, 5092], + [7342, 5094], + [7343, 1973], + [7344, 5080, 5079, 1973], + 1937, + [7346, 5119, 5118, 5111], + [7347, 5113], + [7349, 108], + [7350, 108], + [7351, 108, 5114], + [7352, 108, 5115], + [7353, 1117, 240], + [7354, 5116, 240], + [7356, 1117, 240], + [7357, 1117, 5117, 240], + 2581, + 2582, + [7359, 1109, 426], + [7360, 5096], + [7362, 108], + [7366, 1109], + [7367, 1109], + 559, + [7368, 108, 1115, 1116, 1113, 426], + 1379, + [7370, 108, 520], + [7377, 5108, 1110], + 1384, + [7379, 1110], + [7381, 5098, 426, 689, 240], + [7382, 1975, 5110, 240], + [7383, 5097, 5105, 689, 520, 1978], + [7384, 687], + [7386, 520, 1114], + [7387, 1114, 1977], + [7388, 5109, 1114], + 373, + [7390, 5107, 1978], + [7392, 5112, 689], + [7393, 1108, 69, 42, 5219, 1127, 5227, 427, 1992, 59], + [7394, 339, 239, 69, 42, 340, 59], + [7397, 42, 69, 59, 340], + 2609, + [7398, 239, 69, 427], + [7399, 42, 59], + 2612, + [7400, 69, 42, 340, 59], + [7402, 42, 5130, 59], + [7403, 42, 59], + [7404, 42, 1974, 59, 5129], + [7405, 69, 42, 1121, 59], + [7406, 339, 42, 59], + 2619, + [7408, 239, 69, 42, 1984, 5132, 340, 59], + [7409, 5133], + [7410, 69, 42, 5139, 427, 340, 1992, 59], + [7413, 339, 69, 42, 1986, 59], + [7414, 1107, 239, 42, 69, 1985, 1119, 59, 2005], + [7317, 69, 5155, 1989, 5154, 5153, 5140], + [7318, 5145, 5141, 5148, 5146, 5150], + [7319, 5143], + 2516, + [7321, 1987, 5144], + [7322, 1987], + 2519, + [7323, 5147], + 2521, + [7324, 5149], + 2521, + 2524, + 2525, + [7325, 1988], + [7326, 5151, 1988, 5152], + 2528, + [7327, 5156], + 2530, + [7431, 5158], + [7432, 5159], + 2648, + [7415, 7296], + 2626, + [7329, 5163], + 2533, + [7417, 5078, 69, 42, 5223, 5222, 5224, 2006, 427, 59], + [7418, 42, 69, 59, 1120, 241], + [7419, 69, 241], + [7420, 69, 241], + [7421, 69, 241], + [7423, 241, 5165, 5166, 5168, 5170, 5171, 5167], + [7424, 69, 241], + [7425, 69, 241], + [7426, 42, 59], + [7428, 42, 59], + [7430, 69, 42, 1990, 5177, 59, 1120], + 2525, + [7325, 1991], + [7326, 5175, 1991, 5176], + 2644, + 2650, + [7433, 5188, 5198, 692, 5218], + [7434, 5182], + [7435, 1995, 5190, 5208], + [7437, 5202, 690], + 1399, + 2658, + 2659, + [7438, 428], + [7440, 5194, 5195, 521, 2008, 5230], + 1402, + [7442, 1999, 5204], + [7444, 1998, 2007], + [7449, 5209, 5210, 5211, 155, 5225], + [7450, 2001, 244], + [7451, 5193, 5212, 244], + [7452, 1122, 2001, 2003, 155, 1125, 2004, 1993, 244, 1126], + [7453, 1122, 1126], + 815, + [7454, 2e3, 5201, 5206], + 2672, + 2673, + [7456, 133], + [7457, 133], + [7458, 521, 692, 1994], + [7459, 1123, 242, 244], + [7460, 244], + [7461, 5183, 690], + [7462, 1994], + [7463, 521, 155], + [7464, 5185], + 2683, + [7465, 428], + [7467, 2004, 5228], + 2687, + 2688, + [7469, 5200], + 2690, + [7474, 693, 155, 691, 242, 2007], + 2692, + [7478, 1997, 521], + [7481, 133], + [7482, 5220, 243], + [7483, 243], + [7484, 5191, 693, 243], + [7485, 133], + [7487, 242, 243], + [7489, 1127, 5186, 5207], + [7490, 1122, 2003, 693, 155, 691, 1125, 242, 1993, 1126], + [7493, 428, 244], + [7494, 5199, 428], + [7495, 2002, 5196, 1125], + [7501, 250, 701, 70, 34, 5232, 695, 49], + [7500, 34, 49], + [7394, 250, 249, 70, 34, 341, 49], + [7397, 34, 70, 49, 341], + 2609, + [7398, 249, 70, 522], + [7399, 34, 49], + 2612, + [7400, 70, 34, 341, 49], + [7402, 34, 5242, 49], + [7403, 34, 49], + [7404, 34, 2040, 49, 5241], + [7405, 70, 34, 1129, 49], + [7406, 250, 34, 49], + 2619, + [7408, 249, 70, 34, 2010, 5244, 341, 49], + [7409, 5245], + [7410, 70, 34, 5251, 522, 341, 5269, 49], + [7413, 250, 70, 34, 2012, 49], + [7414, 1138, 249, 34, 70, 2011, 695, 49, 5296], + [7317, 70, 5267, 2022, 5266, 5265, 5252], + [7318, 5257, 5253, 5260, 5258, 5262], + [7319, 5255], + 2516, + [7321, 2013, 5256], + [7322, 2013], + 2519, + [7323, 5259], + 2521, + [7324, 5261], + 2521, + 2524, + 2525, + [7325, 2014], + [7326, 5263, 2014, 5264], + 2528, + [7327, 5268], + 2530, + 810, + [7431, 5271], + [7432, 5272], + 2648, + [7415, 7297], + 2626, + 1399, + 812, + 2659, + [7438, 698], + [7441, 5275, 5276, 2016, 5282, 5291, 5292, 5293, 697, 429], + 1402, + [7443, 5288], + [7445, 5281, 698], + [7447, 5290], + 1409, + 2672, + 2673, + [7458, 2017, 1132, 2015], + [7460, 5295], + [7462, 2015], + 2687, + 2688, + [7469, 5286], + 2690, + [7474, 2020, 697, 1131, 523, 5301], + [7475, 429], + [7477, 5279, 2017, 1132], + [7481, 429], + [7482, 5297, 696], + [7486, 696], + [7489, 2021, 5277, 5289], + [7492, 2020, 697, 1131, 523, 429], + [7494, 5285, 698], + 1420, + [7329, 5305], + 2533, + [7417, 5371, 70, 34, 5364, 5363, 5365, 5366, 522, 49], + [7418, 34, 70, 49, 1133, 245], + [7419, 70, 245], + [7420, 70, 245], + [7421, 70, 245], + [7423, 245, 5307, 5308, 5310, 5312, 5313, 5309], + [7424, 70, 245], + [7425, 70, 245], + [7426, 34, 49], + [7428, 34, 49], + [7430, 70, 34, 2023, 5319, 49, 1133], + 2525, + [7325, 2024], + [7326, 5317, 2024, 5318], + 2650, + 1397, + [7433, 5329, 5342, 2032, 5359], + [7434, 5324], + [7435, 2025, 5332, 5349], + [7437, 5345, 699], + 1399, + 2658, + [7439, 5331, 700], + [7440, 5337, 5338, 1134, 2037, 5369], + [7441, 5326, 2025, 5328, 2027, 5355, 5356, 5357, 248, 134], + 1402, + [7442, 2027, 5346], + [7444, 2026, 2036], + [7447, 5354], + [7449, 5350, 5351, 5352, 248, 5367], + [7450, 2029, 247], + [7451, 5336, 5353, 247], + [7452, 2028, 2029, 5340, 248, 2033, 2034, 5321, 247, 2035], + [7453, 2028, 2035], + 1410, + 815, + [7454, 5334, 5344, 5348], + 2673, + [7456, 134], + [7457, 134], + [7459, 2031, 430, 247], + [7460, 247], + [7461, 5325, 699], + [7463, 1134, 248], + [7464, 5327], + 2683, + [7465, 700], + [7467, 2034, 5368], + 2687, + 2688, + [7469, 5343], + 2690, + [7474, 1137, 248, 1136, 430, 2036], + 2692, + [7477, 5330, 1134, 2032], + [7481, 134], + [7482, 5361, 246], + [7483, 246], + [7484, 5333, 1137, 246], + [7485, 134], + [7486, 246], + [7487, 430, 246], + [7493, 700, 247], + [7495, 2030, 5339, 2033], + 2644, + [7332, 5380], + [7336, 5383], + [7337, 5384], + [7338, 5385], + [7342, 5387], + [7343, 2039], + [7344, 5373, 5372, 2039], + 1937, + [7346, 5412, 5411, 5404], + [7347, 5406], + [7349, 109], + [7350, 109], + [7351, 109, 5407], + [7352, 109, 5408], + [7353, 1147, 251], + [7354, 5409, 251], + [7356, 1147, 251], + [7357, 1147, 5410, 251], + 2581, + 2582, + [7359, 1139, 431], + [7360, 5389], + [7362, 109], + [7366, 1139], + [7367, 1139], + 559, + [7368, 109, 1145, 1146, 1143, 431], + 1379, + [7370, 109, 524], + [7377, 5401, 1140], + 1384, + [7379, 1140], + [7381, 5391, 431, 704, 251], + [7382, 2041, 5403, 251], + [7383, 5390, 5398, 704, 524, 2044], + [7384, 702], + [7386, 524, 1144], + [7387, 1144, 2043], + [7388, 5402, 1144], + 373, + [7390, 5400, 2044], + [7392, 5405, 704], + function(e, t, r) { + "use strict" + function n(e) { + for (var t = e.params, r = 0; r < t.length; r++) { + var n = t[r] + if (!h.isIdentifier(n)) return !0 + } + return !1 + } + var i = r(50)["default"], + s = r(24)["default"] + t.__esModule = !0 + var a = r(5418), + o = i(a), + u = r(5416), + l = i(u), + c = r(2060), + p = i(c), + f = r(28), + h = s(f), + d = p["default"]( + "\n let VARIABLE_NAME =\n ARGUMENTS.length <= ARGUMENT_KEY || ARGUMENTS[ARGUMENT_KEY] === undefined ?\n DEFAULT_VALUE\n :\n ARGUMENTS[ARGUMENT_KEY];\n" + ), + m = p["default"]( + "\n if (VARIABLE_NAME === undefined) VARIABLE_NAME = DEFAULT_VALUE;\n" + ), + y = p["default"]("\n let $0 = $1[$2];\n"), + v = { + ReferencedIdentifier: function(e, t) { + var r = e.node.name + ;("eval" === r || + (e.scope.hasOwnBinding(r) && + "param" !== e.scope.getOwnBinding(r).kind)) && + ((t.iife = !0), e.stop()) + }, + Scope: function(e) { + e.skip() + } + }, + g = { + Function: function(e) { + function t(e, t, n) { + var s = void 0 + ;(s = + r(n) || h.isPattern(e) + ? d({ + VARIABLE_NAME: e, + DEFAULT_VALUE: t, + ARGUMENT_KEY: h.numericLiteral(n), + ARGUMENTS: c + }) + : m({ VARIABLE_NAME: e, DEFAULT_VALUE: t })), + (s._blockHoist = i.params.length - n), + u.push(s) + } + function r(e) { + return e + 1 > p + } + var i = e.node, + s = e.scope + if (n(i)) { + e.ensureBlock() + var a = { iife: !1, scope: s }, + u = [], + c = h.identifier("arguments") + c._shadowedFunctionLiteral = e + for ( + var p = o["default"](i), f = e.get("params"), g = 0; + g < f.length; + g++ + ) { + var E = f[g] + if (E.isAssignmentPattern()) { + var b = E.get("left"), + x = E.get("right") + if (r(g) || b.isPattern()) { + var A = s.generateUidIdentifier("x") + ;(A._isDefaultPlaceholder = !0), (i.params[g] = A) + } else i.params[g] = b.node + a.iife || + (x.isIdentifier() && + s.hasOwnBinding(x.node.name) && + "param" !== s.getOwnBinding(x.node.name).kind + ? (a.iife = !0) + : x.traverse(v, a)), + t(b.node, x.node, g) + } else E.isIdentifier() || E.traverse(v, a) + } + for (var g = p + 1; g < i.params.length; g++) { + var E = i.params[g] + if (!E._isDefaultPlaceholder) { + var D = y(E, c, h.numericLiteral(g)) + ;(D._blockHoist = i.params.length - g), u.push(D) + } + } + ;(i.params = i.params.slice(0, p)), + a.iife + ? (u.push(l["default"](e, s)), + e.set("body", h.blockStatement(u))) + : e.get("body").unshiftContainer("body", u) + } + } + } + t.visitor = g + }, + function(e, t, r) { + "use strict" + var n = r(24)["default"] + t.__esModule = !0 + var i = r(28), + s = n(i), + a = { + Function: function(e) { + for ( + var t = e.get("params"), + r = s.isRestElement(t[t.length - 1]) ? 1 : 0, + n = t.length - r, + i = 0; + n > i; + i++ + ) { + var a = t[i] + if (a.isArrayPattern() || a.isObjectPattern()) { + var o = e.scope.generateUidIdentifier("ref"), + u = s.variableDeclaration("let", [ + s.variableDeclarator(a.node, o) + ]) + ;(u._blockHoist = n - i), + e.ensureBlock(), + e.get("body").unshiftContainer("body", u), + a.replaceWith(o) + } + } + } + } + t.visitor = a + }, + function(e, t, r) { + "use strict" + function n(e) { + return p.isRestElement(e.params[e.params.length - 1]) + } + function i(e, t, r) { + var n = void 0 + ;(n = p.isNumericLiteral(e.parent.property) + ? p.numericLiteral(e.parent.property.value + r) + : p.binaryExpression("+", e.parent.property, p.numericLiteral(r))), + e.parentPath.replaceWith(h({ ARGUMENTS: t, INDEX: n })) + } + function s(e, t, r, n) { + n + ? e.parentPath.replaceWith(p.binaryExpression("-", t, p.numericLiteral(n))) + : e.replaceWith(r) + } + var a = r(50)["default"], + o = r(24)["default"] + t.__esModule = !0 + var u = r(2060), + l = a(u), + c = r(28), + p = o(c), + f = l["default"]( + "\n for (var LEN = ARGUMENTS.length,\n ARRAY = Array(ARRAY_LEN),\n KEY = START;\n KEY < LEN;\n KEY++) {\n ARRAY[ARRAY_KEY] = ARGUMENTS[KEY];\n }\n" + ), + h = l["default"]( + "\n ARGUMENTS.length <= INDEX ? undefined : ARGUMENTS[INDEX]\n" + ), + d = { + Scope: function(e, t) { + e.scope.bindingIdentifierEquals(t.name, t.outerBinding) || e.skip() + }, + Flow: function(e) { + e.skip() + }, + Function: function(e, t) { + var r = t.noOptimise + ;(t.noOptimise = !0), e.traverse(d, t), (t.noOptimise = r), e.skip() + }, + ReferencedIdentifier: function(e, t) { + var r = e.node + if (("arguments" === r.name && (t.deopted = !0), r.name === t.name)) + if (t.noOptimise) t.deopted = !0 + else { + var n = e.parentPath, + i = n.parentPath + if ( + n.isMemberExpression({ computed: !0, object: r }) && + (!i.isAssignmentExpression() || n.node !== i.node.left) + ) { + var s = n.get("property") + if (s.isBaseType("number")) + return void t.candidates.push({ + cause: "indexGetter", + path: e + }) + } + if (n.isMemberExpression({ computed: !1, object: r })) { + var s = n.get("property") + if ("length" === s.node.name) + return void t.candidates.push({ + cause: "lengthGetter", + path: e + }) + } + if (0 === t.offset && n.isSpreadElement()) { + var a = n.parentPath + if (a.isCallExpression() && 1 === a.node.arguments.length) + return void t.candidates.push({ + cause: "argSpread", + path: e + }) + } + t.references.push(e) + } + }, + BindingIdentifier: function(e, t) { + var r = e.node + r.name === t.name && (t.deopted = !0) + } + }, + m = { + Function: function(e) { + var t = e.node, + r = e.scope + if (n(t)) { + var a = t.params.pop().argument, + o = p.identifier("arguments"), + u = p.memberExpression(o, p.identifier("length")) + o._shadowedFunctionLiteral = e + var l = { + references: [], + offset: t.params.length, + argumentsNode: o, + outerBinding: r.getBindingIdentifier(a.name), + candidates: [], + name: a.name, + deopted: !1 + } + if ((e.traverse(d, l), l.deopted || l.references.length)) { + ;(l.references = l.references.concat( + l.candidates.map(function(e) { + var t = e.path + return t + }) + )), + (l.deopted = l.deopted || !!t.shadow) + var c = p.numericLiteral(t.params.length), + h = r.generateUidIdentifier("key"), + m = r.generateUidIdentifier("len"), + y = h, + v = m + t.params.length && + ((y = p.binaryExpression("-", h, c)), + (v = p.conditionalExpression( + p.binaryExpression(">", m, c), + p.binaryExpression("-", m, c), + p.numericLiteral(0) + ))) + var g = f({ + ARGUMENTS: o, + ARRAY_KEY: y, + ARRAY_LEN: v, + START: c, + ARRAY: a, + KEY: h, + LEN: m + }) + if (l.deopted) + (g._blockHoist = t.params.length + 1), + t.body.body.unshift(g) + else { + g._blockHoist = 1 + var E = e + .getEarliestCommonAncestorFrom(l.references) + .getStatementParent() + E.findParent(function(e) { + return e.isLoop() ? void (E = e) : e.isFunction() + }), + E.insertBefore(g) + } + } else + for (var b = l.candidates, x = 0; x < b.length; x++) { + var A = b[x], + D = A.path, + C = A.cause + switch (C) { + case "indexGetter": + i(D, o, l.offset) + break + case "lengthGetter": + s(D, u, o, l.offset) + break + default: + D.replaceWith(o) + } + } + } + } + } + t.visitor = m + }, + function(e, t, r) { + "use strict" + var n = r(50)["default"], + i = r(24)["default"] + t.__esModule = !0 + var s = r(5417), + a = n(s), + o = r(28), + u = i(o), + l = { + enter: function(e, t) { + e.isThisExpression() && (t.foundThis = !0), + e.isReferencedIdentifier({ name: "arguments" }) && + (t.foundArguments = !0) + }, + Function: function(e) { + e.skip() + } + } + ;(t["default"] = function(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] ? e.scope : arguments[1] + return (function() { + var r = e.node, + n = u.functionExpression(null, [], r.body, r.generator, r.async), + i = n, + s = [] + a["default"](e, function(e) { + return t.push({ id: e }) + }) + var o = { foundThis: !1, foundArguments: !1 } + e.traverse(l, o), + o.foundArguments && + ((i = u.memberExpression(n, u.identifier("apply"))), + (s = []), + o.foundThis && s.push(u.thisExpression()), + o.foundArguments && + (o.foundThis || s.push(u.nullLiteral()), + s.push(u.identifier("arguments")))) + var c = u.callExpression(i, s) + return r.generator && (c = u.yieldExpression(c, !0)), u.returnStatement(c) + })() + }), + (e.exports = t["default"]) + }, + [7502, 24, 28], + [7498, 24, 28], + [7332, 5428], + [7336, 5431], + [7337, 5432], + [7338, 5433], + [7342, 5435], + [7343, 2050], + [7344, 5421, 5420, 2050], + 1937, + [7346, 5460, 5459, 5452], + [7347, 5454], + [7349, 110], + [7350, 110], + [7351, 110, 5455], + [7352, 110, 5456], + [7353, 1158, 253], + [7354, 5457, 253], + [7356, 1158, 253], + [7357, 1158, 5458, 253], + 2581, + 2582, + [7359, 1150, 432], + [7360, 5437], + [7362, 110], + [7366, 1150], + [7367, 1150], + 559, + [7368, 110, 1156, 1157, 1154, 432], + 1379, + [7370, 110, 525], + [7377, 5449, 1151], + 1384, + [7379, 1151], + [7381, 5439, 432, 708, 253], + [7382, 2052, 5451, 253], + [7383, 5438, 5446, 708, 525, 2055], + [7384, 706], + [7386, 525, 1155], + [7387, 1155, 2054], + [7388, 5450, 1155], + 373, + [7390, 5448, 2055], + [7392, 5453, 708], + 810, + 1397, + 1398, + 1399, + 812, + [7438, 1163], + [7441, 5464, 5465, 2061, 5470, 5479, 5480, 5481, 433, 434], + 1402, + [7443, 5477], + [7445, 5469, 1163], + [7446, 1161], + 1409, + 1410, + 815, + 2673, + [7458, 2062, 5482, 5463], + [7460, 1161], + [7466, 5472], + 2688, + [7469, 5475], + 2690, + [7471, 1159, 709, 434], + [7472, 433, 1161], + [7474, 1162, 433, 709, 526, 5491], + [7476, 5474, 433], + [7478, 5467, 2062], + [7481, 434], + [7482, 5487, 1160], + [7488, 5466, 2061, 5476], + [7490, 5471, 5473, 1162, 433, 709, 5483, 526, 5462, 5485], + [7492, 1162, 433, 709, 526, 434], + 1420, + [7394, 342, 252, 50, 24, 344, 28], + [7397, 24, 50, 28, 344], + 2609, + [7398, 252, 50, 343], + [7399, 24, 28], + 2612, + [7400, 50, 24, 344, 28], + [7402, 24, 5502, 28], + [7403, 24, 28], + [7404, 24, 2051, 28, 5501], + [7405, 50, 24, 1166, 28], + [7406, 342, 24, 28], + 2619, + [7408, 252, 50, 24, 2065, 5504, 344, 28], + [7409, 5505], + [7410, 50, 24, 5511, 343, 344, 5529, 28], + [7413, 342, 50, 24, 2067, 28], + [7414, 1148, 252, 24, 50, 2066, 1165, 28, 5556], + [7317, 50, 5527, 2077, 5526, 5525, 5512], + [7318, 5517, 5513, 5520, 5518, 5522], + [7319, 5515], + 2516, + [7321, 2068, 5516], + [7322, 2068], + 2519, + [7323, 5519], + 2521, + [7324, 5521], + 2521, + 2524, + 2525, + [7325, 2069], + [7326, 5523, 2069, 5524], + 2528, + [7327, 5528], + 2530, + 810, + [7431, 5531], + [7432, 5532], + 2648, + [7415, 7298], + 2626, + 1399, + 812, + 2659, + [7438, 712], + [7441, 5535, 5536, 2071, 5542, 5551, 5552, 5553, 711, 435], + 1402, + [7443, 5548], + [7445, 5541, 712], + [7447, 5550], + 1409, + 2672, + 2673, + [7458, 2072, 1169, 2070], + [7460, 5555], + [7462, 2070], + 2687, + 2688, + [7469, 5546], + 2690, + [7474, 2075, 711, 1168, 527, 5561], + [7475, 435], + [7477, 5539, 2072, 1169], + [7481, 435], + [7482, 5557, 710], + [7486, 710], + [7489, 2076, 5537, 5549], + [7492, 2075, 711, 1168, 527, 435], + [7494, 5545, 712], + 1420, + [7329, 5565], + 2533, + [7417, 5419, 50, 24, 5624, 5623, 5625, 5626, 343, 28], + [7418, 24, 50, 28, 1170, 254], + [7419, 50, 254], + [7420, 50, 254], + [7421, 50, 254], + [7423, 254, 5567, 5568, 5570, 5572, 5573, 5569], + [7424, 50, 254], + [7425, 50, 254], + [7426, 24, 28], + [7428, 24, 28], + [7430, 50, 24, 2078, 5579, 28, 1170], + 2525, + [7325, 2079], + [7326, 5577, 2079, 5578], + 2650, + 1397, + [7433, 5589, 5602, 2087, 5619], + [7434, 5584], + [7435, 2080, 5592, 5609], + [7437, 5605, 713], + 1399, + 2658, + [7439, 5591, 714], + [7440, 5597, 5598, 1171, 2092, 5629], + [7441, 5586, 2080, 5588, 2082, 5615, 5616, 5617, 257, 135], + 1402, + [7442, 2082, 5606], + [7444, 2081, 2091], + [7447, 5614], + [7449, 5610, 5611, 5612, 257, 5627], + [7450, 2084, 256], + [7451, 5596, 5613, 256], + [7452, 2083, 2084, 5600, 257, 2088, 2089, 5581, 256, 2090], + [7453, 2083, 2090], + 1410, + 815, + [7454, 5594, 5604, 5608], + 2673, + [7456, 135], + [7457, 135], + [7459, 2086, 436, 256], + [7460, 256], + [7461, 5585, 713], + [7463, 1171, 257], + [7464, 5587], + 2683, + [7465, 714], + [7467, 2089, 5628], + 2687, + 2688, + [7469, 5603], + 2690, + [7474, 1174, 257, 1173, 436, 2091], + 2692, + [7477, 5590, 1171, 2087], + [7481, 135], + [7482, 5621, 255], + [7483, 255], + [7484, 5593, 1174, 255], + [7485, 135], + [7486, 255], + [7487, 436, 255], + [7493, 714, 256], + [7495, 2085, 5599, 2088], + 2644, + [7332, 5640], + [7336, 5643], + [7337, 5644], + [7338, 5645], + [7342, 5647], + [7343, 2094], + [7344, 5633, 5632, 2094], + 1937, + [7346, 5672, 5671, 5664], + [7347, 5666], + [7349, 111], + [7350, 111], + [7351, 111, 5667], + [7352, 111, 5668], + [7353, 1184, 259], + [7354, 5669, 259], + [7356, 1184, 259], + [7357, 1184, 5670, 259], + 2581, + 2582, + [7359, 1176, 437], + [7360, 5649], + [7362, 111], + [7366, 1176], + [7367, 1176], + 559, + [7368, 111, 1182, 1183, 1180, 437], + 1379, + [7370, 111, 528], + [7377, 5661, 1177], + 1384, + [7379, 1177], + [7381, 5651, 437, 718, 259], + [7382, 2097, 5663, 259], + [7383, 5650, 5658, 718, 528, 2100], + [7384, 716], + [7386, 528, 1181], + [7387, 1181, 2099], + [7388, 5662, 1181], + 373, + [7390, 5660, 2100], + [7392, 5665, 718], + [7417, 5631, 77, 43, 5773, 5772, 5774, 2127, 529, 60], + [7418, 43, 77, 60, 1185, 260], + [7419, 77, 260], + [7420, 77, 260], + [7421, 77, 260], + [7423, 260, 5674, 5675, 5677, 5679, 5680, 5676], + [7424, 77, 260], + [7425, 77, 260], + [7426, 43, 60], + [7428, 43, 60], + [7430, 77, 43, 2105, 2113, 60, 1185], + [7394, 345, 258, 77, 43, 346, 60], + [7397, 43, 77, 60, 346], + 2609, + [7398, 258, 77, 529], + [7399, 43, 60], + 2612, + [7400, 77, 43, 346, 60], + [7402, 43, 5693, 60], + [7403, 43, 60], + [7404, 43, 2096, 60, 5692], + [7405, 77, 43, 1188, 60], + [7406, 345, 43, 60], + 2619, + [7408, 258, 77, 43, 2107, 5695, 346, 60], + [7409, 5696], + [7410, 77, 43, 5702, 529, 346, 5717, 60], + [7413, 345, 77, 43, 2109, 60], + [7414, 1175, 258, 43, 77, 2108, 1187, 60, 2126], + [7317, 77, 5715, 2111, 5714, 2113, 5703], + [7318, 5708, 5704, 5711, 5709, 5713], + [7319, 5706], + 2516, + [7321, 2110, 5707], + [7322, 2110], + 2519, + [7323, 5710], + 2521, + [7324, 5712], + 2521, + 2524, + 2528, + [7327, 5716], + 2530, + 810, + [7431, 5719], + [7432, 5720], + 2648, + [7415, 7299], + 2626, + [7329, 5724], + 2533, + 2525, + [7325, 2112], + 2650, + 1397, + [7433, 5737, 5749, 721, 5769], + [7434, 5731], + [7435, 2115, 5740, 5759], + [7437, 5753, 720], + 1399, + 2658, + 2659, + [7438, 438], + [7440, 5744, 5745, 719, 2130, 5779], + [7441, 5733, 2115, 2116, 2118, 5765, 5766, 5767, 166, 136], + 1402, + [7442, 2118, 5755], + [7444, 2117, 2129], + [7449, 5760, 5761, 5762, 166, 5775], + [7450, 2121, 262], + [7451, 5743, 5763, 262], + [7452, 2119, 2121, 5747, 166, 2123, 2124, 5728, 262, 2125], + [7453, 2119, 2125], + 1410, + 815, + [7454, 2120, 5752, 5757], + 2672, + 2673, + [7456, 136], + [7457, 136], + [7458, 719, 721, 2114], + [7459, 1189, 347, 262], + [7460, 262], + [7461, 5732, 720], + [7462, 2114], + [7463, 719, 166], + [7464, 5734], + 2683, + [7465, 438], + [7467, 2124, 5777], + 2687, + 2688, + [7469, 5751], + 2690, + [7474, 1192, 166, 1191, 347, 2129], + 2692, + [7481, 136], + [7482, 5770, 261], + [7483, 261], + [7484, 5741, 1192, 261], + [7485, 136], + [7487, 347, 261], + [7489, 2128, 5735, 5758], + [7493, 438, 262], + [7494, 5750, 438], + [7495, 2122, 5746, 2123], + 2644, + [7503, 74, 35, 5782, 51], + [7504, 5783], + [7447, 5784], + 2687, + [7332, 5794], + [7336, 5797], + [7337, 5798], + [7338, 5799], + [7342, 5801], + [7343, 2132], + [7344, 5787, 5786, 2132], + 1937, + [7346, 5826, 5825, 5818], + [7347, 5820], + [7349, 112], + [7350, 112], + [7351, 112, 5821], + [7352, 112, 5822], + [7353, 1202, 264], + [7354, 5823, 264], + [7356, 1202, 264], + [7357, 1202, 5824, 264], + 2581, + 2582, + [7359, 1194, 439], + [7360, 5803], + [7362, 112], + [7366, 1194], + [7367, 1194], + 559, + [7368, 112, 1200, 1201, 1198, 439], + 1379, + [7370, 112, 530], + [7377, 5815, 1195], + 1384, + [7379, 1195], + [7381, 5805, 439, 726, 264], + [7382, 2135, 5817, 264], + [7383, 5804, 5812, 726, 530, 2138], + [7384, 724], + [7386, 530, 1199], + [7387, 1199, 2137], + [7388, 5816, 1199], + 373, + [7390, 5814, 2138], + [7392, 5819, 726], + [7417, 5785, 74, 35, 5927, 5926, 5928, 2165, 531, 51], + [7418, 35, 74, 51, 1203, 265], + [7419, 74, 265], + [7420, 74, 265], + [7421, 74, 265], + [7423, 265, 5828, 5829, 5831, 5833, 5834, 5830], + [7424, 74, 265], + [7425, 74, 265], + [7426, 35, 51], + [7428, 35, 51], + [7430, 74, 35, 2143, 2151, 51, 1203], + [7394, 348, 263, 74, 35, 349, 51], + [7397, 35, 74, 51, 349], + 2609, + [7398, 263, 74, 531], + [7399, 35, 51], + 2612, + [7400, 74, 35, 349, 51], + [7402, 35, 5847, 51], + [7403, 35, 51], + [7404, 35, 2134, 51, 5846], + [7405, 74, 35, 1206, 51], + [7406, 348, 35, 51], + 2619, + [7408, 263, 74, 35, 2145, 5849, 349, 51], + [7409, 5850], + [7410, 74, 35, 5856, 531, 349, 5871, 51], + [7413, 348, 74, 35, 2147, 51], + [7414, 1193, 263, 35, 74, 2146, 1205, 51, 2164], + [7317, 74, 5869, 2149, 5868, 2151, 5857], + [7318, 5862, 5858, 5865, 5863, 5867], + [7319, 5860], + 2516, + [7321, 2148, 5861], + [7322, 2148], + 2519, + [7323, 5864], + 2521, + [7324, 5866], + 2521, + 2524, + 2528, + [7327, 5870], + 2530, + 810, + [7431, 5873], + [7432, 5874], + 2648, + [7415, 7300], + 2626, + [7329, 5878], + 2533, + 2525, + [7325, 2150], + 2650, + 1397, + [7433, 5891, 5903, 729, 5923], + [7434, 5885], + [7435, 2153, 5894, 5913], + [7437, 5907, 728], + 1399, + 2658, + 2659, + [7438, 440], + [7440, 5898, 5899, 727, 2168, 5933], + [7441, 5887, 2153, 2154, 2156, 5919, 5920, 5921, 167, 137], + 1402, + [7442, 2156, 5909], + [7444, 2155, 2167], + [7449, 5914, 5915, 5916, 167, 5929], + [7450, 2159, 267], + [7451, 5897, 5917, 267], + [7452, 2157, 2159, 5901, 167, 2161, 2162, 5882, 267, 2163], + [7453, 2157, 2163], + 1410, + 815, + [7454, 2158, 5906, 5911], + 2672, + 2673, + [7456, 137], + [7457, 137], + [7458, 727, 729, 2152], + [7459, 1207, 350, 267], + [7460, 267], + [7461, 5886, 728], + [7462, 2152], + [7463, 727, 167], + [7464, 5888], + 2683, + [7465, 440], + [7467, 2162, 5931], + 2687, + 2688, + [7469, 5905], + 2690, + [7474, 1210, 167, 1209, 350, 2167], + 2692, + [7481, 137], + [7482, 5924, 266], + [7483, 266], + [7484, 5895, 1210, 266], + [7485, 137], + [7487, 350, 266], + [7489, 2166, 5889, 5912], + [7493, 440, 267], + [7494, 5904, 440], + [7495, 2160, 5900, 2161], + 2644, + [7341, 5936], + [7357, 5953, 5952, 2170], + 2581, + [7358, 5947], + [7360, 5937], + 557, + [7362, 441], + [7363, 732, 2170, 5939], + [7364, 1211, 441], + [7365, 441, 2174, 2171], + [7366, 2169], + [7367, 2169], + 559, + [7370, 441, 1211], + 1380, + [7373, 5944], + [7375, 441, 2173, 2177], + 373, + [ + 7391, + 441, + 732, + 2173, + 2171, + 5942, + 5950, + 2172, + 2175, + 5951, + 2176, + 2177, + 5948, + 5943, + 5941, + 5946, + 5938, + 1211, + 2174, + 5949 + ], + [7503, 71, 36, 6012, 61], + [7417, 6064, 71, 36, 6057, 6056, 6058, 2199, 532, 61], + [7418, 36, 71, 61, 1212, 268], + [7419, 71, 268], + [7420, 71, 268], + [7421, 71, 268], + [7423, 268, 5956, 5957, 5959, 5961, 5962, 5958], + [7424, 71, 268], + [7425, 71, 268], + [7426, 36, 61], + [7428, 36, 61], + [7430, 71, 36, 2178, 2186, 61, 1212], + [7394, 353, 271, 71, 36, 351, 61], + [7397, 36, 71, 61, 351], + 2609, + [7398, 271, 71, 532], + [7399, 36, 61], + 2612, + [7400, 71, 36, 351, 61], + [7402, 36, 5975, 61], + [7403, 36, 61], + [7404, 36, 2206, 61, 5974], + [7405, 71, 36, 1215, 61], + [7406, 353, 36, 61], + 2619, + [7408, 271, 71, 36, 2180, 5977, 351, 61], + [7409, 5978], + [7410, 71, 36, 5984, 532, 351, 5999, 61], + [7413, 353, 71, 36, 2182, 61], + [7414, 1221, 271, 36, 71, 2181, 1214, 61, 2198], + [7317, 71, 5997, 2184, 5996, 2186, 5985], + [7318, 5990, 5986, 5993, 5991, 5995], + [7319, 5988], + 2516, + [7321, 2183, 5989], + [7322, 2183], + 2519, + [7323, 5992], + 2521, + [7324, 5994], + 2521, + 2524, + 2528, + [7327, 5998], + 2530, + 810, + [7431, 6001], + [7432, 6002], + 2648, + [7415, 7301], + 2626, + [7329, 6006], + 2533, + 2525, + [7325, 2185], + 2644, + 2650, + 1397, + [7504, 1216], + [7433, 6021, 6033, 736, 6053], + [7434, 6015], + [7435, 2188, 6024, 6043], + [7437, 6037, 735], + 1399, + 2658, + 2659, + [7438, 442], + [7440, 6028, 6029, 734, 2202, 6063], + [7441, 6017, 2188, 2189, 2191, 6049, 6050, 6051, 168, 138], + 1402, + [7442, 2191, 6039], + [7444, 2190, 2201], + [7449, 6044, 6045, 6046, 168, 6059], + [7450, 2193, 270], + [7451, 6027, 6047, 270], + [7452, 2192, 2193, 6031, 168, 2195, 2196, 6011, 270, 2197], + [7453, 2192, 2197], + 1410, + 815, + [7454, 1216, 6036, 6041], + 2672, + 2673, + [7456, 138], + [7457, 138], + [7458, 734, 736, 2187], + [7459, 1217, 352, 270], + [7460, 270], + [7461, 6016, 735], + [7462, 2187], + [7463, 734, 168], + [7464, 6018], + 2683, + [7465, 442], + [7467, 2196, 6061], + 2687, + 2688, + [7469, 6035], + 2690, + [7474, 1220, 168, 1219, 352, 2201], + 2692, + [7481, 138], + [7482, 6054, 269], + [7483, 269], + [7484, 6025, 1220, 269], + [7485, 138], + [7487, 352, 269], + [7489, 2200, 6019, 6042], + [7493, 442, 270], + [7494, 6034, 442], + [7495, 2194, 6030, 2195], + [7332, 6073], + [7336, 6076], + [7337, 6077], + [7338, 6078], + [7342, 6080], + [7343, 2204], + [7344, 6066, 6065, 2204], + 1937, + [7346, 6105, 6104, 6097], + [7347, 6099], + [7349, 113], + [7350, 113], + [7351, 113, 6100], + [7352, 113, 6101], + [7353, 1230, 272], + [7354, 6102, 272], + [7356, 1230, 272], + [7357, 1230, 6103, 272], + 2581, + 2582, + [7359, 1222, 443], + [7360, 6082], + [7362, 113], + [7366, 1222], + [7367, 1222], + 559, + [7368, 113, 1228, 1229, 1226, 443], + 1379, + [7370, 113, 533], + [7377, 6094, 1223], + 1384, + [7379, 1223], + [7381, 6084, 443, 739, 272], + [7382, 2207, 6096, 272], + [7383, 6083, 6091, 739, 533, 2210], + [7384, 737], + [7386, 533, 1227], + [7387, 1227, 2209], + [7388, 6095, 1227], + 373, + [7390, 6093, 2210], + [7392, 6098, 739], + function(e, t, r) { + var n = r(2215) + ;(t.REGULAR = { + d: n().addRange(48, 57), + D: n() + .addRange(0, 47) + .addRange(58, 65535), + s: n(32, 160, 5760, 6158, 8239, 8287, 12288, 65279) + .addRange(9, 13) + .addRange(8192, 8202) + .addRange(8232, 8233), + S: n() + .addRange(0, 8) + .addRange(14, 31) + .addRange(33, 159) + .addRange(161, 5759) + .addRange(5761, 6157) + .addRange(6159, 8191) + .addRange(8203, 8231) + .addRange(8234, 8238) + .addRange(8240, 8286) + .addRange(8288, 12287) + .addRange(12289, 65278) + .addRange(65280, 65535), + w: n(95) + .addRange(48, 57) + .addRange(65, 90) + .addRange(97, 122), + W: n(96) + .addRange(0, 47) + .addRange(58, 64) + .addRange(91, 94) + .addRange(123, 65535) + }), + (t.UNICODE = { + d: n().addRange(48, 57), + D: n() + .addRange(0, 47) + .addRange(58, 1114111), + s: n(32, 160, 5760, 6158, 8239, 8287, 12288, 65279) + .addRange(9, 13) + .addRange(8192, 8202) + .addRange(8232, 8233), + S: n() + .addRange(0, 8) + .addRange(14, 31) + .addRange(33, 159) + .addRange(161, 5759) + .addRange(5761, 6157) + .addRange(6159, 8191) + .addRange(8203, 8231) + .addRange(8234, 8238) + .addRange(8240, 8286) + .addRange(8288, 12287) + .addRange(12289, 65278) + .addRange(65280, 1114111), + w: n(95) + .addRange(48, 57) + .addRange(65, 90) + .addRange(97, 122), + W: n(96) + .addRange(0, 47) + .addRange(58, 64) + .addRange(91, 94) + .addRange(123, 1114111) + }), + (t.UNICODE_IGNORE_CASE = { + d: n().addRange(48, 57), + D: n() + .addRange(0, 47) + .addRange(58, 1114111), + s: n(32, 160, 5760, 6158, 8239, 8287, 12288, 65279) + .addRange(9, 13) + .addRange(8192, 8202) + .addRange(8232, 8233), + S: n() + .addRange(0, 8) + .addRange(14, 31) + .addRange(33, 159) + .addRange(161, 5759) + .addRange(5761, 6157) + .addRange(6159, 8191) + .addRange(8203, 8231) + .addRange(8234, 8238) + .addRange(8240, 8286) + .addRange(8288, 12287) + .addRange(12289, 65278) + .addRange(65280, 1114111), + w: n(95, 383, 8490) + .addRange(48, 57) + .addRange(65, 90) + .addRange(97, 122), + W: n(75, 83, 96) + .addRange(0, 47) + .addRange(58, 64) + .addRange(91, 94) + .addRange(123, 1114111) + }) + }, + function(e, t, r) { + var n + ;(function(e, i) { + ;(function() { + "use strict" + function s() { + var e, + t, + r = 16384, + n = [], + i = -1, + s = arguments.length + if (!s) return "" + for (var a = ""; ++i < s; ) { + var o = Number(arguments[i]) + if (!isFinite(o) || 0 > o || o > 1114111 || _(o) != o) + throw RangeError("Invalid code point: " + o) + 65535 >= o + ? n.push(o) + : ((o -= 65536), + (e = (o >> 10) + 55296), + (t = (o % 1024) + 56320), + n.push(e, t)), + (i + 1 == s || n.length > r) && + ((a += w.apply(null, n)), (n.length = 0)) + } + return a + } + function a(e, t) { + if (-1 == t.indexOf("|")) { + if (e == t) return + throw Error("Invalid node type: " + e) + } + if ( + ((t = a.hasOwnProperty(t) + ? a[t] + : (a[t] = RegExp("^(?:" + t + ")$"))), + !t.test(e)) + ) + throw Error("Invalid node type: " + e) + } + function o(e) { + var t = e.type + if (o.hasOwnProperty(t) && "function" == typeof o[t]) return o[t](e) + throw Error("Invalid node type: " + t) + } + function u(e) { + a(e.type, "alternative") + var t = e.body, + r = t ? t.length : 0 + if (1 == r) return b(t[0]) + for (var n = -1, i = ""; ++n < r; ) i += b(t[n]) + return i + } + function l(e) { + switch ((a(e.type, "anchor"), e.kind)) { + case "start": + return "^" + case "end": + return "$" + case "boundary": + return "\\b" + case "not-boundary": + return "\\B" + default: + throw Error("Invalid assertion") + } + } + function c(e) { + return ( + a( + e.type, + "anchor|characterClass|characterClassEscape|dot|group|reference|value" + ), + o(e) + ) + } + function p(e) { + a(e.type, "characterClass") + var t = e.body, + r = t ? t.length : 0, + n = -1, + i = "[" + for (e.negative && (i += "^"); ++n < r; ) i += d(t[n]) + return (i += "]") + } + function f(e) { + return a(e.type, "characterClassEscape"), "\\" + e.value + } + function h(e) { + a(e.type, "characterClassRange") + var t = e.min, + r = e.max + if ("characterClassRange" == t.type || "characterClassRange" == r.type) + throw Error("Invalid character class range") + return d(t) + "-" + d(r) + } + function d(e) { + return ( + a( + e.type, + "anchor|characterClassEscape|characterClassRange|dot|value" + ), + o(e) + ) + } + function m(e) { + a(e.type, "disjunction") + var t = e.body, + r = t ? t.length : 0 + if (0 == r) throw Error("No body") + if (1 == r) return o(t[0]) + for (var n = -1, i = ""; ++n < r; ) 0 != n && (i += "|"), (i += o(t[n])) + return i + } + function y(e) { + return a(e.type, "dot"), "." + } + function v(e) { + a(e.type, "group") + var t = "(" + switch (e.behavior) { + case "normal": + break + case "ignore": + t += "?:" + break + case "lookahead": + t += "?=" + break + case "negativeLookahead": + t += "?!" + break + default: + throw Error("Invalid behaviour: " + e.behaviour) + } + var r = e.body, + n = r ? r.length : 0 + if (1 == n) t += o(r[0]) + else for (var i = -1; ++i < n; ) t += o(r[i]) + return (t += ")") + } + function g(e) { + a(e.type, "quantifier") + var t = "", + r = e.min, + n = e.max + switch (n) { + case void 0: + case null: + switch (r) { + case 0: + t = "*" + break + case 1: + t = "+" + break + default: + t = "{" + r + ",}" + } + break + default: + t = + r == n + ? "{" + r + "}" + : 0 == r && 1 == n + ? "?" + : "{" + r + "," + n + "}" + } + return e.greedy || (t += "?"), c(e.body[0]) + t + } + function E(e) { + return a(e.type, "reference"), "\\" + e.matchIndex + } + function b(e) { + return ( + a( + e.type, + "anchor|characterClass|characterClassEscape|empty|group|quantifier|reference|value" + ), + o(e) + ) + } + function x(e) { + a(e.type, "value") + var t = e.kind, + r = e.codePoint + switch (t) { + case "controlLetter": + return "\\c" + s(r + 64) + case "hexadecimalEscape": + return "\\x" + ("00" + r.toString(16).toUpperCase()).slice(-2) + case "identifier": + return "\\" + s(r) + case "null": + return "\\" + r + case "octal": + return "\\" + r.toString(8) + case "singleEscape": + switch (r) { + case 8: + return "\\b" + case 9: + return "\\t" + case 10: + return "\\n" + case 11: + return "\\v" + case 12: + return "\\f" + case 13: + return "\\r" + default: + throw Error("Invalid codepoint: " + r) + } + case "symbol": + return s(r) + case "unicodeEscape": + return "\\u" + ("0000" + r.toString(16).toUpperCase()).slice(-4) + case "unicodeCodePointEscape": + return "\\u{" + r.toString(16).toUpperCase() + "}" + default: + throw Error("Unsupported node kind: " + t) + } + } + var A = { function: !0, object: !0 }, + D = (A[typeof window] && window) || this, + C = A[typeof t] && t, + S = A[typeof e] && e && !e.nodeType && e, + F = C && S && "object" == typeof i && i + !F || (F.global !== F && F.window !== F && F.self !== F) || (D = F) + var w = String.fromCharCode, + _ = Math.floor + ;(o.alternative = u), + (o.anchor = l), + (o.characterClass = p), + (o.characterClassEscape = f), + (o.characterClassRange = h), + (o.disjunction = m), + (o.dot = y), + (o.group = v), + (o.quantifier = g), + (o.reference = E), + (o.value = x), + (n = function() { + return { generate: o } + }.call(t, r, t, e)), + !(void 0 !== n && (e.exports = n)) + }.call(this)) + }.call( + t, + r(25)(e), + (function() { + return this + })() + )) + }, + function(e, t) { + !(function() { + function t(e, t) { + function r(t) { + return (t.raw = e.substring(t.range[0], t.range[1])), t + } + function n(e, t) { + return (e.range[0] = t), r(e) + } + function i(e, t) { + return r({ type: "anchor", kind: e, range: [$ - t, $] }) + } + function s(e, t, n, i) { + return r({ type: "value", kind: e, codePoint: t, range: [n, i] }) + } + function a(e, t, r, n) { + return (n = n || 0), s(e, t, $ - (r.length + n), $) + } + function o(e) { + var t = e[0], + r = t.charCodeAt(0) + if (z) { + var n + if ( + 1 === t.length && + r >= 55296 && + 56319 >= r && + ((n = x().charCodeAt(0)), n >= 56320 && 57343 >= n) + ) + return ( + $++, + s( + "symbol", + 1024 * (r - 55296) + n - 56320 + 65536, + $ - 2, + $ + ) + ) + } + return s("symbol", r, $ - 1, $) + } + function u(e, t, n) { + return r({ type: "disjunction", body: e, range: [t, n] }) + } + function l() { + return r({ type: "dot", range: [$ - 1, $] }) + } + function c(e) { + return r({ type: "characterClassEscape", value: e, range: [$ - 2, $] }) + } + function p(e) { + return r({ + type: "reference", + matchIndex: parseInt(e, 10), + range: [$ - 1 - e.length, $] + }) + } + function f(e, t, n, i) { + return r({ type: "group", behavior: e, body: t, range: [n, i] }) + } + function h(e, t, n, i) { + return ( + null == i && ((n = $ - 1), (i = $)), + r({ + type: "quantifier", + min: e, + max: t, + greedy: !0, + body: null, + range: [n, i] + }) + ) + } + function d(e, t, n) { + return r({ type: "alternative", body: e, range: [t, n] }) + } + function m(e, t, n, i) { + return r({ + type: "characterClass", + body: e, + negative: t, + range: [n, i] + }) + } + function y(e, t, n, i) { + return ( + e.codePoint > t.codePoint && + Y( + "invalid range in character class", + e.raw + "-" + t.raw, + n, + i + ), + r({ type: "characterClassRange", min: e, max: t, range: [n, i] }) + ) + } + function v(e) { + return "alternative" === e.type ? e.body : [e] + } + function g(t) { + t = t || 1 + var r = e.substring($, $ + t) + return ($ += t || 1), r + } + function E(e) { + b(e) || Y("character", e) + } + function b(t) { + return e.indexOf(t, $) === $ ? g(t.length) : void 0 + } + function x() { + return e[$] + } + function A(t) { + return e.indexOf(t, $) === $ + } + function D(t) { + return e[$ + 1] === t + } + function C(t) { + var r = e.substring($), + n = r.match(t) + return ( + n && + ((n.range = []), + (n.range[0] = $), + g(n[0].length), + (n.range[1] = $)), + n + ) + } + function S() { + var e = [], + t = $ + for (e.push(F()); b("|"); ) e.push(F()) + return 1 === e.length ? e[0] : u(e, t, $) + } + function F() { + for (var e, t = [], r = $; (e = w()); ) t.push(e) + return 1 === t.length ? t[0] : d(t, r, $) + } + function w() { + if ($ >= e.length || A("|") || A(")")) return null + var t = T() + if (t) return t + var r = B() + r || Y("Expected atom") + var i = P() || !1 + return i ? ((i.body = v(r)), n(i, r.range[0]), i) : r + } + function _(e, t, r, n) { + var i = null, + s = $ + if (b(e)) i = t + else { + if (!b(r)) return !1 + i = n + } + var a = S() + a || Y("Expected disjunction"), E(")") + var o = f(i, v(a), s, $) + return "normal" == i && X && K++, o + } + function T() { + return b("^") + ? i("start", 1) + : b("$") + ? i("end", 1) + : b("\\b") + ? i("boundary", 2) + : b("\\B") + ? i("not-boundary", 2) + : _("(?=", "lookahead", "(?!", "negativeLookahead") + } + function P() { + var e, + t, + r, + n, + i = $ + return ( + b("*") + ? (t = h(0)) + : b("+") + ? (t = h(1)) + : b("?") + ? (t = h(0, 1)) + : (e = C(/^\{([0-9]+)\}/)) + ? ((r = parseInt(e[1], 10)), + (t = h(r, r, e.range[0], e.range[1]))) + : (e = C(/^\{([0-9]+),\}/)) + ? ((r = parseInt(e[1], 10)), + (t = h(r, void 0, e.range[0], e.range[1]))) + : (e = C(/^\{([0-9]+),([0-9]+)\}/)) && + ((r = parseInt(e[1], 10)), + (n = parseInt(e[2], 10)), + r > n && Y("numbers out of order in {} quantifier", "", i, $), + (t = h(r, n, e.range[0], e.range[1]))), + t && b("?") && ((t.greedy = !1), (t.range[1] += 1)), + t + ) + } + function B() { + var e + return (e = C(/^[^^$\\.*+?(){[|]/)) + ? o(e) + : b(".") + ? l() + : b("\\") + ? ((e = O()), e || Y("atomEscape"), e) + : (e = j()) + ? e + : _("(?:", "ignore", "(", "normal") + } + function k(e) { + if (z) { + var t, n + if ( + "unicodeEscape" == e.kind && + (t = e.codePoint) >= 55296 && + 56319 >= t && + A("\\") && + D("u") + ) { + var i = $ + $++ + var s = I() + "unicodeEscape" == s.kind && + (n = s.codePoint) >= 56320 && + 57343 >= n + ? ((e.range[1] = s.range[1]), + (e.codePoint = 1024 * (t - 55296) + n - 56320 + 65536), + (e.type = "value"), + (e.kind = "unicodeCodePointEscape"), + r(e)) + : ($ = i) + } + } + return e + } + function I() { + return O(!0) + } + function O(e) { + var t, + r = $ + if ((t = M())) return t + if (e) { + if (b("b")) return a("singleEscape", 8, "\\b") + b("B") && Y("\\B not possible inside of CharacterClass", "", r) + } + return (t = R()) + } + function M() { + var e, t + if ((e = C(/^(?!0)\d+/))) { + t = e[0] + var r = parseInt(e[0], 10) + return K >= r + ? p(e[0]) + : (J.push(r), + g(-e[0].length), + (e = C(/^[0-7]{1,3}/)) + ? a("octal", parseInt(e[0], 8), e[0], 1) + : ((e = o(C(/^[89]/))), n(e, e.range[0] - 1))) + } + return (e = C(/^[0-7]{1,3}/)) + ? ((t = e[0]), + /^0{1,3}$/.test(t) + ? a("null", 0, "0", t.length + 1) + : a("octal", parseInt(t, 8), t, 1)) + : (e = C(/^[dDsSwW]/)) + ? c(e[0]) + : !1 + } + function R() { + var e + if ((e = C(/^[fnrtv]/))) { + var t = 0 + switch (e[0]) { + case "t": + t = 9 + break + case "n": + t = 10 + break + case "v": + t = 11 + break + case "f": + t = 12 + break + case "r": + t = 13 + } + return a("singleEscape", t, "\\" + e[0]) + } + return (e = C(/^c([a-zA-Z])/)) + ? a("controlLetter", e[1].charCodeAt(0) % 32, e[1], 2) + : (e = C(/^x([0-9a-fA-F]{2})/)) + ? a("hexadecimalEscape", parseInt(e[1], 16), e[1], 2) + : (e = C(/^u([0-9a-fA-F]{4})/)) + ? k(a("unicodeEscape", parseInt(e[1], 16), e[1], 2)) + : z && (e = C(/^u\{([0-9a-fA-F]+)\}/)) + ? a("unicodeCodePointEscape", parseInt(e[1], 16), e[1], 4) + : N() + } + function L(e) { + var t = new RegExp( + "[ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮ̀-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁ҃-҇Ҋ-ԯԱ-Ֆՙա-և֑-ׇֽֿׁׂׅׄא-תװ-ײؐ-ؚؠ-٩ٮ-ۓە-ۜ۟-۪ۨ-ۼۿܐ-݊ݍ-ޱ߀-ߵߺࠀ-࠭ࡀ-࡛ࢠ-ࢲࣤ-ॣ०-९ॱ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-ৱਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૯ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍ୖୗଡ଼ଢ଼ୟ-ୣ୦-୯ୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௯ఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-్ౕౖౘౙౠ-ౣ౦-౯ಁ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೞೠ-ೣ೦-೯ೱೲഁ-ഃഅ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൎൗൠ-ൣ൦-൯ൺ-ൿංඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲෳก-ฺเ-๎๐-๙ກຂຄງຈຊຍດ-ທນ-ຟມ-ຣລວສຫອ-ູົ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟༀ༘༙༠-༩༹༵༷༾-ཇཉ-ཬཱ-྄྆-ྗྙ-ྼ࿆က-၉ၐ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፟ᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜌᜎ-᜔ᜠ-᜴ᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-៓ៗៜ៝០-៩᠋-᠍᠐-᠙ᠠ-ᡷᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-᤻᥆-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉ᧐-᧙ᨀ-ᨛᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙ᪧ᪰-᪽ᬀ-ᭋ᭐-᭙᭫-᭳ᮀ-᯳ᰀ-᰷᱀-᱉ᱍ-ᱽ᳐-᳔᳒-ᳶ᳸᳹ᴀ-᷵᷼-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼ‌‍‿⁀⁔ⁱⁿₐ-ₜ⃐-⃥⃜⃡-⃰ℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯ⵿-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〯〱-〵〸-〼ぁ-ゖ゙゚ゝ-ゟァ-ヺー-ヿㄅ-ㄭㄱ-ㆎㆠ-ㆺㇰ-ㇿ㐀-䶵一-鿌ꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘫꙀ-꙯ꙴ-꙽ꙿ-ꚝꚟ-꛱ꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐ-ꞭꞰꞱꟷ-ꠧꡀ-ꡳꢀ-꣄꣐-꣙꣠-ꣷꣻ꤀-꤭ꤰ-꥓ꥠ-ꥼꦀ-꧀ꧏ-꧙ꧠ-ꧾꨀ-ꨶꩀ-ꩍ꩐-꩙ꩠ-ꩶꩺ-ꫂꫛ-ꫝꫠ-ꫯꫲ-꫶ꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭟꭤꭥꯀ-ꯪ꯬꯭꯰-꯹가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻ︀-️︠-︭︳︴﹍-﹏ﹰ-ﹴﹶ-ﻼ0-9A-Z_a-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]" + ) + return ( + 36 === e || + 95 === e || + (e >= 65 && 90 >= e) || + (e >= 97 && 122 >= e) || + (e >= 48 && 57 >= e) || + 92 === e || + (e >= 128 && t.test(String.fromCharCode(e))) + ) + } + function N() { + var e, + t = "‌", + r = "‍" + return L(x()) + ? b(t) + ? a("identifier", 8204, t) + : b(r) + ? a("identifier", 8205, r) + : null + : ((e = g()), a("identifier", e.charCodeAt(0), e, 1)) + } + function j() { + var e, + t = $ + return (e = C(/^\[\^/)) + ? ((e = U()), E("]"), m(e, !0, t, $)) + : b("[") + ? ((e = U()), E("]"), m(e, !1, t, $)) + : null + } + function U() { + var e + return A("]") ? [] : ((e = G()), e || Y("nonEmptyClassRanges"), e) + } + function V(e) { + var t, r, n + if (A("-") && !D("]")) { + E("-"), (n = q()), n || Y("classAtom"), (r = $) + var i = U() + return ( + i || Y("classRanges"), + (t = e.range[0]), + "empty" === i.type ? [y(e, n, t, r)] : [y(e, n, t, r)].concat(i) + ) + } + return (n = W()), n || Y("nonEmptyClassRangesNoDash"), [e].concat(n) + } + function G() { + var e = q() + return e || Y("classAtom"), A("]") ? [e] : V(e) + } + function W() { + var e = q() + return e || Y("classAtom"), A("]") ? e : V(e) + } + function q() { + return b("-") ? o("-") : H() + } + function H() { + var e + return (e = C(/^[^\\\]-]/)) + ? o(e[0]) + : b("\\") + ? ((e = I()), e || Y("classEscape"), k(e)) + : void 0 + } + function Y(t, r, n, i) { + ;(n = null == n ? $ : n), (i = null == i ? n : i) + var s = Math.max(0, n - 10), + a = Math.min(i + 10, e.length), + o = " " + e.substring(s, a), + u = " " + new Array(n - s + 1).join(" ") + "^" + throw SyntaxError( + t + " at position " + n + (r ? ": " + r : "") + "\n" + o + "\n" + u + ) + } + var J = [], + K = 0, + X = !0, + z = -1 !== (t || "").indexOf("u"), + $ = 0 + ;(e = String(e)), "" === e && (e = "(?:)") + var Q = S() + Q.range[1] !== e.length && + Y("Could not parse entire input - got stuck", "", Q.range[1]) + for (var Z = 0; Z < J.length; Z++) + if (J[Z] <= K) return ($ = 0), (X = !1), S() + return Q + } + var r = { parse: t } + "undefined" != typeof e && e.exports + ? (e.exports = r) + : (window.regjsparser = r) + })() + }, + function(e, t, r) { + function n(e) { + return D ? (A ? m.UNICODE_IGNORE_CASE[e] : m.UNICODE[e]) : m.REGULAR[e] + } + function i(e, t) { + return v.call(e, t) + } + function s(e, t) { + for (var r in t) e[r] = t[r] + } + function a(e, t) { + if (t) { + var r = f(t, "") + switch (r.type) { + case "characterClass": + case "group": + case "value": + break + default: + r = o(r, t) + } + s(e, r) + } + } + function o(e, t) { + return { type: "group", behavior: "ignore", body: [e], raw: "(?:" + t + ")" } + } + function u(e) { + return i(d, e) ? d[e] : !1 + } + function l(e) { + var t = h() + e.body.forEach(function(e) { + switch (e.type) { + case "value": + if ((t.add(e.codePoint), A && D)) { + var r = u(e.codePoint) + r && t.add(r) + } + break + case "characterClassRange": + var i = e.min.codePoint, + s = e.max.codePoint + t.addRange(i, s), A && D && t.iuAddRange(i, s) + break + case "characterClassEscape": + t.add(n(e.value)) + break + default: + throw Error("Unknown term type: " + e.type) + } + }) + return e.negative && (t = (D ? g : E).clone().remove(t)), a(e, t.toString()), e + } + function c(e) { + switch (e.type) { + case "dot": + a(e, (D ? b : x).toString()) + break + case "characterClass": + e = l(e) + break + case "characterClassEscape": + a(e, n(e.value).toString()) + break + case "alternative": + case "disjunction": + case "group": + case "quantifier": + e.body = e.body.map(c) + break + case "value": + var t = e.codePoint, + r = h(t) + if (A && D) { + var i = u(t) + i && r.add(i) + } + a(e, r.toString()) + break + case "anchor": + case "empty": + case "group": + case "reference": + break + default: + throw Error("Unknown term type: " + e.type) + } + return e + } + var p = r(6107).generate, + f = r(6108).parse, + h = r(2215), + d = r(7302), + m = r(6106), + y = {}, + v = y.hasOwnProperty, + g = h().addRange(0, 1114111), + E = h().addRange(0, 65535), + b = g.clone().remove(10, 13, 8232, 8233), + x = b.clone().intersection(E) + h.prototype.iuAddRange = function(e, t) { + var r = this + do { + var n = u(e) + n && r.add(n) + } while (++e <= t) + return r + } + var A = !1, + D = !1 + e.exports = function(e, t) { + var r = f(e, t) + return ( + (A = t ? t.indexOf("i") > -1 : !1), + (D = t ? t.indexOf("u") > -1 : !1), + s(r, c(r)), + p(r) + ) + } + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + MemberExpression: { + exit: function(e) { + var r = e.node, + n = r.property + r.computed || + !t.isIdentifier(n) || + t.isValidIdentifier(n.name) || + ((r.property = t.stringLiteral(n.name)), + (r.computed = !0)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + ObjectProperty: { + exit: function(e) { + var r = e.node, + n = r.key + r.computed || + !t.isIdentifier(n) || + t.isValidIdentifier(n.name) || + (r.key = t.stringLiteral(n.name)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(4)["default"] + t.__esModule = !0 + var i = r(6113), + s = n(i) + ;(t["default"] = function(e) { + var t = e.types + return { + visitor: { + ObjectExpression: function(e, r) { + for ( + var n = e.node, i = !1, a = n.properties, o = 0; + o < a.length; + o++ + ) { + var u = a[o] + if ("get" === u.kind || "set" === u.kind) { + i = !0 + break + } + } + if (i) { + var l = {} + ;(n.properties = n.properties.filter(function(e) { + return e.computed || ("get" !== e.kind && "set" !== e.kind) + ? !0 + : (s.push(l, e, null, r), !1) + })), + e.replaceWith( + t.callExpression( + t.memberExpression( + t.identifier("Object"), + t.identifier("defineProperties") + ), + [n, s.toDefineObject(l)] + ) + ) + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7499, 20, 4, 6114, 2233, 2247, 12], + [7497, 20, 4, 6115, 6116, 12], + [7498, 4, 12], + [7393, 538, 20, 4, 6256, 744, 2247, 534, 6117, 12], + 810, + [7394, 93, 92, 20, 4, 354, 12], + [7397, 4, 20, 12, 354], + 2609, + [7398, 92, 20, 534], + [7399, 4, 12], + 2612, + [7400, 20, 4, 354, 12], + [7402, 4, 6127, 12], + [7403, 4, 12], + [7404, 4, 745, 12, 6126], + [7405, 20, 4, 444, 12], + [7406, 93, 4, 12], + 2619, + [7408, 92, 20, 4, 2217, 6129, 354, 12], + [7409, 6130], + [7410, 20, 4, 6136, 534, 354, 6154, 12], + [7413, 93, 20, 4, 2219, 12], + [7414, 537, 92, 4, 20, 2218, 1232, 12, 1241], + [7317, 20, 6152, 2222, 6151, 6150, 6137], + [7318, 6142, 6138, 6145, 6143, 6147], + [7319, 6140], + 2516, + [7321, 2220, 6141], + [7322, 2220], + 2519, + [7323, 6144], + 2521, + [7324, 6146], + 2521, + 2524, + 2525, + [7325, 2221], + [7326, 6148, 2221, 6149], + 2528, + [7327, 6153], + 2530, + 810, + [7431, 6156], + [7432, 6157], + 2648, + [7415, 7303], + 2626, + [7329, 6161], + 2533, + [7417, 6266, 20, 4, 6260, 6259, 6261, 2245, 535, 12], + [7418, 4, 20, 12, 1233, 273], + [7419, 20, 273], + [7420, 20, 273], + [7421, 20, 273], + [7423, 273, 6163, 6164, 6166, 6168, 6169, 6165], + [7424, 20, 273], + [7425, 20, 273], + [7426, 4, 12], + [7428, 4, 12], + [7430, 20, 4, 2223, 2231, 12, 1233], + [7394, 93, 92, 20, 4, 355, 12], + [7397, 4, 20, 12, 355], + 2609, + [7398, 92, 20, 535], + [7399, 4, 12], + 2612, + [7400, 20, 4, 355, 12], + [7402, 4, 6182, 12], + [7403, 4, 12], + [7404, 4, 745, 12, 6181], + [7405, 20, 4, 444, 12], + [7406, 93, 4, 12], + 2619, + [7408, 92, 20, 4, 2225, 6184, 355, 12], + [7409, 6185], + [7410, 20, 4, 6191, 535, 355, 6206, 12], + [7413, 93, 20, 4, 2227, 12], + [7414, 537, 92, 4, 20, 2226, 1235, 12, 1241], + [7317, 20, 6204, 2229, 6203, 2231, 6192], + [7318, 6197, 6193, 6200, 6198, 6202], + [7319, 6195], + 2516, + [7321, 2228, 6196], + [7322, 2228], + 2519, + [7323, 6199], + 2521, + [7324, 6201], + 2521, + 2524, + 2528, + [7327, 6205], + 2530, + 810, + [7431, 6208], + [7432, 6209], + 2648, + [7415, 7304], + 2626, + [7329, 6213], + 2533, + 2525, + [7325, 2230], + 2644, + 2650, + [7433, 6225, 6235, 742, 6255], + [7435, 2235, 6227, 6245], + [7437, 6239, 740], + 1399, + 2658, + 2659, + [7438, 445], + [7440, 6231, 6232, 536, 2249, 6265], + 1402, + [7442, 2239, 6241], + [7444, 2238, 2248], + [7449, 6246, 6247, 6248, 156, 6262], + [7450, 2241, 276], + [7451, 6230, 6249, 276], + [7452, 1236, 2241, 2243, 156, 1239, 2244, 2232, 276, 1240], + [7453, 1236, 1240], + 815, + [7454, 2240, 6238, 6243], + 2672, + 2673, + [7456, 139], + [7457, 139], + [7458, 536, 742, 2234], + [7459, 1237, 274, 276], + [7460, 276], + [7461, 6220, 740], + [7462, 2234], + [7463, 536, 156], + [7464, 6222], + 2683, + [7465, 445], + [7467, 2244, 6263], + 2687, + 2688, + [7469, 6237], + 2690, + [7474, 743, 156, 741, 274, 2248], + 2692, + [7478, 2237, 536], + [7481, 139], + [7482, 6257, 275], + [7483, 275], + [7484, 6228, 743, 275], + [7485, 139], + [7487, 274, 275], + [7493, 445, 276], + [7494, 6236, 445], + [7495, 2242, 6233, 1239], + [7332, 6273], + [7336, 6276], + [7337, 6277], + [7342, 6280], + [7344, 6268, 6267, 2250], + 1937, + [7346, 6305, 6304, 6297], + [7347, 6299], + [7349, 114], + [7350, 114], + [7351, 114, 6300], + [7352, 114, 6301], + [7353, 1251, 277], + [7354, 6302, 277], + [7356, 1251, 277], + [7357, 1251, 6303, 277], + 2581, + 2582, + [7359, 1243, 446], + [7360, 6282], + [7362, 114], + [7366, 1243], + [7367, 1243], + 559, + [7368, 114, 1249, 1250, 1247, 446], + 1379, + [7370, 114, 539], + [7377, 6294, 1244], + 1384, + [7379, 1244], + [7381, 6284, 446, 748, 277], + [7382, 2253, 6296, 277], + [7383, 6283, 6291, 748, 539, 2256], + [7384, 746], + [7386, 539, 1248], + [7387, 1248, 2255], + [7388, 6295, 1248], + 373, + [7390, 6293, 2256], + [7392, 6298, 748], + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.parse, + r = e.traverse + return { + visitor: { + CallExpression: function(e) { + if ( + e.get("callee").isIdentifier({ name: "eval" }) && + 1 === e.node.arguments.length + ) { + var n = e.get("arguments")[0].evaluate() + if (!n.confident) return + var i = n.value + if ("string" != typeof i) return + var s = t(i) + return r.removeProperties(s), s.program + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(72)["default"], + i = r(37)["default"] + t.__esModule = !0 + var s = r(6308), + a = n(s), + o = r(52), + u = i(o) + ;(t["default"] = function(e) { + function t(t) { + return t.operator === e.operator + "=" + } + function r(e, t) { + return u.assignmentExpression("=", e, t) + } + var n = {} + return ( + (n.ExpressionStatement = function(n, i) { + if (!n.isCompletionRecord()) { + var s = n.node.expression + if (t(s)) { + var o = [], + l = a["default"](s.left, o, i, n.scope, !0) + o.push( + u.expressionStatement(r(l.ref, e.build(l.uid, s.right))) + ), + n.replaceWithMultiple(o) + } + } + }), + (n.AssignmentExpression = function(n, i) { + var s = n.node, + o = n.scope + if (t(s)) { + var u = [], + l = a["default"](s.left, u, i, o) + u.push(r(l.ref, e.build(l.uid, s.right))), n.replaceWithMultiple(u) + } + }), + (n.BinaryExpression = function(t) { + var r = t.node + r.operator === e.operator && t.replaceWith(e.build(r.left, r.right)) + }), + n + ) + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + function n(e, t, r, n) { + var i = void 0 + if (o.isIdentifier(e)) { + if (n.hasBinding(e.name)) return e + i = e + } else { + if (!o.isMemberExpression(e)) + throw new Error("We can't explode this node type " + e.type) + if (((i = e.object), o.isIdentifier(i) && n.hasBinding(i.name))) return i + } + var s = n.generateUidIdentifierBasedOnNode(i) + return t.push(o.variableDeclaration("var", [o.variableDeclarator(s, i)])), s + } + function i(e, t, r, n) { + var i = e.property, + s = o.toComputedKey(e, i) + if (o.isLiteral(s)) return s + var a = n.generateUidIdentifierBasedOnNode(i) + return t.push(o.variableDeclaration("var", [o.variableDeclarator(a, i)])), a + } + var s = r(37)["default"] + t.__esModule = !0 + var a = r(52), + o = s(a) + ;(t["default"] = function(e, t, r, s, a) { + var u = void 0 + u = o.isIdentifier(e) && a ? e : n(e, t, r, s) + var l = void 0, + c = void 0 + if (o.isIdentifier(e)) (l = e), (c = u) + else { + var p = i(e, t, r, s), + f = e.computed || o.isLiteral(p) + c = l = o.memberExpression(u, p, f) + } + return { uid: c, ref: l } + }), + (e.exports = t["default"]) + }, + [7417, 6417, 72, 37, 6409, 6408, 6410, 2284, 540, 52], + [7418, 37, 72, 52, 1252, 278], + [7419, 72, 278], + [7420, 72, 278], + [7421, 72, 278], + [7423, 278, 6310, 6311, 6313, 6315, 6316, 6312], + [7424, 72, 278], + [7425, 72, 278], + [7426, 37, 52], + [7428, 37, 52], + [7430, 72, 37, 2262, 2270, 52, 1252], + [7394, 358, 281, 72, 37, 356, 52], + [7397, 37, 72, 52, 356], + 2609, + [7398, 281, 72, 540], + [7399, 37, 52], + 2612, + [7400, 72, 37, 356, 52], + [7402, 37, 6329, 52], + [7403, 37, 52], + [7404, 37, 2291, 52, 6328], + [7405, 72, 37, 1255, 52], + [7406, 358, 37, 52], + 2619, + [7408, 281, 72, 37, 2264, 6331, 356, 52], + [7409, 6332], + [7410, 72, 37, 6338, 540, 356, 6353, 52], + [7413, 358, 72, 37, 2266, 52], + [7414, 1260, 281, 37, 72, 2265, 1254, 52, 2283], + [7317, 72, 6351, 2268, 6350, 2270, 6339], + [7318, 6344, 6340, 6347, 6345, 6349], + [7319, 6342], + 2516, + [7321, 2267, 6343], + [7322, 2267], + 2519, + [7323, 6346], + 2521, + [7324, 6348], + 2521, + 2524, + 2528, + [7327, 6352], + 2530, + 810, + [7431, 6355], + [7432, 6356], + 2648, + [7415, 7305], + 2626, + [7329, 6360], + 2533, + 2525, + [7325, 2269], + 2650, + 1397, + [7433, 6373, 6385, 751, 6405], + [7434, 6367], + [7435, 2272, 6376, 6395], + [7437, 6389, 750], + 1399, + 2658, + 2659, + [7438, 447], + [7440, 6380, 6381, 749, 2287, 6415], + [7441, 6369, 2272, 2273, 2275, 6401, 6402, 6403, 169, 140], + 1402, + [7442, 2275, 6391], + [7444, 2274, 2286], + [7449, 6396, 6397, 6398, 169, 6411], + [7450, 2278, 280], + [7451, 6379, 6399, 280], + [7452, 2276, 2278, 6383, 169, 2280, 2281, 6364, 280, 2282], + [7453, 2276, 2282], + 1410, + 815, + [7454, 2277, 6388, 6393], + 2672, + 2673, + [7456, 140], + [7457, 140], + [7458, 749, 751, 2271], + [7459, 1256, 357, 280], + [7460, 280], + [7461, 6368, 750], + [7462, 2271], + [7463, 749, 169], + [7464, 6370], + 2683, + [7465, 447], + [7467, 2281, 6413], + 2687, + 2688, + [7469, 6387], + 2690, + [7474, 1259, 169, 1258, 357, 2286], + 2692, + [7481, 140], + [7482, 6406, 279], + [7483, 279], + [7484, 6377, 1259, 279], + [7485, 140], + [7487, 357, 279], + [7489, 2285, 6371, 6394], + [7493, 447, 280], + [7494, 6386, 447], + [7495, 2279, 6382, 2280], + 2644, + [7332, 6426], + [7336, 6429], + [7337, 6430], + [7338, 6431], + [7342, 6433], + [7343, 2289], + [7344, 6419, 6418, 2289], + 1937, + [7346, 6458, 6457, 6450], + [7347, 6452], + [7349, 115], + [7350, 115], + [7351, 115, 6453], + [7352, 115, 6454], + [7353, 1269, 282], + [7354, 6455, 282], + [7356, 1269, 282], + [7357, 1269, 6456, 282], + 2581, + 2582, + [7359, 1261, 448], + [7360, 6435], + [7362, 115], + [7366, 1261], + [7367, 1261], + 559, + [7368, 115, 1267, 1268, 1265, 448], + 1379, + [7370, 115, 541], + [7377, 6447, 1262], + 1384, + [7379, 1262], + [7381, 6437, 448, 754, 282], + [7382, 2292, 6449, 282], + [7383, 6436, 6444, 754, 541, 2295], + [7384, 752], + [7386, 541, 1266], + [7387, 1266, 2294], + [7388, 6448, 1266], + 373, + [7390, 6446, 2295], + [7392, 6451, 754], + function(e, t, r) { + ;(function(r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + MemberExpression: function(e) { + if (e.get("object").matchesPattern("process.env")) { + var n = e.toComputedKey() + t.isStringLiteral(n) && + e.replaceWith(t.valueToNode(r.env[n.value])) + } + } + } + } + }), + (e.exports = t["default"]) + }.call(t, r(1))) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + FunctionExpression: { + exit: function(e) { + var r = e.node + r.id && + ((r._ignoreUserWhitespace = !0), + e.replaceWith( + t.callExpression( + t.functionExpression( + null, + [], + t.blockStatement([ + t.toStatement(r), + t.returnStatement(r.id) + ]) + ), + [] + ) + )) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + MemberExpression: { + exit: function(e) { + var r = e.node, + n = r.property + r.computed && + t.isLiteral(n) && + t.isValidIdentifier(n.value) && + ((r.property = t.identifier(n.value)), + (r.computed = !1)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + visitor: { + VariableDeclaration: function(e) { + if (e.inList) + for (var t = e.node; ; ) { + var r = e.getSibling(e.key + 1) + if (!r.isVariableDeclaration({ kind: t.kind })) break + ;(t.declarations = t.declarations.concat( + r.node.declarations + )), + r.remove() + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + Literal: function(e) { + "boolean" == typeof e.node.value && + e.replaceWith( + t.unaryExpression( + "!", + t.numericLiteral(+!e.node.value), + !0 + ) + ) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + MemberExpression: function(e) { + if ( + e.matchesPattern("process.env.NODE_ENV") && + (e.replaceWith(t.valueToNode("production")), + e.parentPath.isBinaryExpression()) + ) { + var r = e.parentPath.evaluate() + r.confident && + e.parentPath.replaceWith(t.valueToNode(r.value)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + visitor: { + CallExpression: function(e, t) { + e.get("callee").matchesPattern("Object.assign") && + (e.node.callee = t.addHelper("extends")) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + visitor: { + CallExpression: function(e, t) { + e.get("callee").matchesPattern("Object.setPrototypeOf") && + (e.node.callee = t.addHelper("defaults")) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + ObjectProperty: { + exit: function(e) { + var r = e.node, + n = r.key + t.isLiteral(n) && + t.isValidIdentifier(n.value) && + ((r.key = t.identifier(n.value)), (r.computed = !1)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(6469)["default"] + t.__esModule = !0 + var i = r(6470), + s = n(i) + ;(t["default"] = function(e) { + function t(e) { + return i.isLiteral(i.toComputedKey(e, e.key), { value: "__proto__" }) + } + function r(e) { + var t = e.left + return ( + i.isMemberExpression(t) && + i.isLiteral(i.toComputedKey(t, t.property), { value: "__proto__" }) + ) + } + function n(e, t, r) { + return i.expressionStatement( + i.callExpression(r.addHelper("defaults"), [t, e.right]) + ) + } + var i = e.types + return { + visitor: { + AssignmentExpression: function(e, t) { + if (r(e.node)) { + var s = [], + a = e.node.left.object, + o = e.scope.maybeGenerateMemoised(a) + o && + s.push( + i.expressionStatement(i.assignmentExpression("=", o, a)) + ), + s.push(n(e.node, o || a, t)), + o && s.push(o), + e.replaceWithMultiple(s) + } + }, + ExpressionStatement: function(e, t) { + var s = e.node.expression + i.isAssignmentExpression(s, { operator: "=" }) && + r(s) && + e.replaceWith(n(s, s.left.object, t)) + }, + ObjectExpression: function(e, r) { + for ( + var n = void 0, a = e.node, o = a.properties, u = 0; + u < o.length; + u++ + ) { + var l = o[u] + t(l) && ((n = l.value), s["default"](a.properties, l)) + } + if (n) { + var c = [i.objectExpression([]), n] + a.properties.length && c.push(a), + e.replaceWith(i.callExpression(r.addHelper("extends"), c)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + 5, + [7504, 6471], + [7447, 6472], + 2687, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + var e = { + enter: function(e, t) { + var r = function() { + ;(t.isImmutable = !1), e.stop() + } + return e.isJSXClosingElement() + ? void e.skip() + : e.isJSXIdentifier({ name: "ref" }) && + e.parentPath.isJSXAttribute({ name: e.node }) + ? r() + : void ( + e.isJSXIdentifier() || + e.isIdentifier() || + e.isJSXMemberExpression() || + e.isImmutable() || + r() + ) + } + } + return { + visitor: { + JSXElement: function(t) { + if (!t.node._hoisted) { + var r = { isImmutable: !0 } + t.traverse(e, r), + r.isImmutable ? t.hoist() : (t.node._hoisted = !0) + } + } + } + } + }), + (e.exports = t["default"]) + }, + 5, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + function t(e) { + for (var t = 0; t < e.length; t++) { + var n = e[t] + if (i.isJSXSpreadAttribute(n)) return !0 + if (r(n, "ref")) return !0 + } + return !1 + } + function r(e, t) { + return i.isJSXAttribute(e) && i.isJSXIdentifier(e.name, { name: t }) + } + function n(e) { + var t = e.value + return t + ? (i.isJSXExpressionContainer(t) && (t = t.expression), t) + : i.identifier("true") + } + var i = e.types + return { + visitor: { + JSXElement: function(e, s) { + function a(e, t, r) { + e.push(i.objectProperty(t, r)) + } + var o = e.node, + u = o.openingElement + if (!t(u.attributes)) { + var l = i.objectExpression([]), + c = null, + p = u.name + i.isJSXIdentifier(p) && + i.react.isCompatTag(p.name) && + (p = i.stringLiteral(p.name)) + for (var f = u.attributes, h = 0; h < f.length; h++) { + var d = f[h] + if (r(d, "key")) c = n(d) + else { + var m = d.name.name, + y = i.isValidIdentifier(m) + ? i.identifier(m) + : i.stringLiteral(m) + a(l.properties, y, n(d)) + } + } + var v = [p, l] + if (c || o.children.length) { + var g = i.react.buildChildren(o) + v.push.apply( + v, + [ + c || + i.unaryExpression( + "void", + i.numericLiteral(0), + !0 + ) + ].concat(g) + ) + } + var E = i.callExpression(s.addHelper("jsx"), v) + e.replaceWith(E) + } + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + manipulateOptions: function(e, t) { + t.plugins.push("jsx") + }, + visitor: r(6477)({ + pre: function(e) { + e.callee = e.tagExpr + }, + post: function(e) { + t.react.isCompatTag(e.tagName) && + (e.call = t.callExpression( + t.memberExpression( + t.memberExpression( + t.identifier("React"), + t.identifier("DOM") + ), + e.tagExpr, + t.isLiteral(e.tagExpr) + ), + e.args + )) + } + }) + } + }), + (e.exports = t["default"]) + }, + [7505, 75, 44, 1273, 62], + [7417, 6586, 75, 44, 6579, 6578, 6580, 2326, 542, 62], + [7418, 44, 75, 62, 1270, 283], + [7419, 75, 283], + [7420, 75, 283], + [7421, 75, 283], + [7423, 283, 6479, 6480, 6482, 6484, 6485, 6481], + [7424, 75, 283], + [7425, 75, 283], + [7426, 44, 62], + [7428, 44, 62], + [7430, 75, 44, 2305, 1273, 62, 1270], + [7394, 361, 286, 75, 44, 359, 62], + [7397, 44, 75, 62, 359], + 2609, + [7398, 286, 75, 542], + [7399, 44, 62], + 2612, + [7400, 75, 44, 359, 62], + [7402, 44, 6498, 62], + [7403, 44, 62], + [7404, 44, 2333, 62, 6497], + [7405, 75, 44, 1274, 62], + [7406, 361, 44, 62], + 2619, + [7408, 286, 75, 44, 2307, 6500, 359, 62], + [7409, 6501], + [7410, 75, 44, 6507, 542, 359, 6522, 62], + [7413, 361, 75, 44, 2309, 62], + [7414, 1279, 286, 44, 75, 2308, 1272, 62, 2325], + [7317, 75, 6520, 2311, 6519, 1273, 6508], + [7318, 6513, 6509, 6516, 6514, 6518], + [7319, 6511], + 2516, + [7321, 2310, 6512], + [7322, 2310], + 2519, + [7323, 6515], + 2521, + [7324, 6517], + 2521, + 2524, + 2528, + [7327, 6521], + 2530, + 810, + [7431, 6524], + [7432, 6525], + 2648, + [7415, 7306], + 2626, + [7329, 6529], + 2533, + 2644, + 2525, + [7325, 2312], + 2650, + 1397, + [7433, 6543, 6555, 757, 6575], + [7434, 6537], + [7435, 2314, 6546, 6565], + [7437, 6559, 756], + 1399, + 2658, + 2659, + [7438, 449], + [7440, 6550, 6551, 755, 2329, 6585], + [7441, 6539, 2314, 2315, 2317, 6571, 6572, 6573, 170, 141], + 1402, + [7442, 2317, 6561], + [7444, 2316, 2328], + [7449, 6566, 6567, 6568, 170, 6581], + [7450, 2320, 285], + [7451, 6549, 6569, 285], + [7452, 2318, 2320, 6553, 170, 2322, 2323, 6534, 285, 2324], + [7453, 2318, 2324], + 1410, + 815, + [7454, 2319, 6558, 6563], + 2672, + 2673, + [7456, 141], + [7457, 141], + [7458, 755, 757, 2313], + [7459, 1275, 360, 285], + [7460, 285], + [7461, 6538, 756], + [7462, 2313], + [7463, 755, 170], + [7464, 6540], + 2683, + [7465, 449], + [7467, 2323, 6583], + 2687, + 2688, + [7469, 6557], + 2690, + [7474, 1278, 170, 1277, 360, 2328], + 2692, + [7481, 141], + [7482, 6576, 284], + [7483, 284], + [7484, 6547, 1278, 284], + [7485, 141], + [7487, 360, 284], + [7489, 2327, 6541, 6564], + [7493, 449, 285], + [7494, 6556, 449], + [7495, 2321, 6552, 2322], + [7332, 6595], + [7336, 6598], + [7337, 6599], + [7338, 6600], + [7342, 6602], + [7343, 2331], + [7344, 6588, 6587, 2331], + 1937, + [7346, 6627, 6626, 6619], + [7347, 6621], + [7349, 116], + [7350, 116], + [7351, 116, 6622], + [7352, 116, 6623], + [7353, 1288, 287], + [7354, 6624, 287], + [7356, 1288, 287], + [7357, 1288, 6625, 287], + 2581, + 2582, + [7359, 1280, 450], + [7360, 6604], + [7362, 116], + [7366, 1280], + [7367, 1280], + 559, + [7368, 116, 1286, 1287, 1284, 450], + 1379, + [7370, 116, 543], + [7377, 6616, 1281], + 1384, + [7379, 1281], + [7381, 6606, 450, 760, 287], + [7382, 2334, 6618, 287], + [7383, 6605, 6613, 760, 543, 2337], + [7384, 758], + [7386, 543, 1285], + [7387, 1285, 2336], + [7388, 6617, 1285], + 373, + [7390, 6615, 2337], + [7392, 6620, 760], + function(e, t) { + "use strict" + t.__esModule = !0 + var r = "__source", + n = "_jsxFileName" + ;(t["default"] = function(e) { + function t(e, t) { + var r = null != t ? i.numericLiteral(t) : i.nullLiteral(), + n = i.objectProperty(i.identifier("fileName"), e), + s = i.objectProperty(i.identifier("lineNumber"), r) + return i.objectExpression([n, s]) + } + var i = e.types, + s = { + JSXOpeningElement: function(e, s) { + if (!s.fileNameIdentifier) { + var a = + "unknown" !== s.file.log.filename + ? s.file.log.filename + : null, + o = e.scope.generateUidIdentifier(n) + e.hub.file.scope.push({ id: o, init: i.stringLiteral(a) }), + (s.fileNameIdentifier = o) + } + var u = i.jSXIdentifier(r), + l = e.container.openingElement.loc + if (l) { + var c = t(s.fileNameIdentifier, l.start.line) + e.container.openingElement.attributes.push( + i.jSXAttribute(u, i.jSXExpressionContainer(c)) + ) + } + } + } + return { visitor: s } + }), + (e.exports = t["default"]) + }, + [7505, 76, 45, 1292, 63], + [7417, 6738, 76, 45, 6731, 6730, 6732, 2364, 544, 63], + [7418, 45, 76, 63, 1289, 288], + [7419, 76, 288], + [7420, 76, 288], + [7421, 76, 288], + [7423, 288, 6631, 6632, 6634, 6636, 6637, 6633], + [7424, 76, 288], + [7425, 76, 288], + [7426, 45, 63], + [7428, 45, 63], + [7430, 76, 45, 2343, 1292, 63, 1289], + [7394, 364, 291, 76, 45, 362, 63], + [7397, 45, 76, 63, 362], + 2609, + [7398, 291, 76, 544], + [7399, 45, 63], + 2612, + [7400, 76, 45, 362, 63], + [7402, 45, 6650, 63], + [7403, 45, 63], + [7404, 45, 2371, 63, 6649], + [7405, 76, 45, 1293, 63], + [7406, 364, 45, 63], + 2619, + [7408, 291, 76, 45, 2345, 6652, 362, 63], + [7409, 6653], + [7410, 76, 45, 6659, 544, 362, 6674, 63], + [7413, 364, 76, 45, 2347, 63], + [7414, 1298, 291, 45, 76, 2346, 1291, 63, 2363], + [7317, 76, 6672, 2349, 6671, 1292, 6660], + [7318, 6665, 6661, 6668, 6666, 6670], + [7319, 6663], + 2516, + [7321, 2348, 6664], + [7322, 2348], + 2519, + [7323, 6667], + 2521, + [7324, 6669], + 2521, + 2524, + 2528, + [7327, 6673], + 2530, + 810, + [7431, 6676], + [7432, 6677], + 2648, + [7415, 7307], + 2626, + [7329, 6681], + 2533, + 2644, + 2525, + [7325, 2350], + 2650, + 1397, + [7433, 6695, 6707, 763, 6727], + [7434, 6689], + [7435, 2352, 6698, 6717], + [7437, 6711, 762], + 1399, + 2658, + 2659, + [7438, 451], + [7440, 6702, 6703, 761, 2367, 6737], + [7441, 6691, 2352, 2353, 2355, 6723, 6724, 6725, 171, 142], + 1402, + [7442, 2355, 6713], + [7444, 2354, 2366], + [7449, 6718, 6719, 6720, 171, 6733], + [7450, 2358, 290], + [7451, 6701, 6721, 290], + [7452, 2356, 2358, 6705, 171, 2360, 2361, 6686, 290, 2362], + [7453, 2356, 2362], + 1410, + 815, + [7454, 2357, 6710, 6715], + 2672, + 2673, + [7456, 142], + [7457, 142], + [7458, 761, 763, 2351], + [7459, 1294, 363, 290], + [7460, 290], + [7461, 6690, 762], + [7462, 2351], + [7463, 761, 171], + [7464, 6692], + 2683, + [7465, 451], + [7467, 2361, 6735], + 2687, + 2688, + [7469, 6709], + 2690, + [7474, 1297, 171, 1296, 363, 2366], + 2692, + [7481, 142], + [7482, 6728, 289], + [7483, 289], + [7484, 6699, 1297, 289], + [7485, 142], + [7487, 363, 289], + [7489, 2365, 6693, 6716], + [7493, 451, 290], + [7494, 6708, 451], + [7495, 2359, 6704, 2360], + [7332, 6747], + [7336, 6750], + [7337, 6751], + [7338, 6752], + [7342, 6754], + [7343, 2369], + [7344, 6740, 6739, 2369], + 1937, + [7346, 6779, 6778, 6771], + [7347, 6773], + [7349, 117], + [7350, 117], + [7351, 117, 6774], + [7352, 117, 6775], + [7353, 1307, 292], + [7354, 6776, 292], + [7356, 1307, 292], + [7357, 1307, 6777, 292], + 2581, + 2582, + [7359, 1299, 452], + [7360, 6756], + [7362, 117], + [7366, 1299], + [7367, 1299], + 559, + [7368, 117, 1305, 1306, 1303, 452], + 1379, + [7370, 117, 545], + [7377, 6768, 1300], + 1384, + [7379, 1300], + [7381, 6758, 452, 766, 292], + [7382, 2372, 6770, 292], + [7383, 6757, 6765, 766, 545, 2375], + [7384, 764], + [7386, 545, 1304], + [7387, 1304, 2374], + [7388, 6769, 1304], + 373, + [7390, 6767, 2375], + [7392, 6772, 766], + function(e, t, r) { + "use strict" + var n = r(768)["default"], + i = r(27)["default"], + s = r(30), + a = i(s), + o = Object.prototype.hasOwnProperty + t.hoist = function(e) { + function t(e, t) { + a.assertVariableDeclaration(e) + var n = [] + return ( + e.declarations.forEach(function(e) { + ;(r[e.id.name] = e.id), + e.init + ? n.push(a.assignmentExpression("=", e.id, e.init)) + : t && n.push(e.id) + }), + 0 === n.length ? null : 1 === n.length ? n[0] : a.sequenceExpression(n) + ) + } + a.assertFunction(e.node) + var r = {} + e.get("body").traverse({ + VariableDeclaration: { + exit: function(e) { + var r = t(e.node, !1) + null === r ? e.remove() : e.replaceWith(a.expressionStatement(r)), + e.skip() + } + }, + ForStatement: function(e) { + var r = e.node.init + a.isVariableDeclaration(r) && e.get("init").replaceWith(t(r, !1)) + }, + ForXStatement: function(e) { + var r = e.get("left") + r.isVariableDeclaration() && r.replaceWith(t(r.node, !0)) + }, + FunctionDeclaration: function(e) { + var t = e.node + r[t.id.name] = t.id + var n = a.expressionStatement( + a.assignmentExpression( + "=", + t.id, + a.functionExpression( + t.id, + t.params, + t.body, + t.generator, + t.expression + ) + ) + ) + e.parentPath.isBlockStatement() + ? (e.parentPath.unshiftContainer("body", n), e.remove()) + : e.replaceWith(n), + e.skip() + }, + FunctionExpression: function(e) { + e.skip() + } + }) + var i = {} + e.get("params").forEach(function(e) { + var t = e.node + a.isIdentifier(t) && (i[t.name] = t) + }) + var s = [] + return ( + n(r).forEach(function(e) { + o.call(i, e) || s.push(a.variableDeclarator(r[e], null)) + }), + 0 === s.length ? null : a.variableDeclaration("var", s) + ) + } + }, + function(e, t, r) { + "use strict" + function n() { + m["default"].ok(this instanceof n) + } + function i(e) { + n.call(this), v.assertLiteral(e), (this.returnLoc = e) + } + function s(e, t, r) { + n.call(this), + v.assertLiteral(e), + v.assertLiteral(t), + r ? v.assertIdentifier(r) : (r = null), + (this.breakLoc = e), + (this.continueLoc = t), + (this.label = r) + } + function a(e) { + n.call(this), v.assertLiteral(e), (this.breakLoc = e) + } + function o(e, t, r) { + n.call(this), + v.assertLiteral(e), + t ? m["default"].ok(t instanceof u) : (t = null), + r ? m["default"].ok(r instanceof l) : (r = null), + m["default"].ok(t || r), + (this.firstLoc = e), + (this.catchEntry = t), + (this.finallyEntry = r) + } + function u(e, t) { + n.call(this), + v.assertLiteral(e), + v.assertIdentifier(t), + (this.firstLoc = e), + (this.paramId = t) + } + function l(e, t) { + n.call(this), + v.assertLiteral(e), + v.assertLiteral(t), + (this.firstLoc = e), + (this.afterLoc = t) + } + function c(e, t) { + n.call(this), + v.assertLiteral(e), + v.assertIdentifier(t), + (this.breakLoc = e), + (this.label = t) + } + function p(e) { + m["default"].ok(this instanceof p) + var t = r(2380).Emitter + m["default"].ok(e instanceof t), + (this.emitter = e), + (this.entryStack = [new i(e.finalLoc)]) + } + var f = r(53)["default"], + h = r(27)["default"], + d = r(789), + m = f(d), + y = r(30), + v = h(y), + g = r(22) + g.inherits(i, n), + (t.FunctionEntry = i), + g.inherits(s, n), + (t.LoopEntry = s), + g.inherits(a, n), + (t.SwitchEntry = a), + g.inherits(o, n), + (t.TryEntry = o), + g.inherits(u, n), + (t.CatchEntry = u), + g.inherits(l, n), + (t.FinallyEntry = l), + g.inherits(c, n), + (t.LabeledEntry = c) + var E = p.prototype + ;(t.LeapManager = p), + (E.withEntry = function(e, t) { + m["default"].ok(e instanceof n), this.entryStack.push(e) + try { + t.call(this.emitter) + } finally { + var r = this.entryStack.pop() + m["default"].strictEqual(r, e) + } + }), + (E._findLeapLocation = function(e, t) { + for (var r = this.entryStack.length - 1; r >= 0; --r) { + var n = this.entryStack[r], + i = n[e] + if (i) + if (t) { + if (n.label && n.label.name === t.name) return i + } else if (!(n instanceof c)) return i + } + return null + }), + (E.getBreakLoc = function(e) { + return this._findLeapLocation("breakLoc", e) + }), + (E.getContinueLoc = function(e) { + return this._findLeapLocation("continueLoc", e) + }) + }, + function(e, t, r) { + "use strict" + function n(e, t) { + function r(e) { + function t(e) { + return ( + r || + (Array.isArray(e) + ? e.some(t) + : l.isNode(e) && + (o["default"].strictEqual(r, !1), (r = n(e)))), + r + ) + } + l.assertNode(e) + var r = !1, + i = l.VISITOR_KEYS[e.type] + if (i) + for (var s = 0; s < i.length; s++) { + var a = i[s], + u = e[a] + t(u) + } + return r + } + function n(n) { + l.assertNode(n) + var i = c(n) + return p.call(i, e) + ? i[e] + : p.call(f, n.type) + ? (i[e] = !1) + : p.call(t, n.type) + ? (i[e] = !0) + : (i[e] = r(n)) + } + return (n.onlyChildren = r), n + } + var i = r(53)["default"], + s = r(27)["default"], + a = r(789), + o = i(a), + u = r(30), + l = s(u), + c = r(2423).makeAccessor(), + p = Object.prototype.hasOwnProperty, + f = { FunctionExpression: !0 }, + h = { + CallExpression: !0, + ForInStatement: !0, + UnaryExpression: !0, + BinaryExpression: !0, + AssignmentExpression: !0, + UpdateExpression: !0, + NewExpression: !0 + }, + d = { + YieldExpression: !0, + BreakStatement: !0, + ContinueStatement: !0, + ReturnStatement: !0, + ThrowStatement: !0 + } + for (var m in d) p.call(d, m) && (h[m] = d[m]) + ;(t.hasSideEffects = n("hasSideEffects", h)), + (t.containsLeap = n("containsLeap", d)) + }, + function(e, t, r) { + "use strict" + function n(e) { + var t = e.node + if ( + (p.assertFunction(t), + t.id || (t.id = e.scope.parent.generateUidIdentifier("callee")), + t.generator && p.isFunctionDeclaration(t)) + ) { + var r = e.findParent(function(e) { + return e.isProgram() || e.isBlockStatement() + }) + if (!r) return t.id + var n = i(r), + s = n.declarations[0].id, + a = n.declarations[0].init.callee.object + p.assertArrayExpression(a) + var o = a.elements.length + return a.elements.push(t.id), p.memberExpression(s, p.numericLiteral(o), !0) + } + return t.id + } + function i(e) { + var t = e.node + l["default"].ok(Array.isArray(t.body)) + var r = y(t) + return r.decl + ? r.decl + : ((r.decl = p.variableDeclaration("var", [ + p.variableDeclarator( + e.scope.generateUidIdentifier("marked"), + p.callExpression( + p.memberExpression( + p.arrayExpression([]), + p.identifier("map"), + !1 + ), + [m.runtimeProperty("mark")] + ) + ) + ])), + e.unshiftContainer("body", r.decl), + r.decl) + } + function s(e, t) { + var r = { didRenameArguments: !1, argsId: t } + return e.traverse(v, r), r.didRenameArguments + } + var a = r(53)["default"], + o = r(27)["default"], + u = r(789), + l = a(u), + c = r(30), + p = o(c), + f = r(6780), + h = r(2380), + d = r(2381), + m = o(d), + y = r(2423).makeAccessor() + t.visitor = { + Function: { + exit: function(e, t) { + var r = e.node + if (r.generator) { + if (r.async) { + if (t.opts.asyncGenerators === !1) return + } else if (t.opts.generators === !1) return + } else { + if (!r.async) return + if (t.opts.async === !1) return + } + var i = e.scope.generateUidIdentifier("context"), + a = e.scope.generateUidIdentifier("args") + e.ensureBlock() + var o = e.get("body") + r.async && o.traverse(E), o.traverse(g, { context: i }) + var u = [], + l = [] + o.get("body").forEach(function(e) { + var t = e.node + t && null != t._blockHoist ? u.push(t) : l.push(t) + }), + u.length > 0 && (o.node.body = l) + var c = n(e) + p.assertIdentifier(r.id) + var d = p.identifier(r.id.name + "$"), + y = f.hoist(e), + v = s(e, a) + v && + ((y = y || p.variableDeclaration("var", [])), + y.declarations.push( + p.variableDeclarator(a, p.identifier("arguments")) + )) + var b = new h.Emitter(i) + b.explode(e.get("body")), y && y.declarations.length > 0 && u.push(y) + var x = [ + b.getContextFunction(d), + r.generator ? c : p.nullLiteral(), + p.thisExpression() + ], + A = b.getTryLocsList() + A && x.push(A) + var D = p.callExpression( + m.runtimeProperty(r.async ? "async" : "wrap"), + x + ) + u.push(p.returnStatement(D)), (r.body = p.blockStatement(u)) + var C = r.generator + C && (r.generator = !1), + r.async && (r.async = !1), + C && + p.isExpression(r) && + e.replaceWith(p.callExpression(m.runtimeProperty("mark"), [r])), + e.requeue() + } + } + } + var v = { + "FunctionExpression|FunctionDeclaration": function(e) { + e.skip() + }, + Identifier: function(e, t) { + "arguments" === e.node.name && + m.isReference(e) && + (e.replaceWith(t.argsId), (t.didRenameArguments = !0)) + } + }, + g = { + MetaProperty: function(e) { + var t = e.node + "function" === t.meta.name && + "sent" === t.property.name && + e.replaceWith( + p.memberExpression(this.context, p.identifier("_sent")) + ) + } + }, + E = { + Function: function(e) { + e.skip() + }, + AwaitExpression: function(e) { + var t = e.node.argument + e.replaceWith( + p.yieldExpression( + p.callExpression(m.runtimeProperty("awrap"), [t]), + !1 + ) + ) + } + } + }, + [7332, 6793], + [7336, 6796], + [7337, 6797], + [7338, 6798], + [7342, 6800], + [7343, 2383], + [7344, 6786, 6785, 2383], + 1937, + [7346, 6825, 6824, 6817], + [7347, 6819], + [7349, 118], + [7350, 118], + [7351, 118, 6820], + [7352, 118, 6821], + [7353, 1316, 294], + [7354, 6822, 294], + [7356, 1316, 294], + [7357, 1316, 6823, 294], + 2581, + 2582, + [7359, 1308, 453], + [7360, 6802], + [7362, 118], + [7366, 1308], + [7367, 1308], + 559, + [7368, 118, 1314, 1315, 1312, 453], + 1379, + [7370, 118, 546], + [7377, 6814, 1309], + 1384, + [7379, 1309], + [7381, 6804, 453, 771, 294], + [7382, 2386, 6816, 294], + [7383, 6803, 6811, 771, 546, 2389], + [7384, 769], + [7386, 546, 1313], + [7387, 1313, 2388], + [7388, 6815, 1313], + 373, + [7390, 6813, 2389], + [7392, 6818, 771], + [7394, 365, 293, 53, 27, 366, 30], + [7397, 27, 53, 30, 366], + 2609, + [7398, 293, 53, 547], + [7399, 27, 30], + 2612, + [7400, 53, 27, 366, 30], + [7402, 27, 6835, 30], + [7403, 27, 30], + [7404, 27, 2385, 30, 6834], + [7405, 53, 27, 1319, 30], + [7406, 365, 27, 30], + 2619, + [7408, 293, 53, 27, 2395, 6837, 366, 30], + [7409, 6838], + [7410, 53, 27, 6844, 547, 366, 6963, 30], + [7413, 365, 53, 27, 2397, 30], + [7414, 768, 293, 27, 53, 2396, 1318, 30, 6888], + [7317, 53, 6860, 2407, 6859, 6858, 6845], + [7318, 6850, 6846, 6853, 6851, 6855], + [7319, 6848], + 2516, + [7321, 2398, 6849], + [7322, 2398], + 2519, + [7323, 6852], + 2521, + [7324, 6854], + 2521, + 2524, + 2525, + [7325, 2399], + [7326, 6856, 2399, 6857], + 2528, + [7327, 6861], + 2530, + [7431, 6863], + [7432, 6864], + 2648, + [7415, 7308], + 2626, + 1399, + 812, + 2659, + [7438, 774], + [7441, 6867, 6868, 2401, 6874, 6883, 6884, 6885, 773, 454], + 1402, + [7443, 6880], + [7445, 6873, 774], + [7447, 6882], + 1409, + 2672, + 2673, + [7458, 2402, 1322, 2400], + [7460, 6887], + [7462, 2400], + 2687, + 2688, + [7469, 6878], + 2690, + [7474, 2405, 773, 1321, 548, 6893], + [7475, 454], + [7477, 6871, 2402, 1322], + [7481, 454], + [7482, 6889, 772], + [7486, 772], + [7489, 2406, 6869, 6881], + [7492, 2405, 773, 1321, 548, 454], + [7494, 6877, 774], + 1420, + [7329, 6897], + 2533, + [7417, 6784, 53, 27, 6956, 6955, 6957, 6958, 547, 30], + [7418, 27, 53, 30, 1323, 295], + [7419, 53, 295], + [7420, 53, 295], + [7421, 53, 295], + [7423, 295, 6899, 6900, 6902, 6904, 6905, 6901], + [7424, 53, 295], + [7425, 53, 295], + [7426, 27, 30], + [7428, 27, 30], + [7430, 53, 27, 2408, 6911, 30, 1323], + 2525, + [7325, 2409], + [7326, 6909, 2409, 6910], + 2650, + 1397, + [7433, 6921, 6934, 2417, 6951], + [7434, 6916], + [7435, 2410, 6924, 6941], + [7437, 6937, 775], + 1399, + 2658, + [7439, 6923, 776], + [7440, 6929, 6930, 1324, 2422, 6961], + [7441, 6918, 2410, 6920, 2412, 6947, 6948, 6949, 298, 143], + 1402, + [7442, 2412, 6938], + [7444, 2411, 2421], + [7447, 6946], + [7449, 6942, 6943, 6944, 298, 6959], + [7450, 2414, 297], + [7451, 6928, 6945, 297], + [7452, 2413, 2414, 6932, 298, 2418, 2419, 6913, 297, 2420], + [7453, 2413, 2420], + 1410, + 815, + [7454, 6926, 6936, 6940], + 2673, + [7456, 143], + [7457, 143], + [7459, 2416, 455, 297], + [7460, 297], + [7461, 6917, 775], + [7463, 1324, 298], + [7464, 6919], + 2683, + [7465, 776], + [7467, 2419, 6960], + 2687, + 2688, + [7469, 6935], + 2690, + [7474, 1327, 298, 1326, 455, 2421], + 2692, + [7477, 6922, 1324, 2417], + [7481, 143], + [7482, 6953, 296], + [7483, 296], + [7484, 6925, 1327, 296], + [7485, 143], + [7486, 296], + [7487, 455, 296], + [7493, 776, 297], + [7495, 2415, 6931, 2418], + 2644, + 810, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + visitor: { + CallExpression: function(e) { + e.get("callee").matchesPattern("console", !0) && e.remove() + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + visitor: { + DebuggerStatement: function(e) { + e.remove() + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t) { + "use strict" + e.exports = { + builtins: { + Symbol: "symbol", + Promise: "promise", + Map: "map", + WeakMap: "weak-map", + Set: "set", + WeakSet: "weak-set", + setImmediate: "set-immediate", + clearImmediate: "clear-immediate" + }, + methods: { + Array: { + concat: "array/concat", + copyWithin: "array/copy-within", + entries: "array/entries", + every: "array/every", + fill: "array/fill", + filter: "array/filter", + findIndex: "array/find-index", + find: "array/find", + forEach: "array/for-each", + from: "array/from", + includes: "array/includes", + indexOf: "array/index-of", + join: "array/join", + keys: "array/keys", + lastIndexOf: "array/last-index-of", + map: "array/map", + of: "array/of", + pop: "array/pop", + push: "array/push", + reduceRight: "array/reduce-right", + reduce: "array/reduce", + reverse: "array/reverse", + shift: "array/shift", + slice: "array/slice", + some: "array/some", + sort: "array/sort", + splice: "array/splice", + unshift: "array/unshift", + values: "array/values" + }, + JSON: { stringify: "json/stringify" }, + Object: { + assign: "object/assign", + create: "object/create", + defineProperties: "object/define-properties", + defineProperty: "object/define-property", + entries: "object/entries", + freeze: "object/freeze", + getOwnPropertyDescriptor: "object/get-own-property-descriptor", + getOwnPropertyDescriptors: "object/get-own-property-descriptors", + getOwnPropertyNames: "object/get-own-property-names", + getOwnPropertySymbols: "object/get-own-property-symbols", + getPrototypeOf: "object/get-prototype-of", + isExtensible: "object/is-extensible", + isFrozen: "object/is-frozen", + isSealed: "object/is-sealed", + is: "object/is", + keys: "object/keys", + preventExtensions: "object/prevent-extensions", + seal: "object/seal", + setPrototypeOf: "object/set-prototype-of", + values: "object/values" + }, + RegExp: { escape: "regexp/escape" }, + Math: { + acosh: "math/acosh", + asinh: "math/asinh", + atanh: "math/atanh", + cbrt: "math/cbrt", + clz32: "math/clz32", + cosh: "math/cosh", + expm1: "math/expm1", + fround: "math/fround", + hypot: "math/hypot", + imul: "math/imul", + log10: "math/log10", + log1p: "math/log1p", + log2: "math/log2", + sign: "math/sign", + sinh: "math/sinh", + tanh: "math/tanh", + trunc: "math/trunc", + iaddh: "math/iaddh", + isubh: "math/isubh", + imulh: "math/imulh", + umulh: "math/umulh" + }, + Symbol: { + for: "symbol/for", + hasInstance: "symbol/has-instance", + isConcatSpreadable: "symbol/is-concat-spreadable", + iterator: "symbol/iterator", + keyFor: "symbol/key-for", + match: "symbol/match", + replace: "symbol/replace", + search: "symbol/search", + species: "symbol/species", + split: "symbol/split", + toPrimitive: "symbol/to-primitive", + toStringTag: "symbol/to-string-tag", + unscopables: "symbol/unscopables" + }, + String: { + at: "string/at", + codePointAt: "string/code-point-at", + endsWith: "string/ends-with", + fromCodePoint: "string/from-code-point", + includes: "string/includes", + padLeft: "string/pad-left", + padRight: "string/pad-right", + padStart: "string/pad-start", + padEnd: "string/pad-end", + raw: "string/raw", + repeat: "string/repeat", + startsWith: "string/starts-with", + trim: "string/trim", + trimLeft: "string/trim-left", + trimRight: "string/trim-right", + trimStart: "string/trim-start", + trimEnd: "string/trim-end" + }, + Number: { + EPSILON: "number/epsilon", + isFinite: "number/is-finite", + isInteger: "number/is-integer", + isNaN: "number/is-nan", + isSafeInteger: "number/is-safe-integer", + MAX_SAFE_INTEGER: "number/max-safe-integer", + MIN_SAFE_INTEGER: "number/min-safe-integer", + parseFloat: "number/parse-float", + parseInt: "number/parse-int" + }, + Reflect: { + apply: "reflect/apply", + construct: "reflect/construct", + defineProperty: "reflect/define-property", + deleteProperty: "reflect/delete-property", + enumerate: "reflect/enumerate", + getOwnPropertyDescriptor: "reflect/get-own-property-descriptor", + getPrototypeOf: "reflect/get-prototype-of", + get: "reflect/get", + has: "reflect/has", + isExtensible: "reflect/is-extensible", + ownKeys: "reflect/own-keys", + preventExtensions: "reflect/prevent-extensions", + setPrototypeOf: "reflect/set-prototype-of", + set: "reflect/set", + defineMetadata: "reflect/define-metadata", + deleteMetadata: "reflect/delete-metadata", + getMetadata: "reflect/get-metadata", + getMetadataKeys: "reflect/get-metadata-keys", + getOwnMetadata: "reflect/get-own-metadata", + getOwnMetadataKeys: "reflect/get-own-metadata-keys", + hasMetadata: "reflect/has-metadata", + hasOwnMetadata: "reflect/has-own-metadata", + metadata: "reflect/metadata" + }, + System: { global: "system/global" }, + Error: { isError: "error/is-error" }, + Date: {}, + Function: {} + } + } + }, + function(e, t, r) { + "use strict" + var n = r(6968)["default"] + t.__esModule = !0 + var i = r(6966), + s = n(i) + ;(t["default"] = function(e) { + function t(e, t) { + return Object.prototype.hasOwnProperty.call(e, t) + } + var r = e.types, + n = "babel-runtime", + i = ["interopRequireWildcard", "interopRequireDefault"] + return { + pre: function(e) { + e.set("helperGenerator", function(t) { + return i.indexOf(t) < 0 + ? e.addImport(n + "/helpers/" + t, "default", t) + : void 0 + }), + this.setDynamic("regeneratorIdentifier", function() { + return e.addImport( + n + "/regenerator", + "default", + "regeneratorRuntime" + ) + }) + }, + visitor: { + ReferencedIdentifier: function(e, i) { + var a = e.node, + o = e.parent, + u = e.scope + return "regeneratorRuntime" === a.name && i.opts.regenerator !== !1 + ? void e.replaceWith(i.get("regeneratorIdentifier")) + : void ( + i.opts.polyfill !== !1 && + (r.isMemberExpression(o) || + (t(s["default"].builtins, a.name) && + (u.getBindingIdentifier(a.name) || + e.replaceWith( + i.addImport( + n + + "/core-js/" + + s["default"].builtins[a.name], + "default", + a.name + ) + )))) + ) + }, + CallExpression: function(e, t) { + if (t.opts.polyfill !== !1 && !e.node.arguments.length) { + var i = e.node.callee + r.isMemberExpression(i) && + i.computed && + e + .get("callee.property") + .matchesPattern("Symbol.iterator") && + e.replaceWith( + r.callExpression( + t.addImport( + n + "/core-js/get-iterator", + "default", + "getIterator" + ), + [i.object] + ) + ) + } + }, + BinaryExpression: function(e, t) { + t.opts.polyfill !== !1 && + "in" === e.node.operator && + e.get("left").matchesPattern("Symbol.iterator") && + e.replaceWith( + r.callExpression( + t.addImport( + n + "/core-js/is-iterable", + "default", + "isIterable" + ), + [e.node.right] + ) + ) + }, + MemberExpression: { + enter: function(e, i) { + if (i.opts.polyfill !== !1 && e.isReferenced()) { + var a = e.node, + o = a.object, + u = a.property + if ( + r.isReferenced(o, a) && + !a.computed && + t(s["default"].methods, o.name) + ) { + var l = s["default"].methods[o.name] + if ( + t(l, u.name) && + !e.scope.getBindingIdentifier(o.name) + ) { + if ( + "Object" === o.name && + "defineProperty" === u.name && + e.parentPath.isCallExpression() + ) { + var c = e.parentPath.node + if ( + 3 === c.arguments.length && + r.isLiteral(c.arguments[1]) + ) + return + } + e.replaceWith( + i.addImport( + n + "/core-js/" + l[u.name], + "default", + o.name + "$" + u.name + ) + ) + } + } + } + }, + exit: function(e, i) { + if (i.opts.polyfill !== !1 && e.isReferenced()) { + var a = e.node, + o = a.object + t(s["default"].builtins, o.name) && + (e.scope.getBindingIdentifier(o.name) || + e.replaceWith( + r.memberExpression( + i.addImport( + n + + "/core-js/" + + s["default"].builtins[o.name], + "default", + o.name + ), + a.property, + a.computed + ) + )) + } + } + } + } + } + }), + (t.definitions = s["default"]) + }, + 5, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function() { + return { + visitor: { + BinaryExpression: function(e) { + var t = e.node, + r = t.operator + if ("===" === r || "!==" === r) { + var n = e.get("left"), + i = e.get("right") + n.baseTypeStrictlyMatches(i) && + (t.operator = t.operator.slice(0, -1)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7332, 6979], + [7336, 6982], + [7337, 6983], + [7338, 6984], + [7342, 6986], + [7343, 2425], + [7344, 6972, 6971, 2425], + 1937, + [7346, 7011, 7010, 7003], + [7347, 7005], + [7349, 119], + [7350, 119], + [7351, 119, 7006], + [7352, 119, 7007], + [7353, 1338, 300], + [7354, 7008, 300], + [7356, 1338, 300], + [7357, 1338, 7009, 300], + 2581, + 2582, + [7359, 1330, 456], + [7360, 6988], + [7362, 119], + [7366, 1330], + [7367, 1330], + 559, + [7368, 119, 1336, 1337, 1334, 456], + 1379, + [7370, 119, 549], + [7377, 7e3, 1331], + 1384, + [7379, 1331], + [7381, 6990, 456, 779, 300], + [7382, 2428, 7002, 300], + [7383, 6989, 6997, 779, 549, 2431], + [7384, 777], + [7386, 549, 1335], + [7387, 1335, 2430], + [7388, 7001, 1335], + 373, + [7390, 6999, 2431], + [7392, 7004, 779], + [7417, 6970, 78, 46, 7112, 7111, 7113, 2458, 550, 64], + [7418, 46, 78, 64, 1339, 301], + [7419, 78, 301], + [7420, 78, 301], + [7421, 78, 301], + [7423, 301, 7013, 7014, 7016, 7018, 7019, 7015], + [7424, 78, 301], + [7425, 78, 301], + [7426, 46, 64], + [7428, 46, 64], + [7430, 78, 46, 2436, 2444, 64, 1339], + [7394, 367, 299, 78, 46, 368, 64], + [7397, 46, 78, 64, 368], + 2609, + [7398, 299, 78, 550], + [7399, 46, 64], + 2612, + [7400, 78, 46, 368, 64], + [7402, 46, 7032, 64], + [7403, 46, 64], + [7404, 46, 2427, 64, 7031], + [7405, 78, 46, 1342, 64], + [7406, 367, 46, 64], + 2619, + [7408, 299, 78, 46, 2438, 7034, 368, 64], + [7409, 7035], + [7410, 78, 46, 7041, 550, 368, 7056, 64], + [7413, 367, 78, 46, 2440, 64], + [7414, 1329, 299, 46, 78, 2439, 1341, 64, 2457], + [7317, 78, 7054, 2442, 7053, 2444, 7042], + [7318, 7047, 7043, 7050, 7048, 7052], + [7319, 7045], + 2516, + [7321, 2441, 7046], + [7322, 2441], + 2519, + [7323, 7049], + 2521, + [7324, 7051], + 2521, + 2524, + 2528, + [7327, 7055], + 2530, + 810, + [7431, 7058], + [7432, 7059], + 2648, + [7415, 7309], + 2626, + [7329, 7063], + 2533, + 2525, + [7325, 2443], + 2650, + 1397, + [7433, 7076, 7088, 782, 7108], + [7434, 7070], + [7435, 2446, 7079, 7098], + [7437, 7092, 781], + 1399, + 2658, + 2659, + [7438, 457], + [7440, 7083, 7084, 780, 2461, 7118], + [7441, 7072, 2446, 2447, 2449, 7104, 7105, 7106, 172, 144], + 1402, + [7442, 2449, 7094], + [7444, 2448, 2460], + [7449, 7099, 7100, 7101, 172, 7114], + [7450, 2452, 303], + [7451, 7082, 7102, 303], + [7452, 2450, 2452, 7086, 172, 2454, 2455, 7067, 303, 2456], + [7453, 2450, 2456], + 1410, + 815, + [7454, 2451, 7091, 7096], + 2672, + 2673, + [7456, 144], + [7457, 144], + [7458, 780, 782, 2445], + [7459, 1343, 369, 303], + [7460, 303], + [7461, 7071, 781], + [7462, 2445], + [7463, 780, 172], + [7464, 7073], + 2683, + [7465, 457], + [7467, 2455, 7116], + 2687, + 2688, + [7469, 7090], + 2690, + [7474, 1346, 172, 1345, 369, 2460], + 2692, + [7481, 144], + [7482, 7109, 302], + [7483, 302], + [7484, 7080, 1346, 302], + [7485, 144], + [7487, 369, 302], + [7489, 2459, 7074, 7097], + [7493, 457, 303], + [7494, 7089, 457], + [7495, 2453, 7085, 2454], + 2644, + function(e, t) { + "use strict" + ;(t.__esModule = !0), + (t["default"] = function(e) { + var t = e.types + return { + visitor: { + ReferencedIdentifier: function(e) { + "undefined" === e.node.name && + e.replaceWith( + t.unaryExpression("void", t.numericLiteral(0), !0) + ) + } + } + } + }), + (e.exports = t["default"]) + }, + function(e, t, r) { + "use strict" + var n = r(7122)["default"] + t.__esModule = !0 + var i = r(7123), + s = n(i) + ;(t["default"] = function(e) { + var t = e.messages + return { + visitor: { + ReferencedIdentifier: function(e) { + var r = e.node, + n = e.scope, + i = n.getBinding(r.name) + if (i && "type" === i.kind && !e.parentPath.isFlow()) + throw e.buildCodeFrameError( + t.get("undeclaredVariableType", r.name), + ReferenceError + ) + if (!n.hasBinding(r.name)) { + var a = n.getAllBindings(), + o = void 0, + u = -1 + for (var l in a) { + var c = s["default"](r.name, l) + 0 >= c || c > 3 || u >= c || ((o = l), (u = c)) + } + var p = void 0 + throw ((p = o + ? t.get("undeclaredVariableSuggestion", r.name, o) + : t.get("undeclaredVariable", r.name)), + e.buildCodeFrameError(p, ReferenceError)) + } + } + } + } + }), + (e.exports = t["default"]) + }, + 5, + function(e, t) { + "use strict" + var r = [], + n = [] + e.exports = function(e, t) { + if (e === t) return 0 + var i = e.length, + s = t.length + if (0 === i) return s + if (0 === s) return i + for (var a, o, u, l, c = 0, p = 0; i > c; ) + (n[c] = e.charCodeAt(c)), (r[c] = ++c) + for (; s > p; ) + for (a = t.charCodeAt(p), u = p++, o = p, c = 0; i > c; c++) + (l = a === n[c] ? u : u + 1), + (u = r[c]), + (o = r[c] = u > o ? (l > o ? o + 1 : l) : l > u ? u + 1 : l) + return o + } + }, + function(e, t, r) { + e.exports = { + plugins: [ + r(730), + r(657), + r(645), + r(616), + r(617), + r(628), + r(694), + r(715), + r(7125), + r(640), + r(644), + r(723), + r(733), + r(566), + r(722), + r(705), + r(643), + r(618), + r(731), + r(1053), + [r(767), { async: !1, asyncGenerators: !1 }] + ] + } + }, + function(e, t, r) { + "use strict" + function n(e) { + return u.isIdentifier(e) ? e.name : e.value.toString() + } + var i = r(1347)["default"], + s = r(173)["default"], + a = r(47)["default"] + t.__esModule = !0 + var o = r(65), + u = a(o) + ;(t["default"] = function() { + return { + visitor: { + ObjectExpression: function(e) { + for ( + var t = e.node, + r = t.properties.filter(function(e) { + return !u.isSpreadProperty(e) && !e.computed + }), + a = i(null), + o = i(null), + l = i(null), + c = r, + p = Array.isArray(c), + f = 0, + c = p ? c : s(c); + ; + + ) { + var h + if (p) { + if (f >= c.length) break + h = c[f++] + } else { + if (((f = c.next()), f.done)) break + h = f.value + } + var d = h, + m = n(d.key), + y = !1 + switch (d.kind) { + case "get": + ;(a[m] || o[m]) && (y = !0), (o[m] = !0) + break + case "set": + ;(a[m] || l[m]) && (y = !0), (l[m] = !0) + break + default: + ;(a[m] || o[m] || l[m]) && (y = !0), (a[m] = !0) + } + y && ((d.computed = !0), (d.key = u.stringLiteral(m))) + } + } + } + } + }), + (e.exports = t["default"]) + }, + [7332, 7135], + [7336, 7138], + [7337, 7139], + [7338, 7140], + [7342, 7142], + [7343, 2462], + [7344, 7128, 7127, 2462], + 1937, + [7346, 7167, 7166, 7159], + [7347, 7161], + [7349, 120], + [7350, 120], + [7351, 120, 7162], + [7352, 120, 7163], + [7353, 1357, 304], + [7354, 7164, 304], + [7356, 1357, 304], + [7357, 1357, 7165, 304], + 2581, + 2582, + [7359, 1349, 458], + [7360, 7144], + [7362, 120], + [7366, 1349], + [7367, 1349], + 559, + [7368, 120, 1355, 1356, 1353, 458], + 1379, + [7370, 120, 551], + [7377, 7156, 1350], + 1384, + [7379, 1350], + [7381, 7146, 458, 785, 304], + [7382, 2465, 7158, 304], + [7383, 7145, 7153, 785, 551, 2468], + [7384, 783], + [7386, 551, 1354], + [7387, 1354, 2467], + [7388, 7157, 1354], + 373, + [7390, 7155, 2468], + [7392, 7160, 785], + [7417, 7126, 79, 47, 7268, 7267, 7269, 2495, 552, 65], + [7418, 47, 79, 65, 1358, 305], + [7419, 79, 305], + [7420, 79, 305], + [7421, 79, 305], + [7423, 305, 7169, 7170, 7172, 7174, 7175, 7171], + [7424, 79, 305], + [7425, 79, 305], + [7426, 47, 65], + [7428, 47, 65], + [7430, 79, 47, 2473, 2481, 65, 1358], + [7394, 370, 173, 79, 47, 371, 65], + [7397, 47, 79, 65, 371], + 2609, + [7398, 173, 79, 552], + [7399, 47, 65], + 2612, + [7400, 79, 47, 371, 65], + [7402, 47, 7188, 65], + [7403, 47, 65], + [7404, 47, 2464, 65, 7187], + [7405, 79, 47, 1361, 65], + [7406, 370, 47, 65], + 2619, + [7408, 173, 79, 47, 2475, 7190, 371, 65], + [7409, 7191], + [7410, 79, 47, 7197, 552, 371, 7212, 65], + [7413, 370, 79, 47, 2477, 65], + [7414, 1348, 173, 47, 79, 2476, 1360, 65, 2494], + [7317, 79, 7210, 2479, 7209, 2481, 7198], + [7318, 7203, 7199, 7206, 7204, 7208], + [7319, 7201], + 2516, + [7321, 2478, 7202], + [7322, 2478], + 2519, + [7323, 7205], + 2521, + [7324, 7207], + 2521, + 2524, + 2528, + [7327, 7211], + 2530, + 810, + [7431, 7214], + [7432, 7215], + 2648, + [7415, 7310], + 2626, + [7329, 7219], + 2533, + 2525, + [7325, 2480], + 2650, + 1397, + [7433, 7232, 7244, 788, 7264], + [7434, 7226], + [7435, 2483, 7235, 7254], + [7437, 7248, 787], + 1399, + 2658, + 2659, + [7438, 459], + [7440, 7239, 7240, 786, 2498, 7274], + [7441, 7228, 2483, 2484, 2486, 7260, 7261, 7262, 174, 145], + 1402, + [7442, 2486, 7250], + [7444, 2485, 2497], + [7449, 7255, 7256, 7257, 174, 7270], + [7450, 2489, 307], + [7451, 7238, 7258, 307], + [7452, 2487, 2489, 7242, 174, 2491, 2492, 7223, 307, 2493], + [7453, 2487, 2493], + 1410, + 815, + [7454, 2488, 7247, 7252], + 2672, + 2673, + [7456, 145], + [7457, 145], + [7458, 786, 788, 2482], + [7459, 1362, 372, 307], + [7460, 307], + [7461, 7227, 787], + [7462, 2482], + [7463, 786, 174], + [7464, 7229], + 2683, + [7465, 459], + [7467, 2492, 7272], + 2687, + 2688, + [7469, 7246], + 2690, + [7474, 1365, 174, 1364, 372, 2497], + 2692, + [7481, 145], + [7482, 7265, 306], + [7483, 306], + [7484, 7236, 1365, 306], + [7485, 145], + [7487, 372, 306], + [7489, 2496, 7230, 7253], + [7493, 459, 307], + [7494, 7245, 459], + [7495, 2490, 7241, 2491], + 2644, + function(e, t, r) { + e.exports = { plugins: [r(2342), r(2301), r(822), r(823), r(2304)] } + }, + function(e, t, r) { + e.exports = { presets: [r(2499)], plugins: [r(1672), r(2302)] } + }, + function(e, t) { + e.exports = { + builtin: { + Array: !1, + ArrayBuffer: !1, + Boolean: !1, + constructor: !1, + DataView: !1, + Date: !1, + decodeURI: !1, + decodeURIComponent: !1, + encodeURI: !1, + encodeURIComponent: !1, + Error: !1, + escape: !1, + eval: !1, + EvalError: !1, + Float32Array: !1, + Float64Array: !1, + Function: !1, + hasOwnProperty: !1, + Infinity: !1, + Int16Array: !1, + Int32Array: !1, + Int8Array: !1, + isFinite: !1, + isNaN: !1, + isPrototypeOf: !1, + JSON: !1, + Map: !1, + Math: !1, + NaN: !1, + Number: !1, + Object: !1, + parseFloat: !1, + parseInt: !1, + Promise: !1, + propertyIsEnumerable: !1, + Proxy: !1, + RangeError: !1, + ReferenceError: !1, + Reflect: !1, + RegExp: !1, + Set: !1, + String: !1, + Symbol: !1, + SyntaxError: !1, + System: !1, + toLocaleString: !1, + toString: !1, + TypeError: !1, + Uint16Array: !1, + Uint32Array: !1, + Uint8Array: !1, + Uint8ClampedArray: !1, + undefined: !1, + unescape: !1, + URIError: !1, + valueOf: !1, + WeakMap: !1, + WeakSet: !1 + }, + es5: { + Array: !1, + Boolean: !1, + constructor: !1, + Date: !1, + decodeURI: !1, + decodeURIComponent: !1, + encodeURI: !1, + encodeURIComponent: !1, + Error: !1, + escape: !1, + eval: !1, + EvalError: !1, + Float32Array: !1, + Float64Array: !1, + Function: !1, + hasOwnProperty: !1, + Infinity: !1, + isFinite: !1, + isNaN: !1, + isPrototypeOf: !1, + JSON: !1, + Math: !1, + NaN: !1, + Number: !1, + Object: !1, + parseFloat: !1, + parseInt: !1, + propertyIsEnumerable: !1, + RangeError: !1, + ReferenceError: !1, + RegExp: !1, + String: !1, + SyntaxError: !1, + toLocaleString: !1, + toString: !1, + TypeError: !1, + undefined: !1, + unescape: !1, + URIError: !1, + valueOf: !1 + }, + es6: { + Array: !1, + ArrayBuffer: !1, + Boolean: !1, + constructor: !1, + DataView: !1, + Date: !1, + decodeURI: !1, + decodeURIComponent: !1, + encodeURI: !1, + encodeURIComponent: !1, + Error: !1, + escape: !1, + eval: !1, + EvalError: !1, + Float32Array: !1, + Float64Array: !1, + Function: !1, + hasOwnProperty: !1, + Infinity: !1, + Int16Array: !1, + Int32Array: !1, + Int8Array: !1, + isFinite: !1, + isNaN: !1, + isPrototypeOf: !1, + JSON: !1, + Map: !1, + Math: !1, + NaN: !1, + Number: !1, + Object: !1, + parseFloat: !1, + parseInt: !1, + Promise: !1, + propertyIsEnumerable: !1, + Proxy: !1, + RangeError: !1, + ReferenceError: !1, + Reflect: !1, + RegExp: !1, + Set: !1, + String: !1, + Symbol: !1, + SyntaxError: !1, + System: !1, + toLocaleString: !1, + toString: !1, + TypeError: !1, + Uint16Array: !1, + Uint32Array: !1, + Uint8Array: !1, + Uint8ClampedArray: !1, + undefined: !1, + unescape: !1, + URIError: !1, + valueOf: !1, + WeakMap: !1, + WeakSet: !1 + }, + browser: { + addEventListener: !1, + alert: !1, + AnalyserNode: !1, + AnimationEvent: !1, + applicationCache: !1, + ApplicationCache: !1, + ApplicationCacheErrorEvent: !1, + atob: !1, + Attr: !1, + Audio: !1, + AudioBuffer: !1, + AudioBufferSourceNode: !1, + AudioContext: !1, + AudioDestinationNode: !1, + AudioListener: !1, + AudioNode: !1, + AudioParam: !1, + AudioProcessingEvent: !1, + AutocompleteErrorEvent: !1, + BarProp: !1, + BatteryManager: !1, + BeforeUnloadEvent: !1, + BiquadFilterNode: !1, + Blob: !1, + blur: !1, + btoa: !1, + Cache: !1, + caches: !1, + CacheStorage: !1, + cancelAnimationFrame: !1, + CanvasGradient: !1, + CanvasPattern: !1, + CanvasRenderingContext2D: !1, + CDATASection: !1, + ChannelMergerNode: !1, + ChannelSplitterNode: !1, + CharacterData: !1, + clearInterval: !1, + clearTimeout: !1, + clientInformation: !1, + ClientRect: !1, + ClientRectList: !1, + ClipboardEvent: !1, + close: !1, + closed: !1, + CloseEvent: !1, + Comment: !1, + CompositionEvent: !1, + confirm: !1, + console: !1, + ConvolverNode: !1, + crypto: !1, + Crypto: !1, + CryptoKey: !1, + CSS: !1, + CSSFontFaceRule: !1, + CSSImportRule: !1, + CSSKeyframeRule: !1, + CSSKeyframesRule: !1, + CSSMediaRule: !1, + CSSPageRule: !1, + CSSRule: !1, + CSSRuleList: !1, + CSSStyleDeclaration: !1, + CSSStyleRule: !1, + CSSStyleSheet: !1, + CSSSupportsRule: !1, + CSSUnknownRule: !1, + CSSViewportRule: !1, + CustomEvent: !1, + DataTransfer: !1, + DataTransferItem: !1, + DataTransferItemList: !1, + Debug: !1, + defaultStatus: !1, + defaultstatus: !1, + DelayNode: !1, + DeviceMotionEvent: !1, + DeviceOrientationEvent: !1, + devicePixelRatio: !1, + dispatchEvent: !1, + document: !1, + Document: !1, + DocumentFragment: !1, + DocumentType: !1, + DOMError: !1, + DOMException: !1, + DOMImplementation: !1, + DOMParser: !1, + DOMSettableTokenList: !1, + DOMStringList: !1, + DOMStringMap: !1, + DOMTokenList: !1, + DragEvent: !1, + DynamicsCompressorNode: !1, + Element: !1, + ElementTimeControl: !1, + ErrorEvent: !1, + event: !1, + Event: !1, + EventSource: !1, + EventTarget: !1, + external: !1, + fetch: !1, + File: !1, + FileError: !1, + FileList: !1, + FileReader: !1, + find: !1, + focus: !1, + FocusEvent: !1, + FontFace: !1, + FormData: !1, + frameElement: !1, + frames: !1, + GainNode: !1, + Gamepad: !1, + GamepadButton: !1, + GamepadEvent: !1, + getComputedStyle: !1, + getSelection: !1, + HashChangeEvent: !1, + Headers: !1, + history: !1, + History: !1, + HTMLAllCollection: !1, + HTMLAnchorElement: !1, + HTMLAppletElement: !1, + HTMLAreaElement: !1, + HTMLAudioElement: !1, + HTMLBaseElement: !1, + HTMLBlockquoteElement: !1, + HTMLBodyElement: !1, + HTMLBRElement: !1, + HTMLButtonElement: !1, + HTMLCanvasElement: !1, + HTMLCollection: !1, + HTMLContentElement: !1, + HTMLDataListElement: !1, + HTMLDetailsElement: !1, + HTMLDialogElement: !1, + HTMLDirectoryElement: !1, + HTMLDivElement: !1, + HTMLDListElement: !1, + HTMLDocument: !1, + HTMLElement: !1, + HTMLEmbedElement: !1, + HTMLFieldSetElement: !1, + HTMLFontElement: !1, + HTMLFormControlsCollection: !1, + HTMLFormElement: !1, + HTMLFrameElement: !1, + HTMLFrameSetElement: !1, + HTMLHeadElement: !1, + HTMLHeadingElement: !1, + HTMLHRElement: !1, + HTMLHtmlElement: !1, + HTMLIFrameElement: !1, + HTMLImageElement: !1, + HTMLInputElement: !1, + HTMLIsIndexElement: !1, + HTMLKeygenElement: !1, + HTMLLabelElement: !1, + HTMLLayerElement: !1, + HTMLLegendElement: !1, + HTMLLIElement: !1, + HTMLLinkElement: !1, + HTMLMapElement: !1, + HTMLMarqueeElement: !1, + HTMLMediaElement: !1, + HTMLMenuElement: !1, + HTMLMetaElement: !1, + HTMLMeterElement: !1, + HTMLModElement: !1, + HTMLObjectElement: !1, + HTMLOListElement: !1, + HTMLOptGroupElement: !1, + HTMLOptionElement: !1, + HTMLOptionsCollection: !1, + HTMLOutputElement: !1, + HTMLParagraphElement: !1, + HTMLParamElement: !1, + HTMLPictureElement: !1, + HTMLPreElement: !1, + HTMLProgressElement: !1, + HTMLQuoteElement: !1, + HTMLScriptElement: !1, + HTMLSelectElement: !1, + HTMLShadowElement: !1, + HTMLSourceElement: !1, + HTMLSpanElement: !1, + HTMLStyleElement: !1, + HTMLTableCaptionElement: !1, + HTMLTableCellElement: !1, + HTMLTableColElement: !1, + HTMLTableElement: !1, + HTMLTableRowElement: !1, + HTMLTableSectionElement: !1, + HTMLTemplateElement: !1, + HTMLTextAreaElement: !1, + HTMLTitleElement: !1, + HTMLTrackElement: !1, + HTMLUListElement: !1, + HTMLUnknownElement: !1, + HTMLVideoElement: !1, + IDBCursor: !1, + IDBCursorWithValue: !1, + IDBDatabase: !1, + IDBEnvironment: !1, + IDBFactory: !1, + IDBIndex: !1, + IDBKeyRange: !1, + IDBObjectStore: !1, + IDBOpenDBRequest: !1, + IDBRequest: !1, + IDBTransaction: !1, + IDBVersionChangeEvent: !1, + Image: !1, + ImageBitmap: !1, + ImageData: !1, + indexedDB: !1, + innerHeight: !1, + innerWidth: !1, + InputEvent: !1, + InputMethodContext: !1, + Intl: !1, + KeyboardEvent: !1, + length: !1, + localStorage: !1, + location: !1, + Location: !1, + locationbar: !1, + matchMedia: !1, + MediaElementAudioSourceNode: !1, + MediaEncryptedEvent: !1, + MediaError: !1, + MediaKeyError: !1, + MediaKeyEvent: !1, + MediaKeyMessageEvent: !1, + MediaKeys: !1, + MediaKeySession: !1, + MediaKeyStatusMap: !1, + MediaKeySystemAccess: !1, + MediaList: !1, + MediaQueryList: !1, + MediaQueryListEvent: !1, + MediaSource: !1, + MediaStreamAudioDestinationNode: !1, + MediaStreamAudioSourceNode: !1, + MediaStreamEvent: !1, + MediaStreamTrack: !1, + menubar: !1, + MessageChannel: !1, + MessageEvent: !1, + MessagePort: !1, + MIDIAccess: !1, + MIDIConnectionEvent: !1, + MIDIInput: !1, + MIDIInputMap: !1, + MIDIMessageEvent: !1, + MIDIOutput: !1, + MIDIOutputMap: !1, + MIDIPort: !1, + MimeType: !1, + MimeTypeArray: !1, + MouseEvent: !1, + moveBy: !1, + moveTo: !1, + MutationEvent: !1, + MutationObserver: !1, + MutationRecord: !1, + name: !1, + NamedNodeMap: !1, + navigator: !1, + Navigator: !1, + Node: !1, + NodeFilter: !1, + NodeIterator: !1, + NodeList: !1, + Notification: !1, + OfflineAudioCompletionEvent: !1, + OfflineAudioContext: !1, + offscreenBuffering: !1, + onbeforeunload: !0, + onblur: !0, + onerror: !0, + onfocus: !0, + onload: !0, + onresize: !0, + onunload: !0, + open: !1, + openDatabase: !1, + opener: !1, + opera: !1, + Option: !1, + OscillatorNode: !1, + outerHeight: !1, + outerWidth: !1, + PageTransitionEvent: !1, + pageXOffset: !1, + pageYOffset: !1, + parent: !1, + Path2D: !1, + performance: !1, + Performance: !1, + PerformanceEntry: !1, + PerformanceMark: !1, + PerformanceMeasure: !1, + PerformanceNavigation: !1, + PerformanceResourceTiming: !1, + PerformanceTiming: !1, + PeriodicWave: !1, + Permissions: !1, + PermissionStatus: !1, + personalbar: !1, + Plugin: !1, + PluginArray: !1, + PopStateEvent: !1, + postMessage: !1, + print: !1, + ProcessingInstruction: !1, + ProgressEvent: !1, + prompt: !1, + PushManager: !1, + PushSubscription: !1, + RadioNodeList: !1, + Range: !1, + ReadableByteStream: !1, + ReadableStream: !1, + removeEventListener: !1, + Request: !1, + requestAnimationFrame: !1, + resizeBy: !1, + resizeTo: !1, + Response: !1, + RTCIceCandidate: !1, + RTCSessionDescription: !1, + screen: !1, + Screen: !1, + screenLeft: !1, + ScreenOrientation: !1, + screenTop: !1, + screenX: !1, + screenY: !1, + ScriptProcessorNode: !1, + scroll: !1, + scrollbars: !1, + scrollBy: !1, + scrollTo: !1, + scrollX: !1, + scrollY: !1, + SecurityPolicyViolationEvent: !1, + Selection: !1, + self: !1, + ServiceWorker: !1, + ServiceWorkerContainer: !1, + ServiceWorkerRegistration: !1, + sessionStorage: !1, + setInterval: !1, + setTimeout: !1, + ShadowRoot: !1, + SharedWorker: !1, + showModalDialog: !1, + speechSynthesis: !1, + SpeechSynthesisEvent: !1, + SpeechSynthesisUtterance: !1, + status: !1, + statusbar: !1, + stop: !1, + Storage: !1, + StorageEvent: !1, + styleMedia: !1, + StyleSheet: !1, + StyleSheetList: !1, + SubtleCrypto: !1, + SVGAElement: !1, + SVGAltGlyphDefElement: !1, + SVGAltGlyphElement: !1, + SVGAltGlyphItemElement: !1, + SVGAngle: !1, + SVGAnimateColorElement: !1, + SVGAnimatedAngle: !1, + SVGAnimatedBoolean: !1, + SVGAnimatedEnumeration: !1, + SVGAnimatedInteger: !1, + SVGAnimatedLength: !1, + SVGAnimatedLengthList: !1, + SVGAnimatedNumber: !1, + SVGAnimatedNumberList: !1, + SVGAnimatedPathData: !1, + SVGAnimatedPoints: !1, + SVGAnimatedPreserveAspectRatio: !1, + SVGAnimatedRect: !1, + SVGAnimatedString: !1, + SVGAnimatedTransformList: !1, + SVGAnimateElement: !1, + SVGAnimateMotionElement: !1, + SVGAnimateTransformElement: !1, + SVGAnimationElement: !1, + SVGCircleElement: !1, + SVGClipPathElement: !1, + SVGColor: !1, + SVGColorProfileElement: !1, + SVGColorProfileRule: !1, + SVGComponentTransferFunctionElement: !1, + SVGCSSRule: !1, + SVGCursorElement: !1, + SVGDefsElement: !1, + SVGDescElement: !1, + SVGDiscardElement: !1, + SVGDocument: !1, + SVGElement: !1, + SVGElementInstance: !1, + SVGElementInstanceList: !1, + SVGEllipseElement: !1, + SVGEvent: !1, + SVGExternalResourcesRequired: !1, + SVGFEBlendElement: !1, + SVGFEColorMatrixElement: !1, + SVGFEComponentTransferElement: !1, + SVGFECompositeElement: !1, + SVGFEConvolveMatrixElement: !1, + SVGFEDiffuseLightingElement: !1, + SVGFEDisplacementMapElement: !1, + SVGFEDistantLightElement: !1, + SVGFEDropShadowElement: !1, + SVGFEFloodElement: !1, + SVGFEFuncAElement: !1, + SVGFEFuncBElement: !1, + SVGFEFuncGElement: !1, + SVGFEFuncRElement: !1, + SVGFEGaussianBlurElement: !1, + SVGFEImageElement: !1, + SVGFEMergeElement: !1, + SVGFEMergeNodeElement: !1, + SVGFEMorphologyElement: !1, + SVGFEOffsetElement: !1, + SVGFEPointLightElement: !1, + SVGFESpecularLightingElement: !1, + SVGFESpotLightElement: !1, + SVGFETileElement: !1, + SVGFETurbulenceElement: !1, + SVGFilterElement: !1, + SVGFilterPrimitiveStandardAttributes: !1, + SVGFitToViewBox: !1, + SVGFontElement: !1, + SVGFontFaceElement: !1, + SVGFontFaceFormatElement: !1, + SVGFontFaceNameElement: !1, + SVGFontFaceSrcElement: !1, + SVGFontFaceUriElement: !1, + SVGForeignObjectElement: !1, + SVGGElement: !1, + SVGGeometryElement: !1, + SVGGlyphElement: !1, + SVGGlyphRefElement: !1, + SVGGradientElement: !1, + SVGGraphicsElement: !1, + SVGHKernElement: !1, + SVGICCColor: !1, + SVGImageElement: !1, + SVGLangSpace: !1, + SVGLength: !1, + SVGLengthList: !1, + SVGLinearGradientElement: !1, + SVGLineElement: !1, + SVGLocatable: !1, + SVGMarkerElement: !1, + SVGMaskElement: !1, + SVGMatrix: !1, + SVGMetadataElement: !1, + SVGMissingGlyphElement: !1, + SVGMPathElement: !1, + SVGNumber: !1, + SVGNumberList: !1, + SVGPaint: !1, + SVGPathElement: !1, + SVGPathSeg: !1, + SVGPathSegArcAbs: !1, + SVGPathSegArcRel: !1, + SVGPathSegClosePath: !1, + SVGPathSegCurvetoCubicAbs: !1, + SVGPathSegCurvetoCubicRel: !1, + SVGPathSegCurvetoCubicSmoothAbs: !1, + SVGPathSegCurvetoCubicSmoothRel: !1, + SVGPathSegCurvetoQuadraticAbs: !1, + SVGPathSegCurvetoQuadraticRel: !1, + SVGPathSegCurvetoQuadraticSmoothAbs: !1, + SVGPathSegCurvetoQuadraticSmoothRel: !1, + SVGPathSegLinetoAbs: !1, + SVGPathSegLinetoHorizontalAbs: !1, + SVGPathSegLinetoHorizontalRel: !1, + SVGPathSegLinetoRel: !1, + SVGPathSegLinetoVerticalAbs: !1, + SVGPathSegLinetoVerticalRel: !1, + SVGPathSegList: !1, + SVGPathSegMovetoAbs: !1, + SVGPathSegMovetoRel: !1, + SVGPatternElement: !1, + SVGPoint: !1, + SVGPointList: !1, + SVGPolygonElement: !1, + SVGPolylineElement: !1, + SVGPreserveAspectRatio: !1, + SVGRadialGradientElement: !1, + SVGRect: !1, + SVGRectElement: !1, + SVGRenderingIntent: !1, + SVGScriptElement: !1, + SVGSetElement: !1, + SVGStopElement: !1, + SVGStringList: !1, + SVGStylable: !1, + SVGStyleElement: !1, + SVGSVGElement: !1, + SVGSwitchElement: !1, + SVGSymbolElement: !1, + SVGTests: !1, + SVGTextContentElement: !1, + SVGTextElement: !1, + SVGTextPathElement: !1, + SVGTextPositioningElement: !1, + SVGTitleElement: !1, + SVGTransform: !1, + SVGTransformable: !1, + SVGTransformList: !1, + SVGTRefElement: !1, + SVGTSpanElement: !1, + SVGUnitTypes: !1, + SVGURIReference: !1, + SVGUseElement: !1, + SVGViewElement: !1, + SVGViewSpec: !1, + SVGVKernElement: !1, + SVGZoomAndPan: !1, + SVGZoomEvent: !1, + Text: !1, + TextDecoder: !1, + TextEncoder: !1, + TextEvent: !1, + TextMetrics: !1, + TextTrack: !1, + TextTrackCue: !1, + TextTrackCueList: !1, + TextTrackList: !1, + TimeEvent: !1, + TimeRanges: !1, + toolbar: !1, + top: !1, + Touch: !1, + TouchEvent: !1, + TouchList: !1, + TrackEvent: !1, + TransitionEvent: !1, + TreeWalker: !1, + UIEvent: !1, + URL: !1, + ValidityState: !1, + VTTCue: !1, + WaveShaperNode: !1, + WebGLActiveInfo: !1, + WebGLBuffer: !1, + WebGLContextEvent: !1, + WebGLFramebuffer: !1, + WebGLProgram: !1, + WebGLRenderbuffer: !1, + WebGLRenderingContext: !1, + WebGLShader: !1, + WebGLShaderPrecisionFormat: !1, + WebGLTexture: !1, + WebGLUniformLocation: !1, + WebSocket: !1, + WheelEvent: !1, + window: !1, + Window: !1, + Worker: !1, + XDomainRequest: !1, + XMLDocument: !1, + XMLHttpRequest: !1, + XMLHttpRequestEventTarget: !1, + XMLHttpRequestProgressEvent: !1, + XMLHttpRequestUpload: !1, + XMLSerializer: !1, + XPathEvaluator: !1, + XPathException: !1, + XPathExpression: !1, + XPathNamespace: !1, + XPathNSResolver: !1, + XPathResult: !1, + XSLTProcessor: !1 + }, + worker: { + applicationCache: !1, + atob: !1, + Blob: !1, + BroadcastChannel: !1, + btoa: !1, + Cache: !1, + caches: !1, + clearInterval: !1, + clearTimeout: !1, + close: !0, + console: !1, + fetch: !1, + FileReaderSync: !1, + FormData: !1, + Headers: !1, + IDBCursor: !1, + IDBCursorWithValue: !1, + IDBDatabase: !1, + IDBFactory: !1, + IDBIndex: !1, + IDBKeyRange: !1, + IDBObjectStore: !1, + IDBOpenDBRequest: !1, + IDBRequest: !1, + IDBTransaction: !1, + IDBVersionChangeEvent: !1, + ImageData: !1, + importScripts: !0, + indexedDB: !1, + location: !1, + MessageChannel: !1, + MessagePort: !1, + name: !1, + navigator: !1, + Notification: !1, + onclose: !0, + onconnect: !0, + onerror: !0, + onlanguagechange: !0, + onmessage: !0, + onoffline: !0, + ononline: !0, + onrejectionhandled: !0, + onunhandledrejection: !0, + performance: !1, + Performance: !1, + PerformanceEntry: !1, + PerformanceMark: !1, + PerformanceMeasure: !1, + PerformanceNavigation: !1, + PerformanceResourceTiming: !1, + PerformanceTiming: !1, + postMessage: !0, + Promise: !1, + Request: !1, + Response: !1, + self: !0, + ServiceWorkerRegistration: !1, + setInterval: !1, + setTimeout: !1, + TextDecoder: !1, + TextEncoder: !1, + URL: !1, + WebSocket: !1, + Worker: !1, + XMLHttpRequest: !1 + }, + node: { + __dirname: !1, + __filename: !1, + arguments: !1, + Buffer: !1, + clearImmediate: !1, + clearInterval: !1, + clearTimeout: !1, + console: !1, + exports: !0, + GLOBAL: !1, + global: !1, + module: !1, + process: !1, + require: !1, + root: !1, + setImmediate: !1, + setInterval: !1, + setTimeout: !1 + }, + commonjs: { exports: !0, module: !1, require: !1, global: !1 }, + amd: { define: !1, require: !1 }, + mocha: { + after: !1, + afterEach: !1, + before: !1, + beforeEach: !1, + context: !1, + describe: !1, + it: !1, + mocha: !1, + setup: !1, + specify: !1, + suite: !1, + suiteSetup: !1, + suiteTeardown: !1, + teardown: !1, + test: !1, + xcontext: !1, + xdescribe: !1, + xit: !1, + xspecify: !1 + }, + jasmine: { + afterAll: !1, + afterEach: !1, + beforeAll: !1, + beforeEach: !1, + describe: !1, + expect: !1, + fail: !1, + fdescribe: !1, + fit: !1, + it: !1, + jasmine: !1, + pending: !1, + runs: !1, + spyOn: !1, + waits: !1, + waitsFor: !1, + xdescribe: !1, + xit: !1 + }, + jest: { + afterEach: !1, + beforeEach: !1, + describe: !1, + expect: !1, + it: !1, + jest: !1, + pit: !1, + require: !1, + xdescribe: !1, + xit: !1 + }, + qunit: { + asyncTest: !1, + deepEqual: !1, + equal: !1, + expect: !1, + module: !1, + notDeepEqual: !1, + notEqual: !1, + notOk: !1, + notPropEqual: !1, + notStrictEqual: !1, + ok: !1, + propEqual: !1, + QUnit: !1, + raises: !1, + start: !1, + stop: !1, + strictEqual: !1, + test: !1, + throws: !1 + }, + phantomjs: { console: !0, exports: !0, phantom: !0, require: !0, WebPage: !0 }, + couch: { + emit: !1, + exports: !1, + getRow: !1, + log: !1, + module: !1, + provides: !1, + require: !1, + respond: !1, + send: !1, + start: !1, + sum: !1 + }, + rhino: { + defineClass: !1, + deserialize: !1, + gc: !1, + help: !1, + importClass: !1, + importPackage: !1, + java: !1, + load: !1, + loadClass: !1, + Packages: !1, + print: !1, + quit: !1, + readFile: !1, + readUrl: !1, + runCommand: !1, + seal: !1, + serialize: !1, + spawn: !1, + sync: !1, + toint32: !1, + version: !1 + }, + nashorn: { + __DIR__: !1, + __FILE__: !1, + __LINE__: !1, + com: !1, + edu: !1, + exit: !1, + Java: !1, + java: !1, + javafx: !1, + JavaImporter: !1, + javax: !1, + JSAdapter: !1, + load: !1, + loadWithNewGlobal: !1, + org: !1, + Packages: !1, + print: !1, + quit: !1 + }, + wsh: { + ActiveXObject: !0, + Enumerator: !0, + GetObject: !0, + ScriptEngine: !0, + ScriptEngineBuildVersion: !0, + ScriptEngineMajorVersion: !0, + ScriptEngineMinorVersion: !0, + VBArray: !0, + WScript: !0, + WSH: !0, + XDomainRequest: !0 + }, + jquery: { $: !1, jQuery: !1 }, + yui: { Y: !1, YUI: !1, YUI_config: !1 }, + shelljs: { + cat: !1, + cd: !1, + chmod: !1, + config: !1, + cp: !1, + dirs: !1, + echo: !1, + env: !1, + error: !1, + exec: !1, + exit: !1, + find: !1, + grep: !1, + ls: !1, + ln: !1, + mkdir: !1, + mv: !1, + popd: !1, + pushd: !1, + pwd: !1, + rm: !1, + sed: !1, + target: !1, + tempdir: !1, + test: !1, + which: !1 + }, + prototypejs: { + $: !1, + $$: !1, + $A: !1, + $break: !1, + $continue: !1, + $F: !1, + $H: !1, + $R: !1, + $w: !1, + Abstract: !1, + Ajax: !1, + Autocompleter: !1, + Builder: !1, + Class: !1, + Control: !1, + Draggable: !1, + Draggables: !1, + Droppables: !1, + Effect: !1, + Element: !1, + Enumerable: !1, + Event: !1, + Field: !1, + Form: !1, + Hash: !1, + Insertion: !1, + ObjectRange: !1, + PeriodicalExecuter: !1, + Position: !1, + Prototype: !1, + Scriptaculous: !1, + Selector: !1, + Sortable: !1, + SortableObserver: !1, + Sound: !1, + Template: !1, + Toggle: !1, + Try: !1 + }, + meteor: { + $: !1, + _: !1, + Accounts: !1, + App: !1, + Assets: !1, + Blaze: !1, + check: !1, + Cordova: !1, + DDP: !1, + DDPServer: !1, + Deps: !1, + EJSON: !1, + Email: !1, + HTTP: !1, + Log: !1, + Match: !1, + Meteor: !1, + Mongo: !1, + MongoInternals: !1, + Npm: !1, + Package: !1, + Plugin: !1, + process: !1, + Random: !1, + ReactiveDict: !1, + ReactiveVar: !1, + Router: !1, + Session: !1, + share: !1, + Spacebars: !1, + Template: !1, + Tinytest: !1, + Tracker: !1, + UI: !1, + Utils: !1, + WebApp: !1, + WebAppInternals: !1 + }, + mongo: { + _isWindows: !1, + _rand: !1, + BulkWriteResult: !1, + cat: !1, + cd: !1, + connect: !1, + db: !1, + getHostName: !1, + getMemInfo: !1, + hostname: !1, + listFiles: !1, + load: !1, + ls: !1, + md5sumFile: !1, + mkdir: !1, + Mongo: !1, + ObjectId: !1, + PlanCache: !1, + print: !1, + printjson: !1, + pwd: !1, + quit: !1, + removeFile: !1, + rs: !1, + sh: !1, + UUID: !1, + version: !1, + WriteResult: !1 + }, + applescript: { + $: !1, + Application: !1, + Automation: !1, + console: !1, + delay: !1, + Library: !1, + ObjC: !1, + ObjectSpecifier: !1, + Path: !1, + Progress: !1, + Ref: !1 + }, + serviceworker: { + caches: !1, + Cache: !1, + CacheStorage: !1, + Client: !1, + clients: !1, + Clients: !1, + ExtendableEvent: !1, + ExtendableMessageEvent: !1, + FetchEvent: !1, + importScripts: !1, + registration: !1, + self: !1, + ServiceWorker: !1, + ServiceWorkerContainer: !1, + ServiceWorkerGlobalScope: !1, + ServiceWorkerMessageEvent: !1, + ServiceWorkerRegistration: !1, + skipWaiting: !1, + WindowClient: !1 + }, + atomtest: { + advanceClock: !1, + fakeClearInterval: !1, + fakeClearTimeout: !1, + fakeSetInterval: !1, + fakeSetTimeout: !1, + resetTimeouts: !1, + waitsForPromise: !1 + }, + embertest: { + andThen: !1, + click: !1, + currentPath: !1, + currentRouteName: !1, + currentURL: !1, + fillIn: !1, + find: !1, + findWithAssert: !1, + keyEvent: !1, + pauseTest: !1, + triggerEvent: !1, + visit: !1 + }, + protractor: { + $: !1, + $$: !1, + browser: !1, + By: !1, + by: !1, + DartObject: !1, + element: !1, + protractor: !1 + }, + "shared-node-browser": { + clearInterval: !1, + clearTimeout: !1, + console: !1, + setInterval: !1, + setTimeout: !1 + }, + webextensions: { browser: !1, chrome: !1, opr: !1 }, + greasemonkey: { + GM_addStyle: !1, + GM_deleteValue: !1, + GM_getResourceText: !1, + GM_getResourceURL: !1, + GM_getValue: !1, + GM_info: !1, + GM_listValues: !1, + GM_log: !1, + GM_openInTab: !1, + GM_registerMenuCommand: !1, + GM_setClipboard: !1, + GM_setValue: !1, + GM_xmlhttpRequest: !1, + unsafeWindow: !1 + } + } + }, + function(e, t) { + e.exports = { + name: "babel-core", + version: "6.6.5", + description: "Babel compiler core.", + author: { name: "Sebastian McKenzie", email: "sebmck@gmail.com" }, + homepage: "https://babeljs.io/", + license: "MIT", + repository: { + type: "git", + url: "https://github.com/babel/babel/tree/master/packages/babel-core" + }, + keywords: [ + "6to5", + "babel", + "classes", + "const", + "es6", + "harmony", + "let", + "modules", + "transpile", + "transpiler", + "var" + ], + scripts: { bench: "make bench", test: "make test" }, + dependencies: { + "babel-code-frame": "^6.6.5", + "babel-generator": "^6.6.5", + "babel-helpers": "^6.6.0", + "babel-messages": "^6.6.5", + "babel-template": "^6.6.5", + "babel-runtime": "^5.0.0", + "babel-register": "^6.6.5", + "babel-traverse": "^6.6.5", + "babel-types": "^6.6.5", + babylon: "^6.6.5", + "convert-source-map": "^1.1.0", + debug: "^2.1.1", + json5: "^0.4.0", + lodash: "^3.10.0", + minimatch: "^2.0.3", + "path-exists": "^1.0.0", + "path-is-absolute": "^1.0.0", + private: "^0.1.6", + "shebang-regex": "^1.0.0", + slash: "^1.0.0", + "source-map": "^0.5.0" + }, + devDependencies: { + "babel-helper-fixtures": "^6.6.5", + "babel-helper-transform-fixture-test-runner": "^6.6.5", + "babel-polyfill": "^6.6.0" + }, + _id: "babel-core@6.6.5", + _shasum: "e94607e1a4d53d53609862e38690fa78709de96c", + _from: "babel-core@>=6.4.5 <7.0.0", + _npmVersion: "3.6.0", + _nodeVersion: "5.1.0", + _npmUser: { name: "hzoo", email: "hi@henryzoo.com" }, + dist: { + shasum: "e94607e1a4d53d53609862e38690fa78709de96c", + tarball: "http://registry.npmjs.org/babel-core/-/babel-core-6.6.5.tgz" + }, + maintainers: [ + { name: "amasad", email: "amjad.masad@gmail.com" }, + { name: "hzoo", email: "hi@henryzoo.com" }, + { name: "jmm", email: "npm-public@jessemccarthy.net" }, + { name: "loganfsmyth", email: "loganfsmyth@gmail.com" }, + { name: "sebmck", email: "sebmck@gmail.com" }, + { name: "thejameskyle", email: "me@thejameskyle.com" } + ], + _npmOperationalInternal: { + host: "packages-13-west.internal.npmjs.com", + tmp: "tmp/babel-core-6.6.5.tgz_1457133380701_0.5239949987735599" + }, + directories: {}, + _resolved: "https://registry.npmjs.org/babel-core/-/babel-core-6.6.5.tgz" + } + }, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + function(e, t) { + e.exports = { + 75: 8490, + 83: 383, + 107: 8490, + 115: 383, + 181: 924, + 197: 8491, + 383: 83, + 452: 453, + 453: 452, + 455: 456, + 456: 455, + 458: 459, + 459: 458, + 497: 498, + 498: 497, + 837: 8126, + 914: 976, + 917: 1013, + 920: 1012, + 921: 8126, + 922: 1008, + 924: 181, + 928: 982, + 929: 1009, + 931: 962, + 934: 981, + 937: 8486, + 962: 931, + 976: 914, + 977: 1012, + 981: 934, + 982: 928, + 1008: 922, + 1009: 929, + 1012: [920, 977], + 1013: 917, + 7776: 7835, + 7835: 7776, + 8126: [837, 921], + 8486: 937, + 8490: 75, + 8491: 197, + 66560: 66600, + 66561: 66601, + 66562: 66602, + 66563: 66603, + 66564: 66604, + 66565: 66605, + 66566: 66606, + 66567: 66607, + 66568: 66608, + 66569: 66609, + 66570: 66610, + 66571: 66611, + 66572: 66612, + 66573: 66613, + 66574: 66614, + 66575: 66615, + 66576: 66616, + 66577: 66617, + 66578: 66618, + 66579: 66619, + 66580: 66620, + 66581: 66621, + 66582: 66622, + 66583: 66623, + 66584: 66624, + 66585: 66625, + 66586: 66626, + 66587: 66627, + 66588: 66628, + 66589: 66629, + 66590: 66630, + 66591: 66631, + 66592: 66632, + 66593: 66633, + 66594: 66634, + 66595: 66635, + 66596: 66636, + 66597: 66637, + 66598: 66638, + 66599: 66639, + 66600: 66560, + 66601: 66561, + 66602: 66562, + 66603: 66563, + 66604: 66564, + 66605: 66565, + 66606: 66566, + 66607: 66567, + 66608: 66568, + 66609: 66569, + 66610: 66570, + 66611: 66571, + 66612: 66572, + 66613: 66573, + 66614: 66574, + 66615: 66575, + 66616: 66576, + 66617: 66577, + 66618: 66578, + 66619: 66579, + 66620: 66580, + 66621: 66581, + 66622: 66582, + 66623: 66583, + 66624: 66584, + 66625: 66585, + 66626: 66586, + 66627: 66587, + 66628: 66588, + 66629: 66589, + 66630: 66590, + 66631: 66591, + 66632: 66592, + 66633: 66593, + 66634: 66594, + 66635: 66595, + 66636: 66596, + 66637: 66597, + 66638: 66598, + 66639: 66599, + 68736: 68800, + 68737: 68801, + 68738: 68802, + 68739: 68803, + 68740: 68804, + 68741: 68805, + 68742: 68806, + 68743: 68807, + 68744: 68808, + 68745: 68809, + 68746: 68810, + 68747: 68811, + 68748: 68812, + 68749: 68813, + 68750: 68814, + 68751: 68815, + 68752: 68816, + 68753: 68817, + 68754: 68818, + 68755: 68819, + 68756: 68820, + 68757: 68821, + 68758: 68822, + 68759: 68823, + 68760: 68824, + 68761: 68825, + 68762: 68826, + 68763: 68827, + 68764: 68828, + 68765: 68829, + 68766: 68830, + 68767: 68831, + 68768: 68832, + 68769: 68833, + 68770: 68834, + 68771: 68835, + 68772: 68836, + 68773: 68837, + 68774: 68838, + 68775: 68839, + 68776: 68840, + 68777: 68841, + 68778: 68842, + 68779: 68843, + 68780: 68844, + 68781: 68845, + 68782: 68846, + 68783: 68847, + 68784: 68848, + 68785: 68849, + 68786: 68850, + 68800: 68736, + 68801: 68737, + 68802: 68738, + 68803: 68739, + 68804: 68740, + 68805: 68741, + 68806: 68742, + 68807: 68743, + 68808: 68744, + 68809: 68745, + 68810: 68746, + 68811: 68747, + 68812: 68748, + 68813: 68749, + 68814: 68750, + 68815: 68751, + 68816: 68752, + 68817: 68753, + 68818: 68754, + 68819: 68755, + 68820: 68756, + 68821: 68757, + 68822: 68758, + 68823: 68759, + 68824: 68760, + 68825: 68761, + 68826: 68762, + 68827: 68763, + 68828: 68764, + 68829: 68765, + 68830: 68766, + 68831: 68767, + 68832: 68768, + 68833: 68769, + 68834: 68770, + 68835: 68771, + 68836: 68772, + 68837: 68773, + 68838: 68774, + 68839: 68775, + 68840: 68776, + 68841: 68777, + 68842: 68778, + 68843: 68779, + 68844: 68780, + 68845: 68781, + 68846: 68782, + 68847: 68783, + 68848: 68784, + 68849: 68785, + 68850: 68786, + 71840: 71872, + 71841: 71873, + 71842: 71874, + 71843: 71875, + 71844: 71876, + 71845: 71877, + 71846: 71878, + 71847: 71879, + 71848: 71880, + 71849: 71881, + 71850: 71882, + 71851: 71883, + 71852: 71884, + 71853: 71885, + 71854: 71886, + 71855: 71887, + 71856: 71888, + 71857: 71889, + 71858: 71890, + 71859: 71891, + 71860: 71892, + 71861: 71893, + 71862: 71894, + 71863: 71895, + 71864: 71896, + 71865: 71897, + 71866: 71898, + 71867: 71899, + 71868: 71900, + 71869: 71901, + 71870: 71902, + 71871: 71903, + 71872: 71840, + 71873: 71841, + 71874: 71842, + 71875: 71843, + 71876: 71844, + 71877: 71845, + 71878: 71846, + 71879: 71847, + 71880: 71848, + 71881: 71849, + 71882: 71850, + 71883: 71851, + 71884: 71852, + 71885: 71853, + 71886: 71854, + 71887: 71855, + 71888: 71856, + 71889: 71857, + 71890: 71858, + 71891: 71859, + 71892: 71860, + 71893: 71861, + 71894: 71862, + 71895: 71863, + 71896: 71864, + 71897: 71865, + 71898: 71866, + 71899: 71867, + 71900: 71868, + 71901: 71869, + 71902: 71870, + 71903: 71871 + } + }, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + 7278, + function(e, t, r) { + var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/" + !(function(e) { + "use strict" + function t(e) { + var t = e.charCodeAt(0) + return t === a || t === p + ? 62 + : t === o || t === f + ? 63 + : u > t + ? -1 + : u + 10 > t + ? t - u + 26 + 26 + : c + 26 > t + ? t - c + : l + 26 > t + ? t - l + 26 + : void 0 + } + function r(e) { + function r(e) { + l[p++] = e + } + var n, i, a, o, u, l + if (e.length % 4 > 0) + throw new Error("Invalid string. Length must be a multiple of 4") + var c = e.length + ;(u = "=" === e.charAt(c - 2) ? 2 : "=" === e.charAt(c - 1) ? 1 : 0), + (l = new s((3 * e.length) / 4 - u)), + (a = u > 0 ? e.length - 4 : e.length) + var p = 0 + for (n = 0, i = 0; a > n; n += 4, i += 3) + (o = + (t(e.charAt(n)) << 18) | + (t(e.charAt(n + 1)) << 12) | + (t(e.charAt(n + 2)) << 6) | + t(e.charAt(n + 3))), + r((16711680 & o) >> 16), + r((65280 & o) >> 8), + r(255 & o) + return ( + 2 === u + ? ((o = (t(e.charAt(n)) << 2) | (t(e.charAt(n + 1)) >> 4)), + r(255 & o)) + : 1 === u && + ((o = + (t(e.charAt(n)) << 10) | + (t(e.charAt(n + 1)) << 4) | + (t(e.charAt(n + 2)) >> 2)), + r((o >> 8) & 255), + r(255 & o)), + l + ) + } + function i(e) { + function t(e) { + return n.charAt(e) + } + function r(e) { + return ( + t((e >> 18) & 63) + t((e >> 12) & 63) + t((e >> 6) & 63) + t(63 & e) + ) + } + var i, + s, + a, + o = e.length % 3, + u = "" + for (i = 0, a = e.length - o; a > i; i += 3) + (s = (e[i] << 16) + (e[i + 1] << 8) + e[i + 2]), (u += r(s)) + switch (o) { + case 1: + ;(s = e[e.length - 1]), + (u += t(s >> 2)), + (u += t((s << 4) & 63)), + (u += "==") + break + case 2: + ;(s = (e[e.length - 2] << 8) + e[e.length - 1]), + (u += t(s >> 10)), + (u += t((s >> 4) & 63)), + (u += t((s << 2) & 63)), + (u += "=") + } + return u + } + var s = "undefined" != typeof Uint8Array ? Uint8Array : Array, + a = "+".charCodeAt(0), + o = "/".charCodeAt(0), + u = "0".charCodeAt(0), + l = "a".charCodeAt(0), + c = "A".charCodeAt(0), + p = "-".charCodeAt(0), + f = "_".charCodeAt(0) + ;(e.toByteArray = r), (e.fromByteArray = i) + })(t) + }, + function(e, t) { + ;(t.read = function(e, t, r, n, i) { + var s, + a, + o = 8 * i - n - 1, + u = (1 << o) - 1, + l = u >> 1, + c = -7, + p = r ? i - 1 : 0, + f = r ? -1 : 1, + h = e[t + p] + for ( + p += f, s = h & ((1 << -c) - 1), h >>= -c, c += o; + c > 0; + s = 256 * s + e[t + p], p += f, c -= 8 + ); + for ( + a = s & ((1 << -c) - 1), s >>= -c, c += n; + c > 0; + a = 256 * a + e[t + p], p += f, c -= 8 + ); + if (0 === s) s = 1 - l + else { + if (s === u) return a ? NaN : (h ? -1 : 1) * (1 / 0) + ;(a += Math.pow(2, n)), (s -= l) + } + return (h ? -1 : 1) * a * Math.pow(2, s - n) + }), + (t.write = function(e, t, r, n, i, s) { + var a, + o, + u, + l = 8 * s - i - 1, + c = (1 << l) - 1, + p = c >> 1, + f = 23 === i ? Math.pow(2, -24) - Math.pow(2, -77) : 0, + h = n ? 0 : s - 1, + d = n ? 1 : -1, + m = 0 > t || (0 === t && 0 > 1 / t) ? 1 : 0 + for ( + t = Math.abs(t), + isNaN(t) || t === 1 / 0 + ? ((o = isNaN(t) ? 1 : 0), (a = c)) + : ((a = Math.floor(Math.log(t) / Math.LN2)), + t * (u = Math.pow(2, -a)) < 1 && (a--, (u *= 2)), + (t += a + p >= 1 ? f / u : f * Math.pow(2, 1 - p)), + t * u >= 2 && (a++, (u /= 2)), + a + p >= c + ? ((o = 0), (a = c)) + : a + p >= 1 + ? ((o = (t * u - 1) * Math.pow(2, i)), (a += p)) + : ((o = t * Math.pow(2, p - 1) * Math.pow(2, i)), + (a = 0))); + i >= 8; + e[r + h] = 255 & o, h += d, o /= 256, i -= 8 + ); + for ( + a = (a << i) | o, l += i; + l > 0; + e[r + h] = 255 & a, h += d, a /= 256, l -= 8 + ); + e[r + h - d] |= 128 * m + }) + }, + function(e, t) { + var r = {}.toString + e.exports = + Array.isArray || + function(e) { + return "[object Array]" == r.call(e) + } + }, + function(e, t) { + function r() { + throw new Error("tty.ReadStream is not implemented") + } + function n() { + throw new Error("tty.ReadStream is not implemented") + } + ;(t.isatty = function() { + return !1 + }), + (t.ReadStream = r), + (t.WriteStream = n) + }, + function(e, t) { + "function" == typeof Object.create + ? (e.exports = function(e, t) { + ;(e.super_ = t), + (e.prototype = Object.create(t.prototype, { + constructor: { + value: e, + enumerable: !1, + writable: !0, + configurable: !0 + } + })) + }) + : (e.exports = function(e, t) { + e.super_ = t + var r = function() {} + ;(r.prototype = t.prototype), + (e.prototype = new r()), + (e.prototype.constructor = e) + }) + }, + function(e, t) { + e.exports = function(e) { + return ( + e && + "object" == typeof e && + "function" == typeof e.copy && + "function" == typeof e.fill && + "function" == typeof e.readUInt8 + ) + } + }, + function(e, t, r, n, i, s, a, o, u) { + "use strict" + function l(e) { + var t = v["default"].matchToToken(e) + if ("name" === t.type && E["default"].keyword.isReservedWordES6(t.value)) + return "keyword" + if ("punctuator" === t.type) + switch (t.value) { + case "{": + case "}": + return "curly" + case "(": + case ")": + return "parens" + case "[": + case "]": + return "square" + } + return t.type + } + function c(e) { + return e.replace(v["default"], function() { + for (var e = arguments.length, t = Array(e), r = 0; e > r; r++) + t[r] = arguments[r] + var n = l(t), + i = A[n] + return i + ? t[0] + .split(D) + .map(function(e) { + return i(e) + }) + .join("\n") + : t[0] + }) + } + var p = r(n)["default"] + t.__esModule = !0 + var f = r(i), + h = p(f), + d = r(s), + m = p(d), + y = r(a), + v = p(y), + g = r(o), + E = p(g), + b = r(u), + x = p(b), + A = { + string: x["default"].red, + punctuator: x["default"].bold, + curly: x["default"].green, + parens: x["default"].blue.bold, + square: x["default"].yellow, + keyword: x["default"].cyan, + number: x["default"].magenta, + regex: x["default"].magenta, + comment: x["default"].grey, + invalid: x["default"].inverse + }, + D = /\r\n|[\n\r\u2028\u2029]/ + ;(t["default"] = function(e, t, r) { + var n = arguments.length <= 3 || void 0 === arguments[3] ? {} : arguments[3] + r = Math.max(r, 0) + var i = n.highlightCode && x["default"].supportsColor + i && (e = c(e)) + var s = e.split(D), + a = Math.max(t - 3, 0), + o = Math.min(s.length, t + 3) + t || r || ((a = 0), (o = s.length)) + var u = h["default"](s.slice(a, o), { + start: a + 1, + before: " ", + after: " | ", + transform: function(e) { + e.number === t && + (r && + (e.line += + "\n" + + e.before + + m["default"](" ", e.width) + + e.after + + m["default"](" ", r - 1) + + "^"), + (e.before = e.before.replace(/^./, ">"))) + } + }).join("\n") + return i ? x["default"].reset(u) : u + }), + (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a, o) { + ;(function(t) { + "use strict" + function u(e) { + this.enabled = e && void 0 !== e.enabled ? e.enabled : y + } + function l(e) { + var t = function() { + return c.apply(t, arguments) + } + return (t._styles = e), (t.enabled = this.enabled), (t.__proto__ = b), t + } + function c() { + var e = arguments, + t = e.length, + r = 0 !== t && String(arguments[0]) + if (t > 1) for (var n = 1; t > n; n++) r += " " + e[n] + if (!this.enabled || !r) return r + var i = this._styles, + s = i.length, + a = h.dim.open + for ( + !g || + (-1 === i.indexOf("gray") && -1 === i.indexOf("grey")) || + (h.dim.open = ""); + s--; + + ) { + var o = h[i[s]] + r = o.open + r.replace(o.closeRe, o.open) + o.close + } + return (h.dim.open = a), r + } + function p() { + var e = {} + return ( + Object.keys(E).forEach(function(t) { + e[t] = { + get: function() { + return l.call(this, [t]) + } + } + }), + e + ) + } + var f = r(n), + h = r(i), + d = r(s), + m = r(a), + y = r(o), + v = Object.defineProperties, + g = "win32" === t.platform && !/^xterm/i.test(t.env.TERM) + g && (h.blue.open = "") + var E = (function() { + var e = {} + return ( + Object.keys(h).forEach(function(t) { + ;(h[t].closeRe = new RegExp(f(h[t].close), "g")), + (e[t] = { + get: function() { + return l.call(this, this._styles.concat(t)) + } + }) + }), + e + ) + })(), + b = v(function() {}, E) + v(u.prototype, p()), + (e.exports = new u()), + (e.exports.styles = h), + (e.exports.hasColor = m), + (e.exports.stripColor = d), + (e.exports.supportsColor = y) + }.call(t, r(1))) + }, + function(e, t, r, n) { + ;(function(e) { + "use strict" + function t(e, t) { + return function() { + var r = e.apply(o, arguments) + return "[" + (r + t) + "m" + } + } + function i(e, t) { + return function() { + var r = e.apply(o, arguments) + return "[" + (38 + t) + ";5;" + r + "m" + } + } + function s(e, t) { + return function() { + var r = e.apply(o, arguments) + return "[" + (38 + t) + ";2;" + r[0] + ";" + r[1] + ";" + r[2] + "m" + } + } + function a() { + function e(e, t, r) { + return [e, t, r] + } + var r = { + modifier: { + reset: [0, 0], + 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] + }, + 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] + } + } + ;(r.color.grey = r.color.gray), + Object.keys(r).forEach(function(e) { + var t = r[e] + Object.keys(t).forEach(function(e) { + var n = t[e] + r[e] = t[e] = { + open: "[" + n[0] + "m", + close: "[" + n[1] + "m" + } + }), + Object.defineProperty(r, e, { value: t, enumerable: !1 }) + }), + (r.color.close = ""), + (r.bgColor.close = ""), + (r.color.ansi = {}), + (r.color.ansi256 = {}), + (r.color.ansi16m = { rgb: s(e, 0) }), + (r.bgColor.ansi = {}), + (r.bgColor.ansi256 = {}), + (r.bgColor.ansi16m = { rgb: s(e, 10) }) + for (var n in o) + if (o.hasOwnProperty(n) && "object" == typeof o[n]) { + var a = o[n] + "ansi16" in a && + ((r.color.ansi[n] = t(a.ansi16, 0)), + (r.bgColor.ansi[n] = t(a.ansi16, 10))), + "ansi256" in a && + ((r.color.ansi256[n] = i(a.ansi256, 0)), + (r.bgColor.ansi256[n] = i(a.ansi256, 10))), + "rgb" in a && + ((r.color.ansi16m[n] = s(a.rgb, 0)), + (r.bgColor.ansi16m[n] = s(a.rgb, 10))) + } + return r + } + var o = r(n) + Object.defineProperty(e, "exports", { enumerable: !0, get: a }) + }.call(t, r(25)(e))) + }, + function(e, t, r, n) { + var i = r(n), + s = {} + for (var a in i) i.hasOwnProperty(a) && (s[i[a].join()] = a) + var o = (e.exports = { + rgb: {}, + hsl: {}, + hsv: {}, + hwb: {}, + cmyk: {}, + xyz: {}, + lab: {}, + lch: {}, + hex: {}, + keyword: {}, + ansi16: {}, + ansi256: {} + }) + ;(o.rgb.hsl = function(e) { + var t, + r, + n, + i = e[0] / 255, + s = e[1] / 255, + a = e[2] / 255, + o = Math.min(i, s, a), + u = Math.max(i, s, a), + l = u - o + return ( + u === o + ? (t = 0) + : i === u + ? (t = (s - a) / l) + : s === u + ? (t = 2 + (a - i) / l) + : a === u && (t = 4 + (i - s) / l), + (t = Math.min(60 * t, 360)), + 0 > t && (t += 360), + (n = (o + u) / 2), + (r = u === o ? 0 : 0.5 >= n ? l / (u + o) : l / (2 - u - o)), + [t, 100 * r, 100 * n] + ) + }), + (o.rgb.hsv = function(e) { + var t, + r, + n, + i = e[0], + s = e[1], + a = e[2], + o = Math.min(i, s, a), + u = Math.max(i, s, a), + l = u - o + return ( + (r = 0 === u ? 0 : ((l / u) * 1e3) / 10), + u === o + ? (t = 0) + : i === u + ? (t = (s - a) / l) + : s === u + ? (t = 2 + (a - i) / l) + : a === u && (t = 4 + (i - s) / l), + (t = Math.min(60 * t, 360)), + 0 > t && (t += 360), + (n = ((u / 255) * 1e3) / 10), + [t, r, n] + ) + }), + (o.rgb.hwb = function(e) { + var t = e[0], + r = e[1], + n = e[2], + i = o.rgb.hsl(e)[0], + s = (1 / 255) * Math.min(t, Math.min(r, n)) + return ( + (n = 1 - (1 / 255) * Math.max(t, Math.max(r, n))), [i, 100 * s, 100 * n] + ) + }), + (o.rgb.cmyk = function(e) { + var t, + r, + n, + i, + s = e[0] / 255, + a = e[1] / 255, + o = e[2] / 255 + return ( + (i = Math.min(1 - s, 1 - a, 1 - o)), + (t = (1 - s - i) / (1 - i) || 0), + (r = (1 - a - i) / (1 - i) || 0), + (n = (1 - o - i) / (1 - i) || 0), + [100 * t, 100 * r, 100 * n, 100 * i] + ) + }), + (o.rgb.keyword = function(e) { + return s[e.join()] + }), + (o.keyword.rgb = function(e) { + return i[e] + }), + (o.rgb.xyz = function(e) { + var t = e[0] / 255, + r = e[1] / 255, + n = e[2] / 255 + ;(t = t > 0.04045 ? Math.pow((t + 0.055) / 1.055, 2.4) : t / 12.92), + (r = r > 0.04045 ? Math.pow((r + 0.055) / 1.055, 2.4) : r / 12.92), + (n = n > 0.04045 ? Math.pow((n + 0.055) / 1.055, 2.4) : n / 12.92) + var i = 0.4124 * t + 0.3576 * r + 0.1805 * n, + s = 0.2126 * t + 0.7152 * r + 0.0722 * n, + a = 0.0193 * t + 0.1192 * r + 0.9505 * n + return [100 * i, 100 * s, 100 * a] + }), + (o.rgb.lab = function(e) { + var t, + r, + n, + i = o.rgb.xyz(e), + s = i[0], + a = i[1], + u = i[2] + return ( + (s /= 95.047), + (a /= 100), + (u /= 108.883), + (s = s > 0.008856 ? Math.pow(s, 1 / 3) : 7.787 * s + 16 / 116), + (a = a > 0.008856 ? Math.pow(a, 1 / 3) : 7.787 * a + 16 / 116), + (u = u > 0.008856 ? Math.pow(u, 1 / 3) : 7.787 * u + 16 / 116), + (t = 116 * a - 16), + (r = 500 * (s - a)), + (n = 200 * (a - u)), + [t, r, n] + ) + }), + (o.hsl.rgb = function(e) { + var t, + r, + n, + i, + s, + a = e[0] / 360, + o = e[1] / 100, + u = e[2] / 100 + if (0 === o) return (s = 255 * u), [s, s, s] + ;(r = 0.5 > u ? u * (1 + o) : u + o - u * o), + (t = 2 * u - r), + (i = [0, 0, 0]) + for (var l = 0; 3 > l; l++) + (n = a + (1 / 3) * -(l - 1)), + 0 > n && n++, + n > 1 && n--, + (s = + 1 > 6 * n + ? t + 6 * (r - t) * n + : 1 > 2 * n + ? r + : 2 > 3 * n + ? t + (r - t) * (2 / 3 - n) * 6 + : t), + (i[l] = 255 * s) + return i + }), + (o.hsl.hsv = function(e) { + var t, + r, + n = e[0], + i = e[1] / 100, + s = e[2] / 100 + return 0 === s + ? [0, 0, 0] + : ((s *= 2), + (i *= 1 >= s ? s : 2 - s), + (r = (s + i) / 2), + (t = (2 * i) / (s + i)), + [n, 100 * t, 100 * r]) + }), + (o.hsv.rgb = function(e) { + var t = e[0] / 60, + r = e[1] / 100, + n = e[2] / 100, + i = Math.floor(t) % 6, + s = t - Math.floor(t), + a = 255 * n * (1 - r), + o = 255 * n * (1 - r * s), + u = 255 * n * (1 - r * (1 - s)) + switch (((n *= 255), i)) { + case 0: + return [n, u, a] + case 1: + return [o, n, a] + case 2: + return [a, n, u] + case 3: + return [a, o, n] + case 4: + return [u, a, n] + case 5: + return [n, a, o] + } + }), + (o.hsv.hsl = function(e) { + var t, + r, + n = e[0], + i = e[1] / 100, + s = e[2] / 100 + return ( + (r = (2 - i) * s), + (t = i * s), + (t /= 1 >= r ? r : 2 - r), + (t = t || 0), + (r /= 2), + [n, 100 * t, 100 * r] + ) + }), + (o.hwb.rgb = function(e) { + var t, + r, + n, + i, + s = e[0] / 360, + a = e[1] / 100, + o = e[2] / 100, + u = a + o + u > 1 && ((a /= u), (o /= u)), + (t = Math.floor(6 * s)), + (r = 1 - o), + (n = 6 * s - t), + 0 !== (1 & t) && (n = 1 - n), + (i = a + n * (r - a)) + var l, c, p + switch (t) { + default: + case 6: + case 0: + ;(l = r), (c = i), (p = a) + break + case 1: + ;(l = i), (c = r), (p = a) + break + case 2: + ;(l = a), (c = r), (p = i) + break + case 3: + ;(l = a), (c = i), (p = r) + break + case 4: + ;(l = i), (c = a), (p = r) + break + case 5: + ;(l = r), (c = a), (p = i) + } + return [255 * l, 255 * c, 255 * p] + }), + (o.cmyk.rgb = function(e) { + var t, + r, + n, + i = e[0] / 100, + s = e[1] / 100, + a = e[2] / 100, + o = e[3] / 100 + return ( + (t = 1 - Math.min(1, i * (1 - o) + o)), + (r = 1 - Math.min(1, s * (1 - o) + o)), + (n = 1 - Math.min(1, a * (1 - o) + o)), + [255 * t, 255 * r, 255 * n] + ) + }), + (o.xyz.rgb = function(e) { + var t, + r, + n, + i = e[0] / 100, + s = e[1] / 100, + a = e[2] / 100 + return ( + (t = 3.2406 * i + -1.5372 * s + a * -0.4986), + (r = i * -0.9689 + 1.8758 * s + 0.0415 * a), + (n = 0.0557 * i + s * -0.204 + 1.057 * a), + (t = + t > 0.0031308 + ? 1.055 * Math.pow(t, 1 / 2.4) - 0.055 + : (t *= 12.92)), + (r = + r > 0.0031308 + ? 1.055 * Math.pow(r, 1 / 2.4) - 0.055 + : (r *= 12.92)), + (n = + n > 0.0031308 + ? 1.055 * Math.pow(n, 1 / 2.4) - 0.055 + : (n *= 12.92)), + (t = Math.min(Math.max(0, t), 1)), + (r = Math.min(Math.max(0, r), 1)), + (n = Math.min(Math.max(0, n), 1)), + [255 * t, 255 * r, 255 * n] + ) + }), + (o.xyz.lab = function(e) { + var t, + r, + n, + i = e[0], + s = e[1], + a = e[2] + return ( + (i /= 95.047), + (s /= 100), + (a /= 108.883), + (i = i > 0.008856 ? Math.pow(i, 1 / 3) : 7.787 * i + 16 / 116), + (s = s > 0.008856 ? Math.pow(s, 1 / 3) : 7.787 * s + 16 / 116), + (a = a > 0.008856 ? Math.pow(a, 1 / 3) : 7.787 * a + 16 / 116), + (t = 116 * s - 16), + (r = 500 * (i - s)), + (n = 200 * (s - a)), + [t, r, n] + ) + }), + (o.lab.xyz = function(e) { + var t, + r, + n, + i, + s = e[0], + a = e[1], + o = e[2] + return ( + 8 >= s + ? ((r = (100 * s) / 903.3), (i = 7.787 * (r / 100) + 16 / 116)) + : ((r = 100 * Math.pow((s + 16) / 116, 3)), + (i = Math.pow(r / 100, 1 / 3))), + (t = + 0.008856 >= t / 95.047 + ? (t = (95.047 * (a / 500 + i - 16 / 116)) / 7.787) + : 95.047 * Math.pow(a / 500 + i, 3)), + (n = + 0.008859 >= n / 108.883 + ? (n = (108.883 * (i - o / 200 - 16 / 116)) / 7.787) + : 108.883 * Math.pow(i - o / 200, 3)), + [t, r, n] + ) + }), + (o.lab.lch = function(e) { + var t, + r, + n, + i = e[0], + s = e[1], + a = e[2] + return ( + (t = Math.atan2(a, s)), + (r = (360 * t) / 2 / Math.PI), + 0 > r && (r += 360), + (n = Math.sqrt(s * s + a * a)), + [i, n, r] + ) + }), + (o.lch.lab = function(e) { + var t, + r, + n, + i = e[0], + s = e[1], + a = e[2] + return ( + (n = (a / 360) * 2 * Math.PI), + (t = s * Math.cos(n)), + (r = s * Math.sin(n)), + [i, t, r] + ) + }), + (o.rgb.ansi16 = function(e) { + var t = e[0], + r = e[1], + n = e[2], + i = 1 in arguments ? arguments[1] : o.rgb.hsv(e)[2] + if (((i = Math.round(i / 50)), 0 === i)) return 30 + var s = + 30 + + ((Math.round(n / 255) << 2) | + (Math.round(r / 255) << 1) | + Math.round(t / 255)) + return 2 === i && (s += 60), s + }), + (o.hsv.ansi16 = function(e) { + return o.rgb.ansi16(o.hsv.rgb(e), e[2]) + }), + (o.rgb.ansi256 = function(e) { + var t = e[0], + r = e[1], + n = e[2] + if (t === r && r === n) + return 8 > t + ? 16 + : t > 248 + ? 231 + : Math.round(((t - 8) / 247) * 24) + 232 + var i = + 16 + + 36 * Math.round((t / 255) * 5) + + 6 * Math.round((r / 255) * 5) + + Math.round((n / 255) * 5) + return i + }), + (o.ansi16.rgb = function(e) { + var t = e % 10 + if (0 === t || 7 === t) + return e > 50 && (t += 3.5), (t = (t / 10.5) * 255), [t, t, t] + var r = 0.5 * (~~(e > 50) + 1), + n = (1 & t) * r * 255, + i = ((t >> 1) & 1) * r * 255, + s = ((t >> 2) & 1) * r * 255 + return [n, i, s] + }), + (o.ansi256.rgb = function(e) { + if (e >= 232) { + var t = 10 * (e - 232) + 8 + return [t, t, t] + } + e -= 16 + var r, + n = (Math.floor(e / 36) / 5) * 255, + i = (Math.floor((r = e % 36) / 6) / 5) * 255, + s = ((r % 6) / 5) * 255 + return [n, i, s] + }), + (o.rgb.hex = function(e) { + var t = + ((255 & Math.round(e[0])) << 16) + + ((255 & Math.round(e[1])) << 8) + + (255 & Math.round(e[2])), + r = t.toString(16).toUpperCase() + return "000000".substring(r.length) + r + }), + (o.hex.rgb = function(e) { + var t = e.toString(16).match(/[a-f0-9]{6}/i) + if (!t) return [0, 0, 0] + var r = parseInt(t[0], 16), + n = (r >> 16) & 255, + i = (r >> 8) & 255, + s = 255 & r + return [n, i, s] + }) + }, + function(e, t, r, n, i) { + function s(e) { + var t = function(t) { + return void 0 === t || null === t + ? t + : (arguments.length > 1 && (t = Array.prototype.slice.call(arguments)), + e(t)) + } + return "conversion" in e && (t.conversion = e.conversion), t + } + function a(e) { + var t = function(t) { + if (void 0 === t || null === t) return t + arguments.length > 1 && (t = Array.prototype.slice.call(arguments)) + var r = e(t) + if ("object" == typeof r) + for (var n = r.length, i = 0; n > i; i++) r[i] = Math.round(r[i]) + return r + } + return "conversion" in e && (t.conversion = e.conversion), t + } + var o = r(n), + u = r(i), + l = {}, + c = Object.keys(o) + c.forEach(function(e) { + l[e] = {} + var t = u(e), + r = Object.keys(t) + r.forEach(function(r) { + var n = t[r] + ;(l[e][r] = a(n)), (l[e][r].raw = s(n)) + }) + }), + (e.exports = l) + }, + function(e, t, r, n) { + function i() { + for (var e = {}, t = l.length, r = 0; t > r; r++) + e[l[r]] = { distance: -1, parent: null } + return e + } + function s(e) { + var t = i(), + r = [e] + for (t[e].distance = 0; r.length; ) + for ( + var n = r.pop(), s = Object.keys(u[n]), a = s.length, o = 0; + a > o; + o++ + ) { + var l = s[o], + c = t[l] + ;-1 === c.distance && + ((c.distance = t[n].distance + 1), (c.parent = n), r.unshift(l)) + } + return t + } + function a(e, t) { + return function(r) { + return t(e(r)) + } + } + function o(e, t) { + for ( + var r = [t[e].parent, e], n = u[t[e].parent][e], i = t[e].parent; + t[i].parent; + + ) + r.unshift(t[i].parent), (n = a(u[t[i].parent][i], n)), (i = t[i].parent) + return (n.conversion = r), n + } + var u = r(n), + l = Object.keys(u) + e.exports = function(e) { + for ( + var t = s(e), r = {}, n = Object.keys(t), i = n.length, a = 0; + i > a; + a++ + ) { + var u = n[a], + l = t[u] + null !== l.parent && (r[u] = o(u, t)) + } + return r + } + }, + function(e, t, r, n) { + "use strict" + var i = r(n), + s = new RegExp(i().source) + e.exports = s.test.bind(s) + }, + function(e, t, r, n) { + "use strict" + var i = r(n)() + e.exports = function(e) { + return "string" == typeof e ? e.replace(i, "") : e + } + }, + function(e, t, r, n) { + !(function() { + "use strict" + function t(e) { + switch (e) { + case "implements": + case "interface": + case "package": + case "private": + case "protected": + case "public": + case "static": + case "let": + return !0 + default: + return !1 + } + } + function i(e, t) { + return t || "yield" !== e ? s(e, t) : !1 + } + function s(e, r) { + if (r && t(e)) return !0 + switch (e.length) { + case 2: + return "if" === e || "in" === e || "do" === e + case 3: + return "var" === e || "for" === e || "new" === e || "try" === e + case 4: + return ( + "this" === e || + "else" === e || + "case" === e || + "void" === e || + "with" === e || + "enum" === e + ) + case 5: + return ( + "while" === e || + "break" === e || + "catch" === e || + "throw" === e || + "const" === e || + "yield" === e || + "class" === e || + "super" === e + ) + case 6: + return ( + "return" === e || + "typeof" === e || + "delete" === e || + "switch" === e || + "export" === e || + "import" === e + ) + case 7: + return "default" === e || "finally" === e || "extends" === e + case 8: + return "function" === e || "continue" === e || "debugger" === e + case 10: + return "instanceof" === e + default: + return !1 + } + } + function a(e, t) { + return "null" === e || "true" === e || "false" === e || i(e, t) + } + function o(e, t) { + return "null" === e || "true" === e || "false" === e || s(e, t) + } + function u(e) { + return "eval" === e || "arguments" === e + } + function l(e) { + var t, r, n + if (0 === e.length) return !1 + if (((n = e.charCodeAt(0)), !d.isIdentifierStartES5(n))) return !1 + for (t = 1, r = e.length; r > t; ++t) + if (((n = e.charCodeAt(t)), !d.isIdentifierPartES5(n))) return !1 + return !0 + } + function c(e, t) { + return 1024 * (e - 55296) + (t - 56320) + 65536 + } + function p(e) { + var t, r, n, i, s + if (0 === e.length) return !1 + for (s = d.isIdentifierStartES6, t = 0, r = e.length; r > t; ++t) { + if (((n = e.charCodeAt(t)), n >= 55296 && 56319 >= n)) { + if ((++t, t >= r)) return !1 + if (((i = e.charCodeAt(t)), !(i >= 56320 && 57343 >= i))) return !1 + n = c(n, i) + } + if (!s(n)) return !1 + s = d.isIdentifierPartES6 + } + return !0 + } + function f(e, t) { + return l(e) && !a(e, t) + } + function h(e, t) { + return p(e) && !o(e, t) + } + var d = r(n) + e.exports = { + isKeywordES5: i, + isKeywordES6: s, + isReservedWordES5: a, + isReservedWordES6: o, + isRestrictedWord: u, + isIdentifierNameES5: l, + isIdentifierNameES6: p, + isIdentifierES5: f, + isIdentifierES6: h + } + })() + }, + function(e, t, r, n, i, s) { + !(function() { + "use strict" + ;(t.ast = r(n)), (t.code = r(i)), (t.keyword = r(s)) + })() + }, + function(e, t, r, n) { + function i(e, t, r) { + return t in e ? e[t] : r + } + function s(e, t) { + var r = i.bind(null, t || {}), + n = r("transform", Function.prototype), + s = r("padding", " "), + o = r("before", " "), + u = r("after", " | "), + l = r("start", 1), + c = Array.isArray(e), + p = c ? e : e.split("\n"), + f = l + p.length - 1, + h = String(f).length, + d = p.map(function(e, t) { + var r = l + t, + i = { before: o, number: r, width: h, after: u, line: e } + return n(i), i.before + a(i.number, h, s) + i.after + i.line + }) + return c ? d : d.join("\n") + } + var a = r(n) + e.exports = s + }, + function(e, t, r, n) { + "use strict" + var i = r(n) + e.exports = function(e, t) { + if ("string" != typeof e) + throw new TypeError("Expected a string as the first argument") + if (0 > t || !i(t)) throw new TypeError("Expected a finite positive number") + var r = "" + do 1 & t && (r += e), (e += e) + while ((t >>= 1)) + return r + } + }, + function(e, t, r, n) { + "use strict" + var i = r(n) + e.exports = + Number.isFinite || + function(e) { + return !("number" != typeof e || i(e) || e === 1 / 0 || e === -(1 / 0)) + } + }, + function(e, t, r, n) { + "use strict" + function i(e) { + for (var t = arguments.length, r = Array(t > 1 ? t - 1 : 0), n = 1; t > n; n++) + r[n - 1] = arguments[n] + var i = l[e] + if (!i) throw new ReferenceError("Unknown message " + JSON.stringify(e)) + return ( + (r = s(r)), + i.replace(/\$(\d+)/g, function(e, t) { + return r[t - 1] + }) + ) + } + function s(e) { + return e.map(function(e) { + if (null != e && e.inspect) return e.inspect() + try { + return JSON.stringify(e) || e + "" + } catch (t) { + return u.inspect(e) + } + }) + } + var a = r(n)["default"] + ;(t.__esModule = !0), (t.get = i), (t.parseArgs = s) + var o = r(22), + u = a(o), + l = { + tailCallReassignmentDeopt: + "Function reference has been reassigned, so it will probably be dereferenced, therefore we can't optimise this with confidence", + classesIllegalBareSuper: "Illegal use of bare super", + classesIllegalSuperCall: + "Direct super call is illegal in non-constructor, use super.$1() instead", + scopeDuplicateDeclaration: "Duplicate declaration $1", + settersNoRest: "Setters aren't allowed to have a rest", + noAssignmentsInForHead: "No assignments allowed in for-in/of head", + expectedMemberExpressionOrIdentifier: + "Expected type MemberExpression or Identifier", + invalidParentForThisNode: + "We don't know how to handle this node within the current parent - please open an issue", + readOnly: "$1 is read-only", + unknownForHead: "Unknown node type $1 in ForStatement", + didYouMean: "Did you mean $1?", + codeGeneratorDeopt: + "Note: The code generator has deoptimised the styling of $1 as it exceeds the max of $2.", + missingTemplatesDirectory: + "no templates directory - this is most likely the result of a broken `npm publish`. Please report to https://github.com/babel/babel/issues", + unsupportedOutputType: "Unsupported output type $1", + illegalMethodName: "Illegal method name $1", + lostTrackNodePath: + "We lost track of this node's position, likely because the AST was directly manipulated", + modulesIllegalExportName: "Illegal export $1", + modulesDuplicateDeclarations: + "Duplicate module declarations with the same source but in different scopes", + undeclaredVariable: "Reference to undeclared variable $1", + undeclaredVariableType: + "Referencing a type alias outside of a type annotation", + undeclaredVariableSuggestion: + "Reference to undeclared variable $1 - did you mean $2?", + traverseNeedsParent: + "You must pass a scope and parentPath unless traversing a Program/File. Instead of that you tried to traverse a $1 node without passing scope and parentPath.", + traverseVerifyRootFunction: + "You passed `traverse()` a function when it expected a visitor object, are you sure you didn't mean `{ enter: Function }`?", + traverseVerifyVisitorProperty: + "You passed `traverse()` a visitor object with the property $1 that has the invalid property $2", + traverseVerifyNodeType: + "You gave us a visitor for the node type $1 but it's not a valid type", + pluginNotObject: + "Plugin $2 specified in $1 was expected to return an object when invoked but returned $3", + pluginNotFunction: + "Plugin $2 specified in $1 was expected to return a function but returned $3", + pluginUnknown: + "Unknown plugin $1 specified in $2 at $3, attempted to resolve relative to $4", + pluginInvalidProperty: + "Plugin $2 specified in $1 provided an invalid property of $3" + } + t.MESSAGES = l + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + e.exports = { default: r(n), __esModule: !0 } + }, + function(e, t, r, n) { + "use strict" + var i = r(n)["default"] + ;(t["default"] = (function() { + function e(e, t) { + for (var r = 0; r < t.length; r++) { + var n = t[r] + ;(n.enumerable = n.enumerable || !1), + (n.configurable = !0), + "value" in n && (n.writable = !0), + i(e, n.key, n) + } + } + return function(t, r, n) { + return r && e(t.prototype, r), n && e(t, n), t + } + })()), + (t.__esModule = !0) + }, + function(e, t, r, n, i, s) { + "use strict" + var a = r(n)["default"], + o = r(i)["default"], + u = r(s)["default"] + ;(t["default"] = function(e, t) { + for (var r = a(t), n = 0; n < r.length; n++) { + var i = r[n], + s = o(t, i) + s && s.configurable && void 0 === e[i] && u(e, i, s) + } + return e + }), + (t.__esModule = !0) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"], + a = r(i)["default"] + ;(t["default"] = function(e, t) { + if ("function" != typeof t && null !== t) + throw new TypeError( + "Super expression must either be null or a function, not " + typeof t + ) + ;(e.prototype = s(t && t.prototype, { + constructor: { value: e, enumerable: !1, writable: !0, configurable: !0 } + })), + t && (a ? a(e, t) : (e.__proto__ = t)) + }), + (t.__esModule = !0) + }, + function(e, t, r, n, i, s) { + r(n), r(i), (e.exports = r(s)) + }, + function(e, t, r, n) { + r(n), (e.exports = 9007199254740991) + }, + function(e, t, r, n, i) { + r(n), (e.exports = r(i).Object.assign) + }, + function(e, t, r, n) { + var i = r(n) + e.exports = function(e, t) { + return i.create(e, t) + } + }, + function(e, t, r, n) { + var i = r(n) + e.exports = function(e, t, r) { + return i.setDesc(e, t, r) + } + }, + function(e, t, r, n, i) { + var s = r(n) + r(i), + (e.exports = function(e, t) { + return s.getDesc(e, t) + }) + }, + function(e, t, r, n, i) { + var s = r(n) + r(i), + (e.exports = function(e) { + return s.getNames(e) + }) + }, + function(e, t, r, n, i) { + r(n), (e.exports = r(i).Object.getOwnPropertySymbols) + }, + function(e, t, r, n, i) { + r(n), (e.exports = r(i).Object.keys) + }, + function(e, t, r, n, i) { + r(n), (e.exports = r(i).Object.setPrototypeOf) + }, + function(e, t, r, n, i) { + r(n), (e.exports = r(i).Symbol["for"]) + }, + function(e, t, r, n, i, s) { + r(n), r(i), (e.exports = r(s).Symbol) + }, + function(e, t, r, n) { + var i = r(n) + e.exports = function(e) { + if (!i(e)) throw TypeError(e + " is not an object!") + return e + } + }, + function(e, t, r, n, i) { + var s = r(n), + a = r(i)("toStringTag"), + o = + "Arguments" == + s( + (function() { + return arguments + })() + ) + e.exports = function(e) { + var t, r, n + return void 0 === e + ? "Undefined" + : null === e + ? "Null" + : "string" == typeof (r = (t = Object(e))[a]) + ? r + : o + ? s(t) + : "Object" == (n = s(t)) && "function" == typeof t.callee + ? "Arguments" + : n + } + }, + function(e, t, r, n) { + var i = r(n) + e.exports = function(e, t, r) { + if ((i(e), void 0 === t)) return e + switch (r) { + case 1: + return function(r) { + return e.call(t, r) + } + case 2: + return function(r, n) { + return e.call(t, r, n) + } + case 3: + return function(r, n, i) { + return e.call(t, r, n, i) + } + } + return function() { + return e.apply(t, arguments) + } + } + }, + function(e, t, r, n) { + e.exports = !r(n)(function() { + return ( + 7 != + Object.defineProperty({}, "a", { + get: function() { + return 7 + } + }).a + ) + }) + }, + function(e, t, r, n) { + var i = r(n) + e.exports = function(e) { + var t = i.getKeys(e), + r = i.getSymbols + if (r) + for (var n, s = r(e), a = i.isEnum, o = 0; s.length > o; ) + a.call(e, (n = s[o++])) && t.push(n) + return t + } + }, + function(e, t, r, n, i, s) { + var a = r(n), + o = r(i), + u = r(s), + l = "prototype", + c = function(e, t, r) { + var n, + i, + s, + p = e & c.F, + f = e & c.G, + h = e & c.S, + d = e & c.P, + m = e & c.B, + y = e & c.W, + v = f ? o : o[t] || (o[t] = {}), + g = f ? a : h ? a[t] : (a[t] || {})[l] + f && (r = t) + for (n in r) + (i = !p && g && n in g), + (i && n in v) || + ((s = i ? g[n] : r[n]), + (v[n] = + f && "function" != typeof g[n] + ? r[n] + : m && i + ? u(s, a) + : y && g[n] == s + ? (function(e) { + var t = function(t) { + return this instanceof e ? new e(t) : e(t) + } + return (t[l] = e[l]), t + })(s) + : d && "function" == typeof s + ? u(Function.call, s) + : s), + d && ((v[l] || (v[l] = {}))[n] = s)) + } + ;(c.F = 1), (c.G = 2), (c.S = 4), (c.P = 8), (c.B = 16), (c.W = 32), (e.exports = c) + }, + function(e, t, r, n, i) { + var s = r(n), + a = r(i).getNames, + o = {}.toString, + u = + "object" == typeof window && Object.getOwnPropertyNames + ? Object.getOwnPropertyNames(window) + : [], + l = function(e) { + try { + return a(e) + } catch (t) { + return u.slice() + } + } + e.exports.get = function(e) { + return u && "[object Window]" == o.call(e) ? l(e) : a(s(e)) + } + }, + function(e, t, r, n, i, s) { + var a = r(n), + o = r(i) + e.exports = r(s) + ? function(e, t, r) { + return a.setDesc(e, t, o(1, r)) + } + : function(e, t, r) { + return (e[t] = r), e + } + }, + function(e, t, r, n) { + var i = r(n) + e.exports = Object("z").propertyIsEnumerable(0) + ? Object + : function(e) { + return "String" == i(e) ? e.split("") : Object(e) + } + }, + function(e, t, r, n) { + var i = r(n) + e.exports = + Array.isArray || + function(e) { + return "Array" == i(e) + } + }, + function(e, t, r, n, i, s, a, o) { + "use strict" + var u = r(n), + l = r(i), + c = r(s), + p = {} + r(a)(p, r(o)("iterator"), function() { + return this + }), + (e.exports = function(e, t, r) { + ;(e.prototype = u.create(p, { next: l(1, r) })), c(e, t + " Iterator") + }) + }, + function(e, t, r, n, i, s, a, o, u, l, c, p, f) { + "use strict" + var h = r(n), + d = r(i), + m = r(s), + y = r(a), + v = r(o), + g = r(u), + E = r(l), + b = r(c), + x = r(p).getProto, + A = r(f)("iterator"), + D = !([].keys && "next" in [].keys()), + C = "@@iterator", + S = "keys", + F = "values", + w = function() { + return this + } + e.exports = function(e, t, r, n, i, s, a) { + E(r, t, n) + var o, + u, + l = function(e) { + if (!D && e in _) return _[e] + switch (e) { + case S: + return function() { + return new r(this, e) + } + case F: + return function() { + return new r(this, e) + } + } + return function() { + return new r(this, e) + } + }, + c = t + " Iterator", + p = i == F, + f = !1, + _ = e.prototype, + T = _[A] || _[C] || (i && _[i]), + P = T || l(i) + if (T) { + var B = x(P.call(new e())) + b(B, c, !0), + !h && v(_, C) && y(B, A, w), + p && + T.name !== F && + ((f = !0), + (P = function() { + return T.call(this) + })) + } + if (((h && !a) || (!D && !f && _[A]) || y(_, A, P), (g[t] = P), (g[c] = w), i)) + if ( + ((o = { + values: p ? P : l(F), + keys: s ? P : l(S), + entries: p ? l("entries") : P + }), + a) + ) + for (u in o) u in _ || m(_, u, o[u]) + else d(d.P + d.F * (D || f), t, o) + return o + } + }, + function(e, t, r, n, i) { + var s = r(n), + a = r(i) + e.exports = function(e, t) { + for (var r, n = a(e), i = s.getKeys(n), o = i.length, u = 0; o > u; ) + if (n[(r = i[u++])] === t) return r + } + }, + function(e, t, r, n, i, s, a) { + var o = r(n), + u = r(i), + l = r(s) + e.exports = r(a)(function() { + var e = Object.assign, + t = {}, + r = {}, + n = Symbol(), + i = "abcdefghijklmnopqrst" + return ( + (t[n] = 7), + i.split("").forEach(function(e) { + r[e] = e + }), + 7 != e({}, t)[n] || Object.keys(e({}, r)).join("") != i + ) + }) + ? function(e, t) { + for ( + var r = u(e), + n = arguments, + i = n.length, + s = 1, + a = o.getKeys, + c = o.getSymbols, + p = o.isEnum; + i > s; + + ) + for ( + var f, + h = l(n[s++]), + d = c ? a(h).concat(c(h)) : a(h), + m = d.length, + y = 0; + m > y; + + ) + p.call(h, (f = d[y++])) && (r[f] = h[f]) + return r + } + : Object.assign + }, + function(e, t, r, n, i, s) { + var a = r(n), + o = r(i), + u = r(s) + e.exports = function(e, t) { + var r = (o.Object || {})[e] || Object[e], + n = {} + ;(n[e] = t(r)), + a( + a.S + + a.F * + u(function() { + r(1) + }), + "Object", + n + ) + } + }, + function(e, t, r, n) { + e.exports = r(n) + }, + function(e, t, r, n, i, s, a) { + var o = r(n).getDesc, + u = r(i), + l = r(s), + c = function(e, t) { + if ((l(e), !u(t) && null !== t)) + throw TypeError(t + ": can't set as prototype!") + } + e.exports = { + set: + Object.setPrototypeOf || + ("__proto__" in {} + ? (function(e, t, n) { + try { + ;(n = r(a)( + Function.call, + o(Object.prototype, "__proto__").set, + 2 + )), + n(e, []), + (t = !(e instanceof Array)) + } catch (i) { + t = !0 + } + return function(e, r) { + return c(e, r), t ? (e.__proto__ = r) : n(e, r), e + } + })({}, !1) + : void 0), + check: c + } + }, + function(e, t, r, n, i, s) { + var a = r(n).setDesc, + o = r(i), + u = r(s)("toStringTag") + e.exports = function(e, t, r) { + e && !o((e = r ? e : e.prototype), u) && a(e, u, { configurable: !0, value: t }) + } + }, + function(e, t, r, n) { + var i = r(n), + s = "__core-js_shared__", + a = i[s] || (i[s] = {}) + e.exports = function(e) { + return a[e] || (a[e] = {}) + } + }, + function(e, t, r, n, i) { + var s = r(n), + a = r(i) + e.exports = function(e) { + return function(t, r) { + var n, + i, + o = String(a(t)), + u = s(r), + l = o.length + return 0 > u || u >= l + ? e + ? "" + : void 0 + : ((n = o.charCodeAt(u)), + 55296 > n || + n > 56319 || + u + 1 === l || + (i = o.charCodeAt(u + 1)) < 56320 || + i > 57343 + ? e + ? o.charAt(u) + : n + : e + ? o.slice(u, u + 2) + : ((n - 55296) << 10) + (i - 56320) + 65536) + } + } + }, + function(e, t, r, n, i) { + var s = r(n), + a = r(i) + e.exports = function(e) { + return s(a(e)) + } + }, + function(e, t, r, n) { + var i = r(n) + e.exports = function(e) { + return Object(i(e)) + } + }, + function(e, t, r, n, i, s) { + var a = r(n)("wks"), + o = r(i), + u = r(s).Symbol + e.exports = function(e) { + return a[e] || (a[e] = (u && u[e]) || (u || o)("Symbol." + e)) + } + }, + function(e, t, r, n, i, s, a) { + var o = r(n), + u = r(i)("iterator"), + l = r(s) + e.exports = r(a).getIteratorMethod = function(e) { + return void 0 != e ? e[u] || e["@@iterator"] || l[o(e)] : void 0 + } + }, + function(e, t, r, n, i, s) { + var a = r(n), + o = r(i) + e.exports = r(s).getIterator = function(e) { + var t = o(e) + if ("function" != typeof t) throw TypeError(e + " is not iterable!") + return a(t.call(e)) + } + }, + function(e, t, r, n, i, s, a, o) { + "use strict" + var u = r(n), + l = r(i), + c = r(s), + p = r(a) + ;(e.exports = r(o)( + Array, + "Array", + function(e, t) { + ;(this._t = p(e)), (this._i = 0), (this._k = t) + }, + function() { + var e = this._t, + t = this._k, + r = this._i++ + return !e || r >= e.length + ? ((this._t = void 0), l(1)) + : "keys" == t + ? l(0, r) + : "values" == t + ? l(0, e[r]) + : l(0, [r, e[r]]) + }, + "values" + )), + (c.Arguments = c.Array), + u("keys"), + u("values"), + u("entries") + }, + function(e, t, r, n) { + var i = r(n) + i(i.S, "Number", { MAX_SAFE_INTEGER: 9007199254740991 }) + }, + function(e, t, r, n, i) { + var s = r(n) + s(s.S + s.F, "Object", { assign: r(i) }) + }, + function(e, t, r, n, i) { + var s = r(n) + r(i)("getOwnPropertyDescriptor", function(e) { + return function(t, r) { + return e(s(t), r) + } + }) + }, + function(e, t, r, n, i) { + r(n)("getOwnPropertyNames", function() { + return r(i).get + }) + }, + function(e, t, r, n, i) { + var s = r(n) + r(i)("keys", function(e) { + return function(t) { + return e(s(t)) + } + }) + }, + function(e, t, r, n, i) { + var s = r(n) + s(s.S, "Object", { setPrototypeOf: r(i).set }) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)(!0) + r(i)( + String, + "String", + function(e) { + ;(this._t = String(e)), (this._i = 0) + }, + function() { + var e, + t = this._t, + r = this._i + return r >= t.length + ? { value: void 0, done: !0 } + : ((e = s(t, r)), (this._i += e.length), { value: e, done: !1 }) + } + ) + }, + function(e, t, r, n, i, s, a, o, u, l, c, p, f, h, d, m, y, v, g, E, b, x) { + "use strict" + var A = r(n), + D = r(i), + C = r(s), + S = r(a), + F = r(o), + w = r(u), + _ = r(l), + T = r(c), + P = r(p), + B = r(f), + k = r(h), + I = r(d), + O = r(m), + M = r(y), + R = r(v), + L = r(g), + N = r(E), + j = r(b), + U = A.getDesc, + V = A.setDesc, + G = A.create, + W = O.get, + q = D.Symbol, + H = D.JSON, + Y = H && H.stringify, + J = !1, + K = k("_hidden"), + X = A.isEnum, + z = T("symbol-registry"), + $ = T("symbols"), + Q = "function" == typeof q, + Z = Object.prototype, + ee = + S && + _(function() { + return ( + 7 != + G( + V({}, "a", { + get: function() { + return V(this, "a", { value: 7 }).a + } + }) + ).a + ) + }) + ? function(e, t, r) { + var n = U(Z, t) + n && delete Z[t], V(e, t, r), n && e !== Z && V(Z, t, n) + } + : V, + te = function(e) { + var t = ($[e] = G(q.prototype)) + return ( + (t._k = e), + S && + J && + ee(Z, e, { + configurable: !0, + set: function(t) { + C(this, K) && C(this[K], e) && (this[K][e] = !1), + ee(this, e, j(1, t)) + } + }), + t + ) + }, + re = function(e) { + return "symbol" == typeof e + }, + ne = function(e, t, r) { + return r && C($, t) + ? (r.enumerable + ? (C(e, K) && e[K][t] && (e[K][t] = !1), + (r = G(r, { enumerable: j(0, !1) }))) + : (C(e, K) || V(e, K, j(1, {})), (e[K][t] = !0)), + ee(e, t, r)) + : V(e, t, r) + }, + ie = function(e, t) { + L(e) + for (var r, n = M((t = N(t))), i = 0, s = n.length; s > i; ) + ne(e, (r = n[i++]), t[r]) + return e + }, + se = function(e, t) { + return void 0 === t ? G(e) : ie(G(e), t) + }, + ae = function(e) { + var t = X.call(this, e) + return t || !C(this, e) || !C($, e) || (C(this, K) && this[K][e]) ? t : !0 + }, + oe = function(e, t) { + var r = U((e = N(e)), t) + return !r || !C($, t) || (C(e, K) && e[K][t]) || (r.enumerable = !0), r + }, + ue = function(e) { + for (var t, r = W(N(e)), n = [], i = 0; r.length > i; ) + C($, (t = r[i++])) || t == K || n.push(t) + return n + }, + le = function(e) { + for (var t, r = W(N(e)), n = [], i = 0; r.length > i; ) + C($, (t = r[i++])) && n.push($[t]) + return n + }, + ce = function(e) { + if (void 0 !== e && !re(e)) { + for (var t, r, n = [e], i = 1, s = arguments; s.length > i; ) + n.push(s[i++]) + return ( + (t = n[1]), + "function" == typeof t && (r = t), + (!r && R(t)) || + (t = function(e, t) { + return r && (t = r.call(this, e, t)), re(t) ? void 0 : t + }), + (n[1] = t), + Y.apply(H, n) + ) + } + }, + pe = _(function() { + var e = q() + return "[null]" != Y([e]) || "{}" != Y({ a: e }) || "{}" != Y(Object(e)) + }) + Q || + ((q = function() { + if (re(this)) throw TypeError("Symbol is not a constructor") + return te(B(arguments.length > 0 ? arguments[0] : void 0)) + }), + w(q.prototype, "toString", function() { + return this._k + }), + (re = function(e) { + return e instanceof q + }), + (A.create = se), + (A.isEnum = ae), + (A.getDesc = oe), + (A.setDesc = ne), + (A.setDescs = ie), + (A.getNames = O.get = ue), + (A.getSymbols = le), + S && !r(x) && w(Z, "propertyIsEnumerable", ae, !0)) + var fe = { + for: function(e) { + return C(z, (e += "")) ? z[e] : (z[e] = q(e)) + }, + keyFor: function(e) { + return I(z, e) + }, + useSetter: function() { + J = !0 + }, + useSimple: function() { + J = !1 + } + } + A.each.call( + "hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split( + "," + ), + function(e) { + var t = k(e) + fe[e] = Q ? t : te(t) + } + ), + (J = !0), + F(F.G + F.W, { Symbol: q }), + F(F.S, "Symbol", fe), + F(F.S + F.F * !Q, "Object", { + create: se, + defineProperty: ne, + defineProperties: ie, + getOwnPropertyDescriptor: oe, + getOwnPropertyNames: ue, + getOwnPropertySymbols: le + }), + H && F(F.S + F.F * (!Q || pe), "JSON", { stringify: ce }), + P(q, "Symbol"), + P(Math, "Math", !0), + P(D.JSON, "JSON", !0) + }, + function(e, t, r, n, i) { + r(n) + var s = r(i) + s.NodeList = s.HTMLCollection = s.Array + }, + function(e, t, r, n, i, s, a, o, u, l, c, p) { + "use strict" + function f(e, t) { + e = v["default"](e) + var r = e, + n = r.program + return ( + t.length && D["default"](e, P, null, t), + n.body.length > 1 ? n.body : n.body[0] + ) + } + var h = r(n)["default"], + d = r(i)["default"], + m = r(s)["default"] + t.__esModule = !0 + var y = r(a), + v = d(y), + g = r(o), + E = d(g), + b = r(u), + x = d(b), + A = r(l), + D = d(A), + C = r(c), + S = m(C), + F = r(p), + w = m(F), + _ = "_fromTemplate", + T = h() + t["default"] = function(e, t) { + var r = void 0 + try { + throw new Error() + } catch (n) { + r = n.stack + .split("\n") + .slice(1) + .join("\n") + } + var i = function() { + var n = void 0 + try { + ;(n = S.parse( + e, + E["default"]( + { allowReturnOutsideFunction: !0, allowSuperOutsideMethod: !0 }, + t + ) + )), + (n = D["default"].removeProperties(n)), + D["default"].cheap(n, function(e) { + e[_] = !0 + }) + } catch (s) { + throw ((s.stack = s.stack + "from\n" + r), s) + } + return ( + (i = function() { + return n + }), + n + ) + } + return function() { + for (var e = arguments.length, t = Array(e), r = 0; e > r; r++) + t[r] = arguments[r] + return f(i(), t) + } + } + var P = { + noScope: !0, + enter: function(e, t) { + var r = e.node + if (r[T]) return e.skip() + w.isExpressionStatement(r) && (r = r.expression) + var n = void 0 + if (w.isIdentifier(r) && r[_]) + if (x["default"](t[0], r.name)) n = t[0][r.name] + else if ("$" === r.name[0]) { + var i = +r.name.slice(1) + t[i] && (n = t[i]) + } + null === n && e.remove(), n && ((n[T] = !0), e.replaceInline(n)) + }, + exit: function(e) { + var t = e.node + t.loc || D["default"].clearNode(t) + } + } + e.exports = t["default"] + }, + function(e, t, r, n, i, s, a, o, u) { + "use strict" + var l = r(n)["default"], + c = r(i)["default"], + p = r(s)["default"], + f = r(a)["default"] + t.__esModule = !0 + var h = r(o), + d = p(h), + m = r(u), + y = f(m), + v = !1, + g = (function() { + function e(t, r, n, i) { + l(this, e), + (this.queue = null), + (this.parentPath = i), + (this.scope = t), + (this.state = n), + (this.opts = r) + } + return ( + (e.prototype.shouldVisit = function(e) { + var t = this.opts + if (t.enter || t.exit) return !0 + if (t[e.type]) return !0 + var r = y.VISITOR_KEYS[e.type] + if (!r || !r.length) return !1 + for (var n = r, i = Array.isArray(n), s = 0, n = i ? n : c(n); ; ) { + var a + if (i) { + if (s >= n.length) break + a = n[s++] + } else { + if (((s = n.next()), s.done)) break + a = s.value + } + var o = a + if (e[o]) return !0 + } + return !1 + }), + (e.prototype.create = function(e, t, r, n) { + return d["default"].get({ + parentPath: this.parentPath, + parent: e, + container: t, + key: r, + listKey: n + }) + }), + (e.prototype.maybeQueue = function(e, t) { + if (this.trap) throw new Error("Infinite cycle detected") + this.queue && (t ? this.queue.push(e) : this.priorityQueue.push(e)) + }), + (e.prototype.visitMultiple = function(e, t, r) { + if (0 === e.length) return !1 + for (var n = [], i = 0; i < e.length; i++) { + var s = e[i] + s && this.shouldVisit(s) && n.push(this.create(t, e, i, r)) + } + return this.visitQueue(n) + }), + (e.prototype.visitSingle = function(e, t) { + return this.shouldVisit(e[t]) + ? this.visitQueue([this.create(e, e, t)]) + : !1 + }), + (e.prototype.visitQueue = function(e) { + ;(this.queue = e), (this.priorityQueue = []) + for (var t = [], r = !1, n = 0; n < e.length; n++) { + var i = e[n] + if ( + (i.resync(), + i.pushContext(this), + null !== i.key && + (v && e.length >= 1e3 && (this.trap = !0), + !(t.indexOf(i.node) >= 0))) + ) { + if ((t.push(i.node), i.visit())) { + r = !0 + break + } + if ( + this.priorityQueue.length && + ((r = this.visitQueue(this.priorityQueue)), + (this.priorityQueue = []), + (this.queue = e), + r) + ) + break + } + } + for (var s = 0; s < e.length; s++) { + var i = e[s] + i.popContext() + } + return (this.queue = null), r + }), + (e.prototype.visit = function(e, t) { + var r = e[t] + return r + ? Array.isArray(r) + ? this.visitMultiple(r, e, t) + : this.visitSingle(e, t) + : !1 + }), + e + ) + })() + ;(t["default"] = g), (e.exports = t["default"]) + }, + function(e, t, r, n) { + "use strict" + var i = r(n)["default"] + t.__esModule = !0 + var s = function a(e, t) { + i(this, a), (this.file = e), (this.options = t) + } + ;(t["default"] = s), (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a, o, u, l, c, p, f, h, d, m, y, v, g, E) { + "use strict" + function b(e, t, r, n, i) { + if (e) { + if ( + (t || (t = {}), + !t.noScope && !r && "Program" !== e.type && "File" !== e.type) + ) + throw new Error(k.get("traverseNeedsParent", e.type)) + P.explode(t), b.node(e, t, r, n, i) + } + } + function x(e, t) { + e.node.type === t.type && ((t.has = !0), e.skip()) + } + var A = r(n)["default"], + D = (r(i)["default"], r(s)["default"]), + C = r(a)["default"], + S = r(o)["default"], + F = r(u)["default"] + ;(t.__esModule = !0), (t["default"] = b) + var w = r(l), + _ = C(w), + T = r(c), + P = S(T), + B = r(p), + k = S(B), + I = r(f), + O = C(I), + M = r(h), + R = S(M), + L = r(d) + t.NodePath = F(L) + var N = r(m) + t.Scope = F(N) + var j = r(y) + ;(t.Hub = F(j)), + (t.visitors = P), + (b.visitors = P), + (b.verify = P.verify), + (b.explode = P.explode), + (b.NodePath = r(v)), + (b.Scope = r(g)), + (b.Hub = r(E)), + (b.cheap = function(e, t) { + if (e) { + var r = R.VISITOR_KEYS[e.type] + if (r) { + t(e) + for (var n = r, i = Array.isArray(n), s = 0, n = i ? n : A(n); ; ) { + var a + if (i) { + if (s >= n.length) break + a = n[s++] + } else { + if (((s = n.next()), s.done)) break + a = s.value + } + var o = a, + u = e[o] + if (Array.isArray(u)) + for ( + var l = u, + c = Array.isArray(l), + p = 0, + l = c ? l : A(l); + ; + + ) { + var f + if (c) { + if (p >= l.length) break + f = l[p++] + } else { + if (((p = l.next()), p.done)) break + f = p.value + } + var h = f + b.cheap(h, t) + } + else b.cheap(u, t) + } + } + } + }), + (b.node = function(e, t, r, n, i, s) { + var a = R.VISITOR_KEYS[e.type] + if (a) + for (var o = new _["default"](r, t, n, i), u = 0; u < a.length; u++) { + var l = a[u] + if ((!s || !s[l]) && o.visit(e, l)) return + } + }) + var U = R.COMMENT_KEYS.concat([ + "tokens", + "comments", + "start", + "end", + "loc", + "raw", + "rawValue" + ]) + ;(b.clearNode = function(e) { + for (var t = 0; t < U.length; t++) { + var r = U[t] + null != e[r] && (e[r] = void 0) + } + for (var r in e) "_" === r[0] && null != e[r] && (e[r] = void 0) + for (var n = D(e), i = 0; i < n.length; i++) { + var s = n[i] + e[s] = null + } + }), + (b.removeProperties = function(e) { + return b.cheap(e, b.clearNode), e + }), + (b.hasType = function(e, t, r, n) { + if (O["default"](n, e.type)) return !1 + if (e.type === r) return !0 + var i = { has: !1, type: r } + return b(e, { blacklist: n, enter: x }, t, i), i.has + }) + }, + function(e, t, r, n, i, s, a) { + "use strict" + function o(e) { + for (var t = this; (t = t.parentPath); ) if (e(t)) return t + return null + } + function u(e) { + var t = this + do if (e(t)) return t + while ((t = t.parentPath)) + return null + } + function l() { + return this.findParent(function(e) { + return e.isFunction() || e.isProgram() + }) + } + function c() { + var e = this + do if (Array.isArray(e.container)) return e + while ((e = e.parentPath)) + } + function p(e) { + return this.getDeepestCommonAncestorFrom(e, function(e, t, r) { + for ( + var n = void 0, i = E.VISITOR_KEYS[e.type], s = r, a = 0; + a < s.length; + a++ + ) { + var o = s[a], + u = o[t + 1] + if (n) + if (u.listKey && n.listKey === u.listKey && u.key < n.key) n = u + else { + var l = i.indexOf(n.parentKey), + c = i.indexOf(u.parentKey) + l > c && (n = u) + } + else n = u + } + return n + }) + } + function f(e, t) { + var r = this + if (!e.length) return this + if (1 === e.length) return e[0] + var n = 1 / 0, + i = void 0, + s = void 0, + a = e.map(function(e) { + var t = [] + do t.unshift(e) + while ((e = e.parentPath) && e !== r) + return t.length < n && (n = t.length), t + }), + o = a[0] + e: for (var u = 0; n > u; u++) { + for (var l = o[u], c = a, p = 0; p < c.length; p++) { + var f = c[p] + if (f[u] !== l) break e + } + ;(i = u), (s = l) + } + if (s) return t ? t(s, i, a) : s + throw new Error("Couldn't find intersection") + } + function h() { + var e = this, + t = [] + do t.push(e) + while ((e = e.parentPath)) + return t + } + function d() { + for (var e = this; e; ) { + for (var t = arguments, r = 0; r < t.length; r++) { + var n = t[r] + if (e.node.type === n) return !0 + } + e = e.parentPath + } + return !1 + } + function m(e) { + var t = this + do + if (t.isFunction()) { + var r = t.node.shadow + if (r) { + if (!e || r[e] !== !1) return t + } else if (t.isArrowFunctionExpression()) return t + return null + } + while ((t = t.parentPath)) + return null + } + var y = r(n)["default"], + v = r(i)["default"] + ;(t.__esModule = !0), + (t.findParent = o), + (t.find = u), + (t.getFunctionParent = l), + (t.getStatementParent = c), + (t.getEarliestCommonAncestorFrom = p), + (t.getDeepestCommonAncestorFrom = f), + (t.getAncestry = h), + (t.inType = d), + (t.inShadow = m) + var g = r(s), + E = y(g), + b = r(a) + v(b) + }, + function(e, t, r, n, i, s) { + "use strict" + function a(e) { + var t = this.opts + return ( + this.debug(function() { + return e + }), + this.node && this._call(t[e]) + ? !0 + : this.node + ? this._call(t[this.node.type] && t[this.node.type][e]) + : !1 + ) + } + function o(e) { + if (!e) return !1 + for (var t = 0; t < e.length; t++) { + var r = e[t] + if (r) { + var n = this.node + if (!n) return !0 + var i = r.call(this.state, this, this.state) + if (i) + throw new Error("Unexpected return value from visitor method " + r) + if (this.node !== n) return !0 + if (this.shouldStop || this.shouldSkip || this.removed) return !0 + } + } + return !1 + } + function u() { + var e = this.opts.blacklist + return e && e.indexOf(this.node.type) > -1 + } + function l() { + return this.node + ? this.isBlacklisted() + ? !1 + : this.opts.shouldSkip && this.opts.shouldSkip(this) + ? !1 + : this.call("enter") || this.shouldSkip + ? (this.debug(function() { + return "Skip..." + }), + this.shouldStop) + : (this.debug(function() { + return "Recursing into..." + }), + T["default"].node( + this.node, + this.opts, + this.scope, + this.state, + this, + this.skipKeys + ), + this.call("exit"), + this.shouldStop) + : !1 + } + function c() { + this.shouldSkip = !0 + } + function p(e) { + this.skipKeys[e] = !0 + } + function f() { + ;(this.shouldStop = !0), (this.shouldSkip = !0) + } + function h() { + if (!this.opts || !this.opts.noScope) { + var e = this.context && this.context.scope + if (!e) + for (var t = this.parentPath; t && !e; ) { + if (t.opts && t.opts.noScope) return + ;(e = t.scope), (t = t.parentPath) + } + ;(this.scope = this.getScope(e)), this.scope && this.scope.init() + } + } + function d(e) { + return ( + (this.shouldSkip = !1), + (this.shouldStop = !1), + (this.removed = !1), + (this.skipKeys = {}), + e && ((this.context = e), (this.state = e.state), (this.opts = e.opts)), + this.setScope(), + this + ) + } + function m() { + this.removed || (this._resyncParent(), this._resyncList(), this._resyncKey()) + } + function y() { + this.parentPath && (this.parent = this.parentPath.node) + } + function v() { + if (this.container && this.node !== this.container[this.key]) { + if (Array.isArray(this.container)) { + for (var e = 0; e < this.container.length; e++) + if (this.container[e] === this.node) return this.setKey(e) + } else + for (var t in this.container) + if (this.container[t] === this.node) return this.setKey(t) + this.key = null + } + } + function g() { + if (this.parent && this.inList) { + var e = this.parent[this.listKey] + this.container !== e && (this.container = e || null) + } + } + function E() { + ;(null != this.key && + this.container && + this.container[this.key] === this.node) || + this._markRemoved() + } + function b() { + this.contexts.pop(), this.setContext(this.contexts[this.contexts.length - 1]) + } + function x(e) { + this.contexts.push(e), this.setContext(e) + } + function A(e, t, r, n) { + ;(this.inList = !!r), + (this.listKey = r), + (this.parentKey = r || n), + (this.container = t), + (this.parentPath = e || this.parentPath), + this.setKey(n) + } + function D(e) { + ;(this.key = e), + (this.node = this.container[this.key]), + (this.type = this.node && this.node.type) + } + function C() { + var e = arguments.length <= 0 || void 0 === arguments[0] ? this : arguments[0] + if (!e.removed) + for ( + var t = this.contexts, + r = t, + n = Array.isArray(r), + i = 0, + r = n ? r : F(r); + ; + + ) { + var s + if (n) { + if (i >= r.length) break + s = r[i++] + } else { + if (((i = r.next()), i.done)) break + s = i.value + } + var a = s + a.maybeQueue(e) + } + } + function S() { + for (var e = this, t = this.contexts; !t.length; ) + (e = e.parentPath), (t = e.contexts) + return t + } + var F = r(n)["default"], + w = r(i)["default"] + ;(t.__esModule = !0), + (t.call = a), + (t._call = o), + (t.isBlacklisted = u), + (t.visit = l), + (t.skip = c), + (t.skipKey = p), + (t.stop = f), + (t.setScope = h), + (t.setContext = d), + (t.resync = m), + (t._resyncParent = y), + (t._resyncKey = v), + (t._resyncList = g), + (t._resyncRemoved = E), + (t.popContext = b), + (t.pushContext = x), + (t.setup = A), + (t.setKey = D), + (t.requeue = C), + (t._getQueueContexts = S) + var _ = r(s), + T = w(_) + }, + function(e, t, r, n, i) { + "use strict" + function s() { + var e = this.node, + t = void 0 + if (this.isMemberExpression()) t = e.property + else { + if (!this.isProperty() && !this.isMethod()) throw new ReferenceError("todo") + t = e.key + } + return e.computed || (c.isIdentifier(t) && (t = c.stringLiteral(t.name))), t + } + function a() { + return c.ensureBlock(this.node) + } + function o() { + if (this.isArrowFunctionExpression()) { + this.ensureBlock() + var e = this.node + ;(e.expression = !1), + (e.type = "FunctionExpression"), + (e.shadow = e.shadow || !0) + } + } + var u = r(n)["default"] + ;(t.__esModule = !0), + (t.toComputedKey = s), + (t.ensureBlock = a), + (t.arrowFunctionToShadowed = o) + var l = r(i), + c = u(l) + }, + function(e, t, r, n, i, s, a) { + "use strict" + function o() { + var e = this + do { + if (!e.parentPath || (Array.isArray(e.container) && e.isStatement())) break + e = e.parentPath + } while (e) + if (e && (e.isProgram() || e.isFile())) + throw new Error( + "File/Program node, we can't possibly find a statement parent to this" + ) + return e + } + function u() { + return "left" === this.key + ? this.getSibling("right") + : "right" === this.key + ? this.getSibling("left") + : void 0 + } + function l() { + var e = [], + t = function(t) { + t && (e = e.concat(t.getCompletionRecords())) + } + if (this.isIfStatement()) t(this.get("consequent")), t(this.get("alternate")) + else if (this.isDoExpression() || this.isFor() || this.isWhile()) + t(this.get("body")) + else if (this.isProgram() || this.isBlockStatement()) t(this.get("body").pop()) + else { + if (this.isFunction()) return this.get("body").getCompletionRecords() + this.isTryStatement() + ? (t(this.get("block")), + t(this.get("handler")), + t(this.get("finalizer"))) + : e.push(this) + } + return e + } + function c(e) { + return E["default"].get({ + parentPath: this.parentPath, + parent: this.parent, + container: this.container, + listKey: this.listKey, + key: e + }) + } + function p(e, t) { + t === !0 && (t = this.context) + var r = e.split(".") + return 1 === r.length ? this._getKey(e, t) : this._getPattern(r, t) + } + function f(e, t) { + var r = this, + n = this.node, + i = n[e] + return Array.isArray(i) + ? i.map(function(s, a) { + return E["default"] + .get({ + listKey: e, + parentPath: r, + parent: n, + container: i, + key: a + }) + .setContext(t) + }) + : E["default"] + .get({ parentPath: this, parent: n, container: n, key: e }) + .setContext(t) + } + function h(e, t) { + for (var r = this, n = e, i = 0; i < n.length; i++) { + var s = n[i] + r = "." === s ? r.parentPath : Array.isArray(r) ? r[s] : r.get(s, t) + } + return r + } + function d(e) { + return x.getBindingIdentifiers(this.node, e) + } + function m(e) { + return x.getOuterBindingIdentifiers(this.node, e) + } + var y = r(n)["default"], + v = r(i)["default"] + ;(t.__esModule = !0), + (t.getStatementParent = o), + (t.getOpposite = u), + (t.getCompletionRecords = l), + (t.getSibling = c), + (t.get = p), + (t._getKey = f), + (t._getPattern = h), + (t.getBindingIdentifiers = d), + (t.getOuterBindingIdentifiers = m) + var g = r(s), + E = y(g), + b = r(a), + x = v(b) + }, + function(e, t, r, n, i, s, a, o, u, l, c, p, f, h, d, m, y, v, g, E, b, x, A, D, C) { + "use strict" + var S = r(n)["default"], + F = r(i)["default"], + w = r(s)["default"] + t.__esModule = !0 + var _ = r(a), + T = F(_), + P = r(o), + B = w(P), + k = r(u), + I = r(l), + O = w(I), + M = r(c), + R = w(M), + L = r(p), + N = w(L), + j = r(f), + U = w(j), + V = r(h), + G = F(V), + W = B["default"]("babel"), + q = (function() { + function e(t, r) { + S(this, e), + (this.parent = r), + (this.hub = t), + (this.contexts = []), + (this.data = {}), + (this.shouldSkip = !1), + (this.shouldStop = !1), + (this.removed = !1), + (this.state = null), + (this.opts = null), + (this.skipKeys = null), + (this.parentPath = null), + (this.context = null), + (this.container = null), + (this.listKey = null), + (this.inList = !1), + (this.parentKey = null), + (this.key = null), + (this.node = null), + (this.scope = null), + (this.type = null), + (this.typeAnnotation = null) + } + return ( + (e.get = function(t) { + var r = t.hub, + n = t.parentPath, + i = t.parent, + s = t.container, + a = t.listKey, + o = t.key + !r && n && (r = n.hub), + O["default"](i, "To get a node path the parent needs to exist") + for ( + var u = s[o], + l = (i[k.PATH_CACHE_KEY] = i[k.PATH_CACHE_KEY] || []), + c = void 0, + p = 0; + p < l.length; + p++ + ) { + var f = l[p] + if (f.node === u) { + c = f + break + } + } + if (c && !(c instanceof e)) { + if ("NodePath" !== c.constructor.name) + throw new Error( + "We found a path that isn't a NodePath instance. Possiblly due to bad serialisation." + ) + c = null + } + return c || ((c = new e(r, i)), l.push(c)), c.setup(n, s, a, o), c + }), + (e.prototype.getScope = function(e) { + var t = e + return this.isScope() && (t = new U["default"](this, e)), t + }), + (e.prototype.setData = function(e, t) { + return (this.data[e] = t) + }), + (e.prototype.getData = function(e, t) { + var r = this.data[e] + return !r && t && (r = this.data[e] = t), r + }), + (e.prototype.buildCodeFrameError = function(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? SyntaxError + : arguments[1] + return this.hub.file.buildCodeFrameError(this.node, e, t) + }), + (e.prototype.traverse = function(e, t) { + R["default"](this.node, e, this.scope, t, this) + }), + (e.prototype.mark = function(e, t) { + this.hub.file.metadata.marked.push({ + type: e, + message: t, + loc: this.node.loc + }) + }), + (e.prototype.set = function(e, t) { + G.validate(this.node, e, t), (this.node[e] = t) + }), + (e.prototype.getPathLocation = function() { + var e = [], + t = this + do { + var r = t.key + t.inList && (r = t.listKey + "[" + r + "]"), e.unshift(r) + } while ((t = t.parentPath)) + return e.join(".") + }), + (e.prototype.debug = function(e) { + W.enabled && + W(this.getPathLocation() + " " + this.type + ": " + e()) + }), + e + ) + })() + ;(t["default"] = q), + N["default"](q.prototype, r(d)), + N["default"](q.prototype, r(m)), + N["default"](q.prototype, r(y)), + N["default"](q.prototype, r(v)), + N["default"](q.prototype, r(g)), + N["default"](q.prototype, r(E)), + N["default"](q.prototype, r(b)), + N["default"](q.prototype, r(x)), + N["default"](q.prototype, r(A)), + N["default"](q.prototype, r(D)), + N["default"](q.prototype, r(C)) + for ( + var H = G.TYPES, + Y = function() { + var e = H[J], + t = "is" + e + ;(q.prototype[t] = function(e) { + return G[t](this.node, e) + }), + (q.prototype["assert" + e] = function(r) { + if (!this[t](r)) + throw new TypeError("Expected node path of type " + e) + }) + }, + J = 0; + J < H.length; + J++ + ) + Y() + var K = function(e) { + if ("_" === e[0]) return "continue" + G.TYPES.indexOf(e) < 0 && G.TYPES.push(e) + var t = T[e] + q.prototype["is" + e] = function(e) { + return t.checkPath(this, e) + } + } + for (var X in T) { + K(X) + } + e.exports = t["default"] + }, + function(e, t, r, n, i, s) { + "use strict" + function a() { + if (this.typeAnnotation) return this.typeAnnotation + var e = this._getTypeAnnotation() || v.anyTypeAnnotation() + return ( + v.isTypeAnnotation(e) && (e = e.typeAnnotation), (this.typeAnnotation = e) + ) + } + function o() { + var e = this.node + { + if (e) { + if (e.typeAnnotation) return e.typeAnnotation + var t = m[e.type] + return t + ? t.call(this, e) + : ((t = m[this.parentPath.type]), + t && t.validParent ? this.parentPath.getTypeAnnotation() : void 0) + } + if ("init" === this.key && this.parentPath.isVariableDeclarator()) { + var r = this.parentPath.parentPath, + n = r.parentPath + return "left" === r.key && n.isForInStatement() + ? v.stringTypeAnnotation() + : "left" === r.key && n.isForOfStatement() + ? v.anyTypeAnnotation() + : v.voidTypeAnnotation() + } + } + } + function u(e, t) { + return l(e, this.getTypeAnnotation(), t) + } + function l(e, t, r) { + if ("string" === e) return v.isStringTypeAnnotation(t) + if ("number" === e) return v.isNumberTypeAnnotation(t) + if ("boolean" === e) return v.isBooleanTypeAnnotation(t) + if ("any" === e) return v.isAnyTypeAnnotation(t) + if ("mixed" === e) return v.isMixedTypeAnnotation(t) + if ("void" === e) return v.isVoidTypeAnnotation(t) + if (r) return !1 + throw new Error("Unknown base type " + e) + } + function c(e) { + var t = this.getTypeAnnotation() + if (v.isAnyTypeAnnotation(t)) return !0 + if (v.isUnionTypeAnnotation(t)) { + for (var r = t.types, n = 0; n < r.length; n++) { + var i = r[n] + if (v.isAnyTypeAnnotation(i) || l(e, i, !0)) return !0 + } + return !1 + } + return l(e, t, !0) + } + function p(e) { + var t = this.getTypeAnnotation() + return ( + (e = e.getTypeAnnotation()), + !v.isAnyTypeAnnotation(t) && v.isFlowBaseAnnotation(t) + ? e.type === t.type + : void 0 + ) + } + function f(e) { + var t = this.getTypeAnnotation() + return v.isGenericTypeAnnotation(t) && v.isIdentifier(t.id, { name: e }) + } + var h = r(n)["default"] + ;(t.__esModule = !0), + (t.getTypeAnnotation = a), + (t._getTypeAnnotation = o), + (t.isBaseType = u), + (t.couldBeBaseType = c), + (t.baseTypeStrictlyMatches = p), + (t.isGenericType = f) + var d = r(i), + m = h(d), + y = r(s), + v = h(y) + }, + function(e, t, r, n, i) { + "use strict" + function s(e, t) { + var r = e.scope.getBinding(t), + n = [] + e.typeAnnotation = f.unionTypeAnnotation(n) + var i = [], + s = a(r, e, i), + o = l(e, t) + if ( + (o && + !(function() { + var e = a(r, o.ifStatement) + ;(s = s.filter(function(t) { + return e.indexOf(t) < 0 + })), + n.push(o.typeAnnotation) + })(), + s.length) + ) { + s = s.concat(i) + for (var u = s, c = 0; c < u.length; c++) { + var p = u[c] + n.push(p.getTypeAnnotation()) + } + } + return n.length ? f.createUnionTypeAnnotation(n) : void 0 + } + function a(e, t, r) { + var n = e.constantViolations.slice() + return ( + n.unshift(e.path), + n.filter(function(e) { + e = e.resolve() + var n = e._guessExecutionStatusRelativeTo(t) + return r && "function" === n && r.push(e), "before" === n + }) + ) + } + function o(e, t) { + var r = t.node.operator, + n = t.get("right").resolve(), + i = t.get("left").resolve(), + s = void 0 + if ( + (i.isIdentifier({ name: e }) + ? (s = n) + : n.isIdentifier({ name: e }) && (s = i), + s) + ) + return "===" === r + ? s.getTypeAnnotation() + : f.BOOLEAN_NUMBER_BINARY_OPERATORS.indexOf(r) >= 0 + ? f.numberTypeAnnotation() + : void 0 + if ("===" === r) { + var a = void 0, + o = void 0 + if ( + (i.isUnaryExpression({ operator: "typeof" }) + ? ((a = i), (o = n)) + : n.isUnaryExpression({ operator: "typeof" }) && ((a = n), (o = i)), + (o || a) && ((o = o.resolve()), o.isLiteral())) + ) { + var u = o.node.value + if ("string" == typeof u && a.get("argument").isIdentifier({ name: e })) + return f.createTypeAnnotationBasedOnTypeof(o.node.value) + } + } + } + function u(e) { + for (var t = void 0; (t = e.parentPath); ) { + if (t.isIfStatement() || t.isConditionalExpression()) + return "test" === e.key ? void 0 : t + e = t + } + } + function l(e, t) { + var r = u(e) + if (r) { + var n = r.get("test"), + i = [n], + s = [] + do { + var a = i.shift().resolve() + if ( + (a.isLogicalExpression() && + (i.push(a.get("left")), i.push(a.get("right"))), + a.isBinaryExpression()) + ) { + var c = o(t, a) + c && s.push(c) + } + } while (i.length) + return s.length + ? { typeAnnotation: f.createUnionTypeAnnotation(s), ifStatement: r } + : l(r, t) + } + } + var c = r(n)["default"] + t.__esModule = !0 + var p = r(i), + f = c(p) + ;(t["default"] = function(e) { + if (this.isReferenced()) { + var t = this.scope.getBinding(e.name) + return t + ? t.identifier.typeAnnotation + ? t.identifier.typeAnnotation + : s(this, e.name) + : "undefined" === e.name + ? f.voidTypeAnnotation() + : "NaN" === e.name || "Infinity" === e.name + ? f.numberTypeAnnotation() + : void ("arguments" === e.name) + } + }), + (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a) { + "use strict" + function o() { + var e = this.get("id") + return e.isIdentifier() ? this.get("init").getTypeAnnotation() : void 0 + } + function u(e) { + return e.typeAnnotation + } + function l(e) { + return this.get("callee").isIdentifier() + ? I.genericTypeAnnotation(e.callee) + : void 0 + } + function c() { + return I.stringTypeAnnotation() + } + function p(e) { + var t = e.operator + return "void" === t + ? I.voidTypeAnnotation() + : I.NUMBER_UNARY_OPERATORS.indexOf(t) >= 0 + ? I.numberTypeAnnotation() + : I.STRING_UNARY_OPERATORS.indexOf(t) >= 0 + ? I.stringTypeAnnotation() + : I.BOOLEAN_UNARY_OPERATORS.indexOf(t) >= 0 + ? I.booleanTypeAnnotation() + : void 0 + } + function f(e) { + var t = e.operator + if (I.NUMBER_BINARY_OPERATORS.indexOf(t) >= 0) return I.numberTypeAnnotation() + if (I.BOOLEAN_BINARY_OPERATORS.indexOf(t) >= 0) return I.booleanTypeAnnotation() + if ("+" === t) { + var r = this.get("right"), + n = this.get("left") + return n.isBaseType("number") && r.isBaseType("number") + ? I.numberTypeAnnotation() + : n.isBaseType("string") || r.isBaseType("string") + ? I.stringTypeAnnotation() + : I.unionTypeAnnotation([ + I.stringTypeAnnotation(), + I.numberTypeAnnotation() + ]) + } + } + function h() { + return I.createUnionTypeAnnotation([ + this.get("left").getTypeAnnotation(), + this.get("right").getTypeAnnotation() + ]) + } + function d() { + return I.createUnionTypeAnnotation([ + this.get("consequent").getTypeAnnotation(), + this.get("alternate").getTypeAnnotation() + ]) + } + function m() { + return this.get("expressions") + .pop() + .getTypeAnnotation() + } + function y() { + return this.get("right").getTypeAnnotation() + } + function v(e) { + var t = e.operator + return "++" === t || "--" === t ? I.numberTypeAnnotation() : void 0 + } + function g() { + return I.stringTypeAnnotation() + } + function E() { + return I.numberTypeAnnotation() + } + function b() { + return I.booleanTypeAnnotation() + } + function x() { + return I.nullLiteralTypeAnnotation() + } + function A() { + return I.genericTypeAnnotation(I.identifier("RegExp")) + } + function D() { + return I.genericTypeAnnotation(I.identifier("Object")) + } + function C() { + return I.genericTypeAnnotation(I.identifier("Array")) + } + function S() { + return C() + } + function F() { + return I.genericTypeAnnotation(I.identifier("Function")) + } + function w() { + return T(this.get("callee")) + } + function _() { + return T(this.get("tag")) + } + function T(e) { + if (((e = e.resolve()), e.isFunction())) { + if (e.is("async")) + return e.is("generator") + ? I.genericTypeAnnotation(I.identifier("AsyncIterator")) + : I.genericTypeAnnotation(I.identifier("Promise")) + if (e.node.returnType) return e.node.returnType + } + } + var P = r(n)["default"], + B = r(i)["default"] + ;(t.__esModule = !0), + (t.VariableDeclarator = o), + (t.TypeCastExpression = u), + (t.NewExpression = l), + (t.TemplateLiteral = c), + (t.UnaryExpression = p), + (t.BinaryExpression = f), + (t.LogicalExpression = h), + (t.ConditionalExpression = d), + (t.SequenceExpression = m), + (t.AssignmentExpression = y), + (t.UpdateExpression = v), + (t.StringLiteral = g), + (t.NumericLiteral = E), + (t.BooleanLiteral = b), + (t.NullLiteral = x), + (t.RegExpLiteral = A), + (t.ObjectExpression = D), + (t.ArrayExpression = C), + (t.RestElement = S), + (t.CallExpression = w), + (t.TaggedTemplateExpression = _) + var k = r(s), + I = P(k), + O = r(a) + ;(t.Identifier = B(O)), + (u.validParent = !0), + (S.validParent = !0), + (t.Function = F), + (t.Class = F) + }, + function(e, t, r, n, i, s, a) { + "use strict" + function o(e, t) { + function r(e) { + var t = n[s] + return "*" === t || e === t + } + if (!this.isMemberExpression()) return !1 + for (var n = e.split("."), i = [this.node], s = 0; i.length; ) { + var a = i.shift() + if (t && s === n.length) return !0 + if (T.isIdentifier(a)) { + if (!r(a.name)) return !1 + } else if (T.isLiteral(a)) { + if (!r(a.value)) return !1 + } else { + if (T.isMemberExpression(a)) { + if (a.computed && !T.isLiteral(a.property)) return !1 + i.unshift(a.property), i.unshift(a.object) + continue + } + if (!T.isThisExpression(a)) return !1 + if (!r("this")) return !1 + } + if (++s > n.length) return !1 + } + return s === n.length + } + function u(e) { + var t = this.node && this.node[e] + return t && Array.isArray(t) ? !!t.length : !!t + } + function l() { + return this.scope.isStatic(this.node) + } + function c(e) { + return !this.has(e) + } + function p(e, t) { + return this.node[e] === t + } + function f(e) { + return T.isType(this.type, e) + } + function h() { + return ("init" === this.key || "left" === this.key) && this.parentPath.isFor() + } + function d(e) { + return "body" === this.key && this.parentPath.isArrowFunctionExpression() + ? this.isExpression() + ? T.isBlockStatement(e) + : this.isBlockStatement() + ? T.isExpression(e) + : !1 + : !1 + } + function m(e) { + var t = this, + r = !0 + do { + var n = t.container + if (t.isFunction() && !r) return !!e + if (((r = !1), Array.isArray(n) && t.key !== n.length - 1)) return !1 + } while ((t = t.parentPath) && !t.isProgram()) + return !0 + } + function y() { + return this.parentPath.isLabeledStatement() || + T.isBlockStatement(this.container) + ? !1 + : w["default"](T.STATEMENT_OR_BLOCK_KEYS, this.key) + } + function v(e, t) { + if (!this.isReferencedIdentifier()) return !1 + var r = this.scope.getBinding(this.node.name) + if (!r || "module" !== r.kind) return !1 + var n = r.path, + i = n.parentPath + return i.isImportDeclaration() + ? i.node.source.value !== e + ? !1 + : t + ? n.isImportDefaultSpecifier() && "default" === t + ? !0 + : n.isImportNamespaceSpecifier() && "*" === t + ? !0 + : !(!n.isImportSpecifier() || n.node.imported.name !== t) + : !0 + : !1 + } + function g() { + var e = this.node + return e.end ? this.hub.file.code.slice(e.start, e.end) : "" + } + function E(e) { + return "after" !== this._guessExecutionStatusRelativeTo(e) + } + function b(e) { + var t = e.scope.getFunctionParent(), + r = this.scope.getFunctionParent() + if (t.node !== r.node) { + var n = this._guessExecutionStatusRelativeToDifferentFunctions(t) + if (n) return n + e = t.path + } + var i = e.getAncestry() + if (i.indexOf(this) >= 0) return "after" + var s = this.getAncestry(), + a = void 0, + o = void 0, + u = void 0 + for (u = 0; u < s.length; u++) { + var l = s[u] + if (((o = i.indexOf(l)), o >= 0)) { + a = l + break + } + } + if (!a) return "before" + var c = i[o - 1], + p = s[u - 1] + if (!c || !p) return "before" + if (c.listKey && c.container === p.container) + return c.key > p.key ? "before" : "after" + var f = T.VISITOR_KEYS[c.type].indexOf(c.key), + h = T.VISITOR_KEYS[p.type].indexOf(p.key) + return f > h ? "before" : "after" + } + function x(e) { + var t = e.path + if (t.isFunctionDeclaration()) { + var r = t.scope.getBinding(t.node.id.name) + if (!r.references) return "before" + for (var n = r.referencePaths, i = 0; i < n.length; i++) { + var s = n[i] + if ("callee" !== s.key || !s.parentPath.isCallExpression()) return + } + for (var a = void 0, o = 0; o < n.length; o++) { + var s = n[o], + u = !!s.find(function(e) { + return e.node === t.node + }) + if (!u) { + var l = this._guessExecutionStatusRelativeTo(s) + if (a) { + if (a !== l) return + } else a = l + } + } + return a + } + } + function A(e, t) { + return this._resolve(e, t) || this + } + function D(e, t) { + var r = this + if (!(t && t.indexOf(this) >= 0)) + if (((t = t || []), t.push(this), this.isVariableDeclarator())) { + if (this.get("id").isIdentifier()) return this.get("init").resolve(e, t) + } else if (this.isReferencedIdentifier()) { + var n = this.scope.getBinding(this.node.name) + if (!n) return + if (!n.constant) return + if ("module" === n.kind) return + if (n.path !== this) { + var i = (function() { + var i = n.path.resolve(e, t) + return r.find(function(e) { + return e.node === i.node + }) + ? { v: void 0 } + : { v: i } + })() + if ("object" == typeof i) return i.v + } + } else { + if (this.isTypeCastExpression()) + return this.get("expression").resolve(e, t) + if (e && this.isMemberExpression()) { + var s = this.toComputedKey() + if (!T.isLiteral(s)) return + var a = s.value, + o = this.get("object").resolve(e, t) + if (o.isObjectExpression()) + for ( + var u = o.get("properties"), l = u, c = 0; + c < l.length; + c++ + ) { + var p = l[c] + if (p.isProperty()) { + var f = p.get("key"), + h = + p.isnt("computed") && + f.isIdentifier({ name: a }) + if ((h = h || f.isLiteral({ value: a }))) + return p.get("value").resolve(e, t) + } + } + else if (o.isArrayExpression() && !isNaN(+a)) { + var d = o.get("elements"), + m = d[a] + if (m) return m.resolve(e, t) + } + } + } + } + var C = r(n)["default"], + S = r(i)["default"] + ;(t.__esModule = !0), + (t.matchesPattern = o), + (t.has = u), + (t.isStatic = l), + (t.isnt = c), + (t.equals = p), + (t.isNodeType = f), + (t.canHaveVariableDeclarationOrExpression = h), + (t.canSwapBetweenExpressionAndStatement = d), + (t.isCompletionRecord = m), + (t.isStatementOrBlock = y), + (t.referencesImport = v), + (t.getSource = g), + (t.willIMaybeExecuteBefore = E), + (t._guessExecutionStatusRelativeTo = b), + (t._guessExecutionStatusRelativeToDifferentFunctions = x), + (t.resolve = A), + (t._resolve = D) + var F = r(s), + w = C(F), + _ = r(a), + T = S(_), + P = u + t.is = P + }, + function(e, t, r, n, i, s) { + "use strict" + var a = r(n)["default"], + o = r(i)["default"] + t.__esModule = !0 + var u = r(s), + l = o(u), + c = { + ReferencedIdentifier: function(e, t) { + if (!e.isJSXIdentifier() || !u.react.isCompatTag(e.node.name)) { + var r = e.scope.getBinding(e.node.name) + if (r && r === t.scope.getBinding(e.node.name)) + if (r.constant) t.bindings[e.node.name] = r + else + for ( + var n = r.constantViolations, i = 0; + i < n.length; + i++ + ) { + var s = n[i] + t.breakOnScopePaths = t.breakOnScopePaths.concat( + s.getAncestry() + ) + } + } + } + }, + p = (function() { + function e(t, r) { + a(this, e), + (this.breakOnScopePaths = []), + (this.bindings = {}), + (this.scopes = []), + (this.scope = r), + (this.path = t) + } + return ( + (e.prototype.isCompatibleScope = function(e) { + for (var t in this.bindings) { + var r = this.bindings[t] + if (!e.bindingIdentifierEquals(t, r.identifier)) return !1 + } + return !0 + }), + (e.prototype.getCompatibleScopes = function() { + var e = this.path.scope + do { + if (!this.isCompatibleScope(e)) break + if ( + (this.scopes.push(e), + this.breakOnScopePaths.indexOf(e.path) >= 0) + ) + break + } while ((e = e.parent)) + }), + (e.prototype.getAttachmentPath = function() { + var e = this.scopes, + t = e.pop() + if (t) { + if (t.path.isFunction()) { + if (this.hasOwnParamBindings(t)) { + if (this.scope === t) return + return t.path.get("body").get("body")[0] + } + return this.getNextScopeStatementParent() + } + return t.path.isProgram() + ? this.getNextScopeStatementParent() + : void 0 + } + }), + (e.prototype.getNextScopeStatementParent = function() { + var e = this.scopes.pop() + return e ? e.path.getStatementParent() : void 0 + }), + (e.prototype.hasOwnParamBindings = function(e) { + for (var t in this.bindings) + if (e.hasOwnBinding(t)) { + var r = this.bindings[t] + if ("param" === r.kind) return !0 + } + return !1 + }), + (e.prototype.run = function() { + var e = this.path.node + if (!e._hoisted) { + ;(e._hoisted = !0), + this.path.traverse(c, this), + this.getCompatibleScopes() + var t = this.getAttachmentPath() + if ( + t && + t.getFunctionParent() !== this.path.getFunctionParent() + ) { + var r = t.scope.generateUidIdentifier("ref") + t.insertBefore([ + l.variableDeclaration("var", [ + l.variableDeclarator(r, this.path.node) + ]) + ]) + var n = this.path.parentPath + n.isJSXElement() && + this.path.container === n.node.children && + (r = l.JSXExpressionContainer(r)), + this.path.replaceWith(r) + } + } + }), + e + ) + })() + ;(t["default"] = p), (e.exports = t["default"]) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"] + t.__esModule = !0 + var a = r(i), + o = s(a), + u = { + types: ["Identifier", "JSXIdentifier"], + checkPath: function(e, t) { + var r = e.node, + n = e.parent + if (!o.isIdentifier(r, t)) { + if (!o.isJSXIdentifier(r, t)) return !1 + if (a.react.isCompatTag(r.name)) return !1 + } + return o.isReferenced(r, n) + } + } + t.ReferencedIdentifier = u + var l = { + types: ["MemberExpression"], + checkPath: function(e) { + var t = e.node, + r = e.parent + return o.isMemberExpression(t) && o.isReferenced(t, r) + } + } + t.ReferencedMemberExpression = l + var c = { + types: ["Identifier"], + checkPath: function(e) { + var t = e.node, + r = e.parent + return o.isIdentifier(t) && o.isBinding(t, r) + } + } + t.BindingIdentifier = c + var p = { + types: ["Statement"], + checkPath: function(e) { + var t = e.node, + r = e.parent + if (o.isStatement(t)) { + if (o.isVariableDeclaration(t)) { + if (o.isForXStatement(r, { left: t })) return !1 + if (o.isForStatement(r, { init: t })) return !1 + } + return !0 + } + return !1 + } + } + t.Statement = p + var f = { + types: ["Expression"], + checkPath: function(e) { + return e.isIdentifier() + ? e.isReferencedIdentifier() + : o.isExpression(e.node) + } + } + t.Expression = f + var h = { + types: ["Scopable"], + checkPath: function(e) { + return o.isScope(e.node, e.parent) + } + } + t.Scope = h + var d = { + checkPath: function(e) { + return o.isReferenced(e.node, e.parent) + } + } + t.Referenced = d + var m = { + checkPath: function(e) { + return o.isBlockScoped(e.node) + } + } + t.BlockScoped = m + var y = { + types: ["VariableDeclaration"], + checkPath: function(e) { + return o.isVar(e.node) + } + } + t.Var = y + var v = { + checkPath: function(e) { + return e.node && !!e.node.loc + } + } + t.User = v + var g = { + checkPath: function(e) { + return !e.isUser() + } + } + t.Generated = g + var E = { + checkPath: function(e, t) { + return e.scope.isPure(e.node, t) + } + } + t.Pure = E + var b = { + types: ["Flow", "ImportDeclaration", "ExportDeclaration"], + checkPath: function(e) { + var t = e.node + return o.isFlow(t) + ? !0 + : o.isImportDeclaration(t) + ? "type" === t.importKind || "typeof" === t.importKind + : o.isExportDeclaration(t) + ? "type" === t.exportKind + : !1 + } + } + t.Flow = b + }, + function(e, t, r, n, i, s, a, o, u, l) { + "use strict" + function c(e) { + if ( + (this._assertUnremoved(), + (e = this._verifyNodeList(e)), + this.parentPath.isExpressionStatement() || + this.parentPath.isLabeledStatement()) + ) + return this.parentPath.insertBefore(e) + if ( + this.isNodeType("Expression") || + (this.parentPath.isForStatement() && "init" === this.key) + ) + this.node && e.push(this.node), this.replaceExpressionWithStatements(e) + else { + if ((this._maybePopFromStatements(e), Array.isArray(this.container))) + return this._containerInsertBefore(e) + if (!this.isStatementOrBlock()) + throw new Error( + "We don't know what to do with this node type. We were previously a Statement but we can't fit in here?" + ) + this.node && e.push(this.node), this._replaceWith(P.blockStatement(e)) + } + return [this] + } + function p(e, t) { + this.updateSiblingKeys(e, t.length) + for (var r = [], n = 0; n < t.length; n++) { + var i = e + n, + s = t[n] + if ((this.container.splice(i, 0, s), this.context)) { + var a = this.context.create( + this.parent, + this.container, + i, + this.listKey + ) + this.context.queue && a.pushContext(this.context), r.push(a) + } else + r.push( + _["default"].get({ + parentPath: this.parentPath, + parent: this.parent, + container: this.container, + listKey: this.listKey, + key: i + }) + ) + } + for ( + var o = this._getQueueContexts(), + u = r, + l = Array.isArray(u), + c = 0, + u = l ? u : x(u); + ; + + ) { + var p + if (l) { + if (c >= u.length) break + p = u[c++] + } else { + if (((c = u.next()), c.done)) break + p = c.value + } + var a = p + a.setScope(), + a.debug(function() { + return "Inserted." + }) + for (var f = o, h = Array.isArray(f), d = 0, f = h ? f : x(f); ; ) { + var m + if (h) { + if (d >= f.length) break + m = f[d++] + } else { + if (((d = f.next()), d.done)) break + m = d.value + } + var y = m + y.maybeQueue(a, !0) + } + } + return r + } + function f(e) { + return this._containerInsert(this.key, e) + } + function h(e) { + return this._containerInsert(this.key + 1, e) + } + function d(e) { + var t = e[e.length - 1], + r = + P.isIdentifier(t) || + (P.isExpressionStatement(t) && P.isIdentifier(t.expression)) + r && !this.isCompletionRecord() && e.pop() + } + function m(e) { + if ( + (this._assertUnremoved(), + (e = this._verifyNodeList(e)), + this.parentPath.isExpressionStatement() || + this.parentPath.isLabeledStatement()) + ) + return this.parentPath.insertAfter(e) + if ( + this.isNodeType("Expression") || + (this.parentPath.isForStatement() && "init" === this.key) + ) { + if (this.node) { + var t = this.scope.generateDeclaredUidIdentifier() + e.unshift( + P.expressionStatement(P.assignmentExpression("=", t, this.node)) + ), + e.push(P.expressionStatement(t)) + } + this.replaceExpressionWithStatements(e) + } else { + if ((this._maybePopFromStatements(e), Array.isArray(this.container))) + return this._containerInsertAfter(e) + if (!this.isStatementOrBlock()) + throw new Error( + "We don't know what to do with this node type. We were previously a Statement but we can't fit in here?" + ) + this.node && e.unshift(this.node), this._replaceWith(P.blockStatement(e)) + } + return [this] + } + function y(e, t) { + if (this.parent) + for (var r = this.parent[C.PATH_CACHE_KEY], n = 0; n < r.length; n++) { + var i = r[n] + i.key >= e && (i.key += t) + } + } + function v(e) { + if (!e) return [] + e.constructor !== Array && (e = [e]) + for (var t = 0; t < e.length; t++) { + var r = e[t], + n = void 0 + if ( + (r + ? "object" != typeof r + ? (n = "contains a non-object node") + : r.type + ? r instanceof _["default"] && + (n = "has a NodePath when it expected a raw object") + : (n = "without a type") + : (n = "has falsy node"), + n) + ) { + var i = Array.isArray(r) ? "array" : typeof r + throw new Error( + "Node list " + n + " with the index of " + t + " and type of " + i + ) + } + } + return e + } + function g(e, t) { + this._assertUnremoved(), (t = this._verifyNodeList(t)) + var r = _["default"].get({ + parentPath: this, + parent: this.node, + container: this.node[e], + listKey: e, + key: 0 + }) + return r.insertBefore(t) + } + function E(e, t) { + this._assertUnremoved(), (t = this._verifyNodeList(t)) + var r = this.node[e], + n = _["default"].get({ + parentPath: this, + parent: this.node, + container: r, + listKey: e, + key: r.length + }) + return n.replaceWithMultiple(t) + } + function b() { + var e = + arguments.length <= 0 || void 0 === arguments[0] + ? this.scope + : arguments[0], + t = new F["default"](this, e) + return t.run() + } + var x = r(n)["default"], + A = r(i)["default"], + D = r(s)["default"] + ;(t.__esModule = !0), + (t.insertBefore = c), + (t._containerInsert = p), + (t._containerInsertBefore = f), + (t._containerInsertAfter = h), + (t._maybePopFromStatements = d), + (t.insertAfter = m), + (t.updateSiblingKeys = y), + (t._verifyNodeList = v), + (t.unshiftContainer = g), + (t.pushContainer = E), + (t.hoist = b) + var C = r(a), + S = r(o), + F = A(S), + w = r(u), + _ = A(w), + T = r(l), + P = D(T) + }, + function(e, t, r, n) { + "use strict" + function i() { + return ( + this._assertUnremoved(), + this.resync(), + this._callRemovalHooks() + ? void this._markRemoved() + : (this.shareCommentsWithSiblings(), + this._remove(), + void this._markRemoved()) + ) + } + function s() { + for (var e = l.hooks, t = 0; t < e.length; t++) { + var r = e[t] + if (r(this, this.parentPath)) return !0 + } + } + function a() { + Array.isArray(this.container) + ? (this.container.splice(this.key, 1), this.updateSiblingKeys(this.key, -1)) + : this._replaceWith(null) + } + function o() { + ;(this.shouldSkip = !0), (this.removed = !0), (this.node = null) + } + function u() { + if (this.removed) + throw this.buildCodeFrameError("NodePath has been removed so is read-only.") + } + ;(t.__esModule = !0), + (t.remove = i), + (t._callRemovalHooks = s), + (t._remove = a), + (t._markRemoved = o), + (t._assertUnremoved = u) + var l = r(n) + }, + function(e, t, r, n, i, s, a, o, u, l) { + "use strict" + function c(e) { + this.resync(), + (e = this._verifyNodeList(e)), + F.inheritLeadingComments(e[0], this.node), + F.inheritTrailingComments(e[e.length - 1], this.node), + (this.node = this.container[this.key] = null), + this.insertAfter(e), + this.node ? this.requeue() : this.remove() + } + function p(e) { + this.resync() + try { + ;(e = "(" + e + ")"), (e = C.parse(e)) + } catch (t) { + var r = t.loc + throw (r && + ((t.message += " - make sure this is an expression."), + (t.message += "\n" + E["default"](e, r.line, r.column + 1))), + t) + } + return ( + (e = e.program.body[0].expression), + x["default"].removeProperties(e), + this.replaceWith(e) + ) + } + function f(e) { + if ((this.resync(), this.removed)) + throw new Error("You can't replace this node, we've already removed it") + if ((e instanceof D["default"] && (e = e.node), !e)) + throw new Error( + "You passed `path.replaceWith()` a falsy node, use `path.remove()` instead" + ) + if (this.node !== e) { + if (this.isProgram() && !F.isProgram(e)) + throw new Error( + "You can only replace a Program root node with another Program node" + ) + if (Array.isArray(e)) + throw new Error( + "Don't use `path.replaceWith()` with an array of nodes, use `path.replaceWithMultiple()`" + ) + if ("string" == typeof e) + throw new Error( + "Don't use `path.replaceWith()` with a source string, use `path.replaceWithSourceString()`" + ) + if ( + (this.isNodeType("Statement") && + F.isExpression(e) && + (this.canHaveVariableDeclarationOrExpression() || + this.canSwapBetweenExpressionAndStatement(e) || + (e = F.expressionStatement(e))), + this.isNodeType("Expression") && + F.isStatement(e) && + !this.canHaveVariableDeclarationOrExpression() && + !this.canSwapBetweenExpressionAndStatement(e)) + ) + return this.replaceExpressionWithStatements([e]) + var t = this.node + t && (F.inheritsComments(e, t), F.removeComments(t)), + this._replaceWith(e), + (this.type = e.type), + this.setScope(), + this.requeue() + } + } + function h(e) { + if (!this.container) throw new ReferenceError("Container is falsy") + this.inList + ? F.validate(this.parent, this.key, [e]) + : F.validate(this.parent, this.key, e), + this.debug(function() { + return "Replace with " + (e && e.type) + }), + (this.node = this.container[this.key] = e) + } + function d(e) { + this.resync() + var t = F.toSequenceExpression(e, this.scope) + if (F.isSequenceExpression(t)) { + var r = t.expressions + r.length >= 2 && + this.parentPath.isExpressionStatement() && + this._maybePopFromStatements(r), + 1 === r.length ? this.replaceWith(r[0]) : this.replaceWith(t) + } else { + if (!t) { + var n = F.functionExpression(null, [], F.blockStatement(e)) + ;(n.shadow = !0), + this.replaceWith(F.callExpression(n, [])), + this.traverse(w) + for ( + var i = this.get("callee").getCompletionRecords(), s = 0; + s < i.length; + s++ + ) { + var a = i[s] + if (a.isExpressionStatement()) { + var o = a.findParent(function(e) { + return e.isLoop() + }) + if (o) { + var u = this.get("callee"), + l = u.scope.generateDeclaredUidIdentifier("ret") + u.get("body").pushContainer("body", F.returnStatement(l)), + a + .get("expression") + .replaceWith( + F.assignmentExpression( + "=", + l, + a.node.expression + ) + ) + } else a.replaceWith(F.returnStatement(a.node.expression)) + } + } + return this.node + } + this.replaceWith(t) + } + } + function m(e) { + return ( + this.resync(), + Array.isArray(e) + ? Array.isArray(this.container) + ? ((e = this._verifyNodeList(e)), + this._containerInsertAfter(e), + this.remove()) + : this.replaceWithMultiple(e) + : this.replaceWith(e) + ) + } + var y = r(n)["default"], + v = r(i)["default"] + ;(t.__esModule = !0), + (t.replaceWithMultiple = c), + (t.replaceWithSourceString = p), + (t.replaceWith = f), + (t._replaceWith = h), + (t.replaceExpressionWithStatements = d), + (t.replaceInline = m) + var g = r(s), + E = y(g), + b = r(a), + x = y(b), + A = r(o), + D = y(A), + C = r(u), + S = r(l), + F = v(S), + w = { + Function: function(e) { + e.skip() + }, + VariableDeclaration: function(e) { + if ("var" === e.node.kind) { + var t = e.getBindingIdentifiers() + for (var r in t) e.scope.push({ id: t[r] }) + for ( + var n = [], i = e.node.declarations, s = 0; + s < i.length; + s++ + ) { + var a = i[s] + a.init && + n.push( + F.expressionStatement( + F.assignmentExpression("=", a.id, a.init) + ) + ) + } + e.replaceWithMultiple(n) + } + } + } + }, + function(e, t, r, n) { + "use strict" + var i = r(n)["default"] + t.__esModule = !0 + var s = (function() { + function e(t) { + var r = t.existing, + n = t.identifier, + s = t.scope, + a = t.path, + o = t.kind + i(this, e), + (this.identifier = n), + (this.scope = s), + (this.path = a), + (this.kind = o), + (this.constantViolations = []), + (this.constant = !0), + (this.referencePaths = []), + (this.referenced = !1), + (this.references = 0), + this.clearValue(), + r && + (this.constantViolations = [].concat( + r.path, + r.constantViolations, + this.constantViolations + )) + } + return ( + (e.prototype.deoptValue = function() { + this.clearValue(), (this.hasDeoptedValue = !0) + }), + (e.prototype.setValue = function(e) { + this.hasDeoptedValue || ((this.hasValue = !0), (this.value = e)) + }), + (e.prototype.clearValue = function() { + ;(this.hasDeoptedValue = !1), (this.hasValue = !1), (this.value = null) + }), + (e.prototype.reassign = function(e) { + ;(this.constant = !1), this.constantViolations.push(e) + }), + (e.prototype.reference = function(e) { + ;(this.referenced = !0), this.references++, this.referencePaths.push(e) + }), + (e.prototype.dereference = function() { + this.references--, (this.referenced = !!this.references) + }), + e + ) + })() + ;(t["default"] = s), (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a, o, u, l, c, p, f, h, d, m, y, v, g, E) { + "use strict" + function b(e, t, r) { + var n = e[X] + if (n) { + if (x(n, t)) return n + } else if (!e[z]) return void (e[X] = r) + return A(e, t, r, n) + } + function x(e, t) { + return e.parent === t ? !0 : void 0 + } + function A(e, t, r, n) { + var i = (e[z] = e[z] || []) + n && (i.push(n), (e[X] = null)) + for (var s = 0; s < i.length; s++) { + var a = i[s] + if (x(a, t)) return a + } + i.push(r) + } + var D = r(n)["default"], + C = r(i)["default"], + S = r(s)["default"], + F = r(a)["default"], + w = r(o)["default"], + _ = r(u)["default"], + T = r(l)["default"], + P = r(c)["default"] + t.__esModule = !0 + var B = r(p), + k = T(B), + I = r(f), + O = T(I), + M = r(h), + R = T(M), + L = r(d), + N = T(L), + j = r(m), + U = T(j), + V = r(y), + G = P(V), + W = r(v), + q = T(W), + H = r(g), + Y = T(H), + J = r(E), + K = P(J), + X = S(), + z = S(), + $ = { + For: function(e) { + for (var t = K.FOR_INIT_KEYS, r = 0; r < t.length; r++) { + var n = t[r], + i = e.get(n) + i.isVar() && e.scope.getFunctionParent().registerBinding("var", i) + } + }, + Declaration: function(e) { + e.isBlockScoped() || + (e.isExportDeclaration() && e.get("declaration").isDeclaration()) || + e.scope.getFunctionParent().registerDeclaration(e) + }, + ReferencedIdentifier: function(e, t) { + t.references.push(e) + }, + ForXStatement: function(e, t) { + var r = e.get("left") + ;(r.isPattern() || r.isIdentifier()) && t.constantViolations.push(r) + }, + ExportDeclaration: { + exit: function(e) { + var t = e.node, + r = e.scope, + n = t.declaration + if (K.isClassDeclaration(n) || K.isFunctionDeclaration(n)) { + var i = n.id + if (!i) return + var s = r.getBinding(i.name) + s && s.reference() + } else if (K.isVariableDeclaration(n)) + for (var a = n.declarations, o = 0; o < a.length; o++) { + var u = a[o], + l = K.getBindingIdentifiers(u) + for (var c in l) { + var s = r.getBinding(c) + s && s.reference() + } + } + } + }, + LabeledStatement: function(e) { + e.scope.getProgramParent().addGlobal(e.node), + e.scope.getBlockParent().registerDeclaration(e) + }, + AssignmentExpression: function(e, t) { + t.assignments.push(e) + }, + UpdateExpression: function(e, t) { + t.constantViolations.push(e.get("argument")) + }, + UnaryExpression: function(e, t) { + "delete" === e.node.operator && + t.constantViolations.push(e.get("argument")) + }, + BlockScoped: function(e) { + var t = e.scope + t.path === e && (t = t.parent), + t.getBlockParent().registerDeclaration(e) + }, + ClassDeclaration: function(e) { + var t = e.node.id + if (t) { + var r = t.name + e.scope.bindings[r] = e.scope.getBinding(r) + } + }, + Block: function(e) { + for (var t = e.get("body"), r = t, n = 0; n < r.length; n++) { + var i = r[n] + i.isFunctionDeclaration() && + e.scope.getBlockParent().registerDeclaration(i) + } + } + }, + Q = 0, + Z = (function() { + function e(t, r) { + if ((C(this, e), r && r.block === t.node)) return r + var n = b(t.node, r, this) + return n + ? n + : ((this.uid = Q++), + (this.parent = r), + (this.hub = t.hub), + (this.parentBlock = t.parent), + (this.block = t.node), + void (this.path = t)) + } + return ( + (e.prototype.traverse = function(e, t, r) { + N["default"](e, t, this, r, this.path) + }), + (e.prototype.generateDeclaredUidIdentifier = function() { + var e = + arguments.length <= 0 || void 0 === arguments[0] + ? "temp" + : arguments[0], + t = this.generateUidIdentifier(e) + return this.push({ id: t }), t + }), + (e.prototype.generateUidIdentifier = function() { + var e = + arguments.length <= 0 || void 0 === arguments[0] + ? "temp" + : arguments[0] + return K.identifier(this.generateUid(e)) + }), + (e.prototype.generateUid = function() { + var e = + arguments.length <= 0 || void 0 === arguments[0] + ? "temp" + : arguments[0] + e = K.toIdentifier(e) + .replace(/^_+/, "") + .replace(/[0-9]+$/g, "") + var t = void 0, + r = 0 + do (t = this._generateUid(e, r)), r++ + while ( + this.hasBinding(t) || + this.hasGlobal(t) || + this.hasReference(t) + ) + var n = this.getProgramParent() + return (n.references[t] = !0), (n.uids[t] = !0), t + }), + (e.prototype._generateUid = function(e, t) { + var r = e + return t > 1 && (r += t), "_" + r + }), + (e.prototype.generateUidIdentifierBasedOnNode = function(e, t) { + var r = e + K.isAssignmentExpression(e) + ? (r = e.left) + : K.isVariableDeclarator(e) + ? (r = e.id) + : (K.isObjectProperty(r) || K.isObjectMethod(r)) && (r = r.key) + var n = [], + i = function a(e) { + if (K.isModuleDeclaration(e)) + if (e.source) a(e.source) + else if (e.specifiers && e.specifiers.length) + for ( + var t = e.specifiers, r = 0; + r < t.length; + r++ + ) { + var i = t[r] + a(i) + } + else e.declaration && a(e.declaration) + else if (K.isModuleSpecifier(e)) a(e.local) + else if (K.isMemberExpression(e)) a(e.object), a(e.property) + else if (K.isIdentifier(e)) n.push(e.name) + else if (K.isLiteral(e)) n.push(e.value) + else if (K.isCallExpression(e)) a(e.callee) + else if (K.isObjectExpression(e) || K.isObjectPattern(e)) + for (var s = e.properties, o = 0; o < s.length; o++) { + var u = s[o] + a(u.key || u.argument) + } + } + i(r) + var s = n.join("$") + return ( + (s = s.replace(/^_/, "") || t || "ref"), + this.generateUidIdentifier(s.slice(0, 20)) + ) + }), + (e.prototype.isStatic = function(e) { + if (K.isThisExpression(e) || K.isSuper(e)) return !0 + if (K.isIdentifier(e)) { + var t = this.getBinding(e.name) + return t ? t.constant : this.hasBinding(e.name) + } + return !1 + }), + (e.prototype.maybeGenerateMemoised = function(e, t) { + if (this.isStatic(e)) return null + var r = this.generateUidIdentifierBasedOnNode(e) + return t || this.push({ id: r }), r + }), + (e.prototype.checkBlockScopedCollisions = function(e, t, r, n) { + if ("param" !== t && ("hoisted" !== t || "let" !== e.kind)) { + var i = !1 + if ( + (i || + (i = + "let" === t || + "let" === e.kind || + "const" === e.kind || + "module" === e.kind), + i || + (i = + "param" === e.kind && + ("let" === t || "const" === t)), + i) + ) + throw this.hub.file.buildCodeFrameError( + n, + G.get("scopeDuplicateDeclaration", r), + TypeError + ) + } + }), + (e.prototype.rename = function(e, t, r) { + var n = this.getBinding(e) + return n + ? ((t = t || this.generateUidIdentifier(e).name), + new R["default"](n, e, t).rename(r)) + : void 0 + }), + (e.prototype._renameFromMap = function(e, t, r, n) { + e[t] && ((e[r] = n), (e[t] = null)) + }), + (e.prototype.dump = function() { + var e = O["default"]("-", 60) + console.log(e) + var t = this + do { + console.log("#", t.block.type) + for (var r in t.bindings) { + var n = t.bindings[r] + console.log(" -", r, { + constant: n.constant, + references: n.references, + violations: n.constantViolations.length, + kind: n.kind + }) + } + } while ((t = t.parent)) + console.log(e) + }), + (e.prototype.toArray = function(e, t) { + var r = this.hub.file + if (K.isIdentifier(e)) { + var n = this.getBinding(e.name) + if (n && n.constant && n.path.isGenericType("Array")) return e + } + if (K.isArrayExpression(e)) return e + if (K.isIdentifier(e, { name: "arguments" })) + return K.callExpression( + K.memberExpression( + K.memberExpression( + K.memberExpression( + K.identifier("Array"), + K.identifier("prototype") + ), + K.identifier("slice") + ), + K.identifier("call") + ), + [e] + ) + var i = "toArray", + s = [e] + return ( + t === !0 + ? (i = "toConsumableArray") + : t && (s.push(K.numericLiteral(t)), (i = "slicedToArray")), + K.callExpression(r.addHelper(i), s) + ) + }), + (e.prototype.registerDeclaration = function(e) { + if (e.isLabeledStatement()) this.registerBinding("label", e) + else if (e.isFunctionDeclaration()) + this.registerBinding("hoisted", e.get("id"), e) + else if (e.isVariableDeclaration()) + for ( + var t = e.get("declarations"), r = t, n = 0; + n < r.length; + n++ + ) { + var i = r[n] + this.registerBinding(e.node.kind, i) + } + else if (e.isClassDeclaration()) this.registerBinding("let", e) + else if (e.isImportDeclaration()) + for ( + var s = e.get("specifiers"), a = s, o = 0; + o < a.length; + o++ + ) { + var u = a[o] + this.registerBinding("module", u) + } + else if (e.isExportDeclaration()) { + var i = e.get("declaration") + ;(i.isClassDeclaration() || + i.isFunctionDeclaration() || + i.isVariableDeclaration()) && + this.registerDeclaration(i) + } else this.registerBinding("unknown", e) + }), + (e.prototype.buildUndefinedNode = function() { + return this.hasBinding("undefined") + ? K.unaryExpression("void", K.numericLiteral(0), !0) + : K.identifier("undefined") + }), + (e.prototype.registerConstantViolation = function(e) { + var t = e.getBindingIdentifiers() + for (var r in t) { + var n = this.getBinding(r) + n && n.reassign(e) + } + }), + (e.prototype.registerBinding = function(e, t) { + var r = + arguments.length <= 2 || void 0 === arguments[2] + ? t + : arguments[2] + return function() { + if (!e) throw new ReferenceError("no `kind`") + if (t.isVariableDeclaration()) + for ( + var n = t.get("declarations"), i = 0; + i < n.length; + i++ + ) { + var s = n[i] + this.registerBinding(e, s) + } + else { + var a = this.getProgramParent(), + o = t.getBindingIdentifiers(!0) + for (var u in o) + for (var l = o[u], c = 0; c < l.length; c++) { + var p = l[c], + f = this.getOwnBinding(u) + if (f) { + if (f.identifier === p) continue + this.checkBlockScopedCollisions(f, e, u, p) + } + ;(a.references[u] = !0), + (this.bindings[u] = new q["default"]({ + identifier: p, + existing: f, + scope: this, + path: r, + kind: e + })) + } + } + }.apply(this, arguments) + }), + (e.prototype.addGlobal = function(e) { + this.globals[e.name] = e + }), + (e.prototype.hasUid = function(e) { + var t = this + do if (t.uids[e]) return !0 + while ((t = t.parent)) + return !1 + }), + (e.prototype.hasGlobal = function(e) { + var t = this + do if (t.globals[e]) return !0 + while ((t = t.parent)) + return !1 + }), + (e.prototype.hasReference = function(e) { + var t = this + do if (t.references[e]) return !0 + while ((t = t.parent)) + return !1 + }), + (e.prototype.isPure = function(e, t) { + if (K.isIdentifier(e)) { + var r = this.getBinding(e.name) + return r ? (t ? r.constant : !0) : !1 + } + if (K.isClass(e)) + return e.superClass && !this.isPure(e.superClass, t) + ? !1 + : this.isPure(e.body, t) + if (K.isClassBody(e)) { + for ( + var n = e.body, + i = Array.isArray(n), + s = 0, + n = i ? n : F(n); + ; + + ) { + var a + if (i) { + if (s >= n.length) break + a = n[s++] + } else { + if (((s = n.next()), s.done)) break + a = s.value + } + var o = a + if (!this.isPure(o, t)) return !1 + } + return !0 + } + if (K.isBinary(e)) + return this.isPure(e.left, t) && this.isPure(e.right, t) + if (K.isArrayExpression(e)) { + for (var u = e.elements, l = 0; l < u.length; l++) { + var c = u[l] + if (!this.isPure(c, t)) return !1 + } + return !0 + } + if (K.isObjectExpression(e)) { + for (var p = e.properties, f = 0; f < p.length; f++) { + var h = p[f] + if (!this.isPure(h, t)) return !1 + } + return !0 + } + return K.isClassMethod(e) + ? e.computed && !this.isPure(e.key, t) + ? !1 + : "get" !== e.kind && "set" !== e.kind + : K.isClassProperty(e) || K.isObjectProperty(e) + ? e.computed && !this.isPure(e.key, t) + ? !1 + : this.isPure(e.value, t) + : K.isUnaryExpression(e) + ? this.isPure(e.argument, t) + : K.isPureish(e) + }), + (e.prototype.setData = function(e, t) { + return (this.data[e] = t) + }), + (e.prototype.getData = function(e) { + var t = this + do { + var r = t.data[e] + if (null != r) return r + } while ((t = t.parent)) + }), + (e.prototype.removeData = function(e) { + var t = this + do { + var r = t.data[e] + null != r && (t.data[e] = null) + } while ((t = t.parent)) + }), + (e.prototype.init = function() { + this.references || this.crawl() + }), + (e.prototype.crawl = function() { + var e = this.path + if ( + ((this.references = w(null)), + (this.bindings = w(null)), + (this.globals = w(null)), + (this.uids = w(null)), + (this.data = w(null)), + e.isLoop()) + ) + for (var t = K.FOR_INIT_KEYS, r = 0; r < t.length; r++) { + var n = t[r], + i = e.get(n) + i.isBlockScoped() && this.registerBinding(i.node.kind, i) + } + if ( + (e.isFunctionExpression() && + e.has("id") && + (e.get("id").node[K.NOT_LOCAL_BINDING] || + this.registerBinding("local", e.get("id"), e)), + e.isClassExpression() && + e.has("id") && + (e.get("id").node[K.NOT_LOCAL_BINDING] || + this.registerBinding("local", e)), + e.isFunction()) + ) + for (var s = e.get("params"), a = 0; a < s.length; a++) { + var o = s[a] + this.registerBinding("param", o) + } + e.isCatchClause() && this.registerBinding("let", e) + var u = this.getProgramParent() + if (!u.crawling) { + var l = { + references: [], + constantViolations: [], + assignments: [] + } + ;(this.crawling = !0), e.traverse($, l), (this.crawling = !1) + for ( + var c = l.assignments, + p = Array.isArray(c), + f = 0, + c = p ? c : F(c); + ; + + ) { + var h + if (p) { + if (f >= c.length) break + h = c[f++] + } else { + if (((f = c.next()), f.done)) break + h = f.value + } + var d = h, + m = d.getBindingIdentifiers(), + y = void 0 + for (var v in m) + d.scope.getBinding(v) || + ((y = y || d.scope.getProgramParent()), + y.addGlobal(m[v])) + d.scope.registerConstantViolation(d) + } + for ( + var g = l.references, + E = Array.isArray(g), + b = 0, + g = E ? g : F(g); + ; + + ) { + var x + if (E) { + if (b >= g.length) break + x = g[b++] + } else { + if (((b = g.next()), b.done)) break + x = b.value + } + var A = x, + D = A.scope.getBinding(A.node.name) + D + ? D.reference(A) + : A.scope.getProgramParent().addGlobal(A.node) + } + for ( + var C = l.constantViolations, + S = Array.isArray(C), + _ = 0, + C = S ? C : F(C); + ; + + ) { + var T + if (S) { + if (_ >= C.length) break + T = C[_++] + } else { + if (((_ = C.next()), _.done)) break + T = _.value + } + var P = T + P.scope.registerConstantViolation(P) + } + } + }), + (e.prototype.push = function(e) { + var t = this.path + t.isBlockStatement() || + t.isProgram() || + (t = this.getBlockParent().path), + t.isSwitchStatement() && (t = this.getFunctionParent().path), + (t.isLoop() || t.isCatchClause() || t.isFunction()) && + (K.ensureBlock(t.node), (t = t.get("body"))) + var r = e.unique, + n = e.kind || "var", + i = null == e._blockHoist ? 2 : e._blockHoist, + s = "declaration:" + n + ":" + i, + a = !r && t.getData(s) + if (!a) { + var o = K.variableDeclaration(n, []) + ;(o._generated = !0), (o._blockHoist = i) + var u = t.unshiftContainer("body", [o]) + ;(a = u[0]), r || t.setData(s, a) + } + var l = K.variableDeclarator(e.id, e.init) + a.node.declarations.push(l), + this.registerBinding(n, a.get("declarations").pop()) + }), + (e.prototype.getProgramParent = function() { + var e = this + do if (e.path.isProgram()) return e + while ((e = e.parent)) + throw new Error("We couldn't find a Function or Program...") + }), + (e.prototype.getFunctionParent = function() { + var e = this + do if (e.path.isFunctionParent()) return e + while ((e = e.parent)) + throw new Error("We couldn't find a Function or Program...") + }), + (e.prototype.getBlockParent = function() { + var e = this + do if (e.path.isBlockParent()) return e + while ((e = e.parent)) + throw new Error( + "We couldn't find a BlockStatement, For, Switch, Function, Loop or Program..." + ) + }), + (e.prototype.getAllBindings = function() { + var e = w(null), + t = this + do U["default"](e, t.bindings), (t = t.parent) + while (t) + return e + }), + (e.prototype.getAllBindingsOfKind = function() { + for (var e = w(null), t = arguments, r = 0; r < t.length; r++) { + var n = t[r], + i = this + do { + for (var s in i.bindings) { + var a = i.bindings[s] + a.kind === n && (e[s] = a) + } + i = i.parent + } while (i) + } + return e + }), + (e.prototype.bindingIdentifierEquals = function(e, t) { + return this.getBindingIdentifier(e) === t + }), + (e.prototype.getBinding = function(e) { + var t = this + do { + var r = t.getOwnBinding(e) + if (r) return r + } while ((t = t.parent)) + }), + (e.prototype.getOwnBinding = function(e) { + return this.bindings[e] + }), + (e.prototype.getBindingIdentifier = function(e) { + var t = this.getBinding(e) + return t && t.identifier + }), + (e.prototype.getOwnBindingIdentifier = function(e) { + var t = this.bindings[e] + return t && t.identifier + }), + (e.prototype.hasOwnBinding = function(e) { + return !!this.getOwnBinding(e) + }), + (e.prototype.hasBinding = function(t, r) { + return t + ? this.hasOwnBinding(t) + ? !0 + : this.parentHasBinding(t, r) + ? !0 + : this.hasUid(t) + ? !0 + : !r && k["default"](e.globals, t) + ? !0 + : !(r || !k["default"](e.contextVariables, t)) + : !1 + }), + (e.prototype.parentHasBinding = function(e, t) { + return this.parent && this.parent.hasBinding(e, t) + }), + (e.prototype.moveBindingTo = function(e, t) { + var r = this.getBinding(e) + r && + (r.scope.removeOwnBinding(e), + (r.scope = t), + (t.bindings[e] = r)) + }), + (e.prototype.removeOwnBinding = function(e) { + delete this.bindings[e] + }), + (e.prototype.removeBinding = function(e) { + var t = this.getBinding(e) + t && t.scope.removeOwnBinding(e) + var r = this + do r.uids[e] && (r.uids[e] = !1) + while ((r = r.parent)) + }), + D(e, null, [ + { key: "globals", value: _(Y["default"].builtin), enumerable: !0 }, + { + key: "contextVariables", + value: ["arguments", "undefined", "Infinity", "NaN"], + enumerable: !0 + } + ]), + e + ) + })() + ;(t["default"] = Z), (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a, o) { + "use strict" + var u = r(n)["default"], + l = r(i)["default"], + c = r(s)["default"] + t.__esModule = !0 + var p = r(a), + f = (l(p), r(o)), + h = c(f), + d = { + ReferencedIdentifier: function(e, t) { + var r = e.node + r.name === t.oldName && (r.name = t.newName) + }, + Scope: function(e, t) { + e.scope.bindingIdentifierEquals(t.oldName, t.binding.identifier) || + e.skip() + }, + "AssignmentExpression|Declaration": function(e, t) { + var r = e.getOuterBindingIdentifiers() + for (var n in r) n === t.oldName && (r[n].name = t.newName) + } + }, + m = (function() { + function e(t, r, n) { + u(this, e), (this.newName = n), (this.oldName = r), (this.binding = t) + } + return ( + (e.prototype.maybeConvertFromExportDeclaration = function(e) { + var t = e.parentPath.isExportDeclaration() && e.parentPath + if (t) { + var r = t.isExportDefaultDeclaration() + r && + (e.isFunctionDeclaration() || e.isClassDeclaration()) && + !e.node.id && + (e.node.id = e.scope.generateUidIdentifier("default")) + var n = e.getOuterBindingIdentifiers(), + i = [] + for (var s in n) { + var a = s === this.oldName ? this.newName : s, + o = r ? "default" : s + i.push(h.exportSpecifier(h.identifier(a), h.identifier(o))) + } + var u = h.exportNamedDeclaration(null, i) + e.isFunctionDeclaration() && (u._blockHoist = 3), + t.insertAfter(u), + t.replaceWith(e.node) + } + }), + (e.prototype.maybeConvertFromClassFunctionDeclaration = function(e) {}), + (e.prototype.maybeConvertFromClassFunctionExpression = function(e) {}), + (e.prototype.rename = function(e) { + var t = this.binding, + r = this.oldName, + n = this.newName, + i = t.scope, + s = t.path, + a = s.find(function(e) { + return e.isDeclaration() || e.isFunctionExpression() + }) + a && this.maybeConvertFromExportDeclaration(a), + i.traverse(e || i.block, d, this), + e || + (i.removeOwnBinding(r), + (i.bindings[n] = t), + (this.binding.identifier.name = n)), + "hoisted" === t.type, + a && + (this.maybeConvertFromClassFunctionDeclaration(a), + this.maybeConvertFromClassFunctionExpression(a)) + }), + e + ) + })() + ;(t["default"] = m), (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a, o, u, l, c) { + "use strict" + function p(e) { + if (e._exploded) return e + e._exploded = !0 + for (var t in e) + if (!E(t)) { + var r = t.split("|") + if (1 !== r.length) { + var n = e[t] + delete e[t] + for (var i = 0; i < r.length; i++) { + var s = r[i] + e[s] = n + } + } + } + f(e), delete e.__esModule, y(e), v(e) + for (var a = x(e), o = 0; o < a.length; o++) { + var t = a[o] + if (!E(t)) { + var u = F[t] + if (u) { + var n = e[t] + for (var l in n) n[l] = g(u, n[l]) + if ((delete e[t], u.types)) + for (var c = u.types, p = 0; p < c.length; p++) { + var l = c[p] + e[l] ? b(e[l], n) : (e[l] = n) + } + else b(e, n) + } + } + } + for (var t in e) + if (!E(t)) { + var n = e[t], + h = P.FLIPPED_ALIAS_KEYS[t], + d = P.DEPRECATED_KEYS[t] + if ( + (d && + (console.trace( + "Visitor defined for " + + t + + " but it has been renamed to " + + d + ), + (h = [d])), + h) + ) { + delete e[t] + for (var m = h, D = Array.isArray(m), C = 0, m = D ? m : A(m); ; ) { + var S + if (D) { + if (C >= m.length) break + S = m[C++] + } else { + if (((C = m.next()), C.done)) break + S = C.value + } + var w = S, + _ = e[w] + _ ? b(_, n) : (e[w] = k["default"](n)) + } + } + } + for (var t in e) E(t) || v(e[t]) + return e + } + function f(e) { + if (!e._verified) { + if ("function" == typeof e) + throw new Error(_.get("traverseVerifyRootFunction")) + for (var t in e) + if ((("enter" !== t && "exit" !== t) || h(t, e[t]), !E(t))) { + if (P.TYPES.indexOf(t) < 0) + throw new Error(_.get("traverseVerifyNodeType", t)) + var r = e[t] + if ("object" == typeof r) + for (var n in r) { + if ("enter" !== n && "exit" !== n) + throw new Error( + _.get("traverseVerifyVisitorProperty", t, n) + ) + h(t + "." + n, r[n]) + } + } + e._verified = !0 + } + } + function h(e, t) { + for ( + var r = [].concat(t), n = r, i = Array.isArray(n), s = 0, n = i ? n : A(n); + ; + + ) { + var a + if (i) { + if (s >= n.length) break + a = n[s++] + } else { + if (((s = n.next()), s.done)) break + a = s.value + } + var o = a + if ("function" != typeof o) + throw new TypeError( + "Non-function found defined in " + e + " with type " + typeof o + ) + } + } + function d(e) { + for ( + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? [] + : arguments[1], + r = {}, + n = 0; + n < e.length; + n++ + ) { + var i = e[n], + s = t[n] + p(i) + for (var a in i) { + var o = i[a] + s && (o = m(o, s)) + var u = (r[a] = r[a] || {}) + b(u, o) + } + } + return r + } + function m(e, t) { + var r = {} + for (var n in e) { + var i = e[n] + Array.isArray(i) && + ((i = i.map(function(e) { + var r = function(r) { + return e.call(t, r, t) + } + return ( + (r.toString = function() { + return e.toString() + }), + r + ) + })), + (r[n] = i)) + } + return r + } + function y(e) { + for (var t in e) + if (!E(t)) { + var r = e[t] + "function" == typeof r && (e[t] = { enter: r }) + } + } + function v(e) { + e.enter && !Array.isArray(e.enter) && (e.enter = [e.enter]), + e.exit && !Array.isArray(e.exit) && (e.exit = [e.exit]) + } + function g(e, t) { + var r = function(r) { + return e.checkPath(r) ? t.apply(this, arguments) : void 0 + } + return ( + (r.toString = function() { + return t.toString() + }), + r + ) + } + function E(e) { + return "_" === e[0] + ? !0 + : "enter" === e || "exit" === e || "shouldSkip" === e + ? !0 + : "blacklist" === e || "noScope" === e || "skipKeys" === e + } + function b(e, t) { + for (var r in t) e[r] = [].concat(e[r] || [], t[r]) + } + var x = r(n)["default"], + A = r(i)["default"], + D = r(s)["default"], + C = r(a)["default"] + ;(t.__esModule = !0), (t.explode = p), (t.verify = f), (t.merge = d) + var S = r(o), + F = D(S), + w = r(u), + _ = D(w), + T = r(l), + P = D(T), + B = r(c), + k = C(B) + }, + function(e, t, r, n) { + e.exports = r(n) + }, + function(e, t, r, n) { + "use strict" + var i = r(n)["default"] + t.__esModule = !0 + var s = ["consequent", "body", "alternate"] + t.STATEMENT_OR_BLOCK_KEYS = s + var a = ["body", "expressions"] + t.FLATTENABLE_KEYS = a + var o = ["left", "init"] + t.FOR_INIT_KEYS = o + var u = ["leadingComments", "trailingComments", "innerComments"] + t.COMMENT_KEYS = u + var l = ["||", "&&"] + t.LOGICAL_OPERATORS = l + var c = ["++", "--"] + t.UPDATE_OPERATORS = c + var p = [">", "<", ">=", "<="] + t.BOOLEAN_NUMBER_BINARY_OPERATORS = p + var f = ["==", "===", "!=", "!=="] + t.EQUALITY_BINARY_OPERATORS = f + var h = [].concat(f, ["in", "instanceof"]) + t.COMPARISON_BINARY_OPERATORS = h + var d = [].concat(h, p) + t.BOOLEAN_BINARY_OPERATORS = d + var m = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"] + t.NUMBER_BINARY_OPERATORS = m + var y = ["+"].concat(m, d) + t.BINARY_OPERATORS = y + var v = ["delete", "!"] + t.BOOLEAN_UNARY_OPERATORS = v + var g = ["+", "-", "++", "--", "~"] + t.NUMBER_UNARY_OPERATORS = g + var E = ["typeof"] + t.STRING_UNARY_OPERATORS = E + var b = ["void"].concat(v, g, E) + t.UNARY_OPERATORS = b + var x = { + optional: ["typeAnnotation", "typeParameters", "returnType"], + force: ["start", "loc", "end"] + } + t.INHERIT_KEYS = x + var A = i("var used to be block scoped") + t.BLOCK_SCOPED_SYMBOL = A + var D = i("should not be considered a local binding") + t.NOT_LOCAL_BINDING = D + }, + function(e, t, r, n, i, s, a, o, u, l, c, p) { + "use strict" + function f(e) { + var t = + arguments.length <= 1 || void 0 === arguments[1] + ? e.key || e.property + : arguments[1] + return (function() { + return e.computed || (M.isIdentifier(t) && (t = M.stringLiteral(t.name))), t + })() + } + function h(e, t) { + function r(e) { + for (var s = !1, a = [], o = e, u = 0; u < o.length; u++) { + var l = o[u] + if (M.isExpression(l)) a.push(l) + else if (M.isExpressionStatement(l)) a.push(l.expression) + else { + if (M.isVariableDeclaration(l)) { + if ("var" !== l.kind) return (i = !0) + for (var c = l.declarations, p = 0; p < c.length; p++) { + var f = c[p], + h = M.getBindingIdentifiers(f) + for (var d in h) n.push({ kind: l.kind, id: h[d] }) + f.init && a.push(M.assignmentExpression("=", f.id, f.init)) + } + s = !0 + continue + } + if (M.isIfStatement(l)) { + var m = l.consequent + ? r([l.consequent]) + : t.buildUndefinedNode(), + y = l.alternate ? r([l.alternate]) : t.buildUndefinedNode() + if (!m || !y) return (i = !0) + a.push(M.conditionalExpression(l.test, m, y)) + } else { + if (!M.isBlockStatement(l)) { + if (M.isEmptyStatement(l)) { + s = !0 + continue + } + return (i = !0) + } + a.push(r(l.body)) + } + } + s = !1 + } + return ( + (s || 0 === a.length) && a.push(t.buildUndefinedNode()), + 1 === a.length ? a[0] : M.sequenceExpression(a) + ) + } + if (e && e.length) { + var n = [], + i = !1, + s = r(e) + if (!i) { + for (var a = 0; a < n.length; a++) t.push(n[a]) + return s + } + } + } + function d(e) { + var t = arguments.length <= 1 || void 0 === arguments[1] ? e.key : arguments[1] + return (function() { + var r = void 0 + return "method" === e.kind + ? d.increment() + "" + : ((r = M.isIdentifier(t) + ? t.name + : M.isStringLiteral(t) + ? JSON.stringify(t.value) + : JSON.stringify(I["default"].removeProperties(M.cloneDeep(t)))), + e.computed && (r = "[" + r + "]"), + e["static"] && (r = "static:" + r), + r) + })() + } + function m(e) { + return ( + (e += ""), + (e = e.replace(/[^a-zA-Z0-9$_]/g, "-")), + (e = e.replace(/^[-0-9]+/, "")), + (e = e.replace(/[-\s]+(.)?/g, function(e, t) { + return t ? t.toUpperCase() : "" + })), + M.isValidIdentifier(e) || (e = "_" + e), + e || "_" + ) + } + function y(e) { + return (e = m(e)), ("eval" !== e && "arguments" !== e) || (e = "_" + e), e + } + function v(e, t) { + if (M.isStatement(e)) return e + var r = !1, + n = void 0 + if (M.isClass(e)) (r = !0), (n = "ClassDeclaration") + else if (M.isFunction(e)) (r = !0), (n = "FunctionDeclaration") + else if (M.isAssignmentExpression(e)) return M.expressionStatement(e) + if ((r && !e.id && (n = !1), !n)) { + if (t) return !1 + throw new Error("cannot turn " + e.type + " to a statement") + } + return (e.type = n), e + } + function g(e) { + if ( + (M.isExpressionStatement(e) && (e = e.expression), + M.isClass(e) + ? (e.type = "ClassExpression") + : M.isFunction(e) && (e.type = "FunctionExpression"), + M.isExpression(e)) + ) + return e + throw new Error("cannot turn " + e.type + " to an expression") + } + function E(e, t) { + return M.isBlockStatement(e) + ? e + : (M.isEmptyStatement(e) && (e = []), + Array.isArray(e) || + (M.isStatement(e) || + (e = M.isFunction(t) + ? M.returnStatement(e) + : M.expressionStatement(e)), + (e = [e])), + M.blockStatement(e)) + } + function b(e) { + if (void 0 === e) return M.identifier("undefined") + if (e === !0 || e === !1) return M.booleanLiteral(e) + if (null === e) return M.nullLiteral() + if (B["default"](e)) return M.stringLiteral(e) + if (w["default"](e)) return M.numericLiteral(e) + if (T["default"](e)) { + var t = e.source, + r = e.toString().match(/\/([a-z]+|)$/)[1] + return M.regExpLiteral(t, r) + } + if (Array.isArray(e)) return M.arrayExpression(e.map(M.valueToNode)) + if (S["default"](e)) { + var n = [] + for (var i in e) { + var s = void 0 + ;(s = M.isValidIdentifier(i) ? M.identifier(i) : M.stringLiteral(i)), + n.push(M.objectProperty(s, M.valueToNode(e[i]))) + } + return M.objectExpression(n) + } + throw new Error("don't know how to turn this value into a node") + } + var x = r(n)["default"], + A = r(i)["default"], + D = r(s)["default"] + ;(t.__esModule = !0), + (t.toComputedKey = f), + (t.toSequenceExpression = h), + (t.toKeyAlias = d), + (t.toIdentifier = m), + (t.toBindingIdentifierName = y), + (t.toStatement = v), + (t.toExpression = g), + (t.toBlock = E), + (t.valueToNode = b) + var C = r(a), + S = A(C), + F = r(o), + w = A(F), + _ = r(u), + T = A(_), + P = r(l), + B = A(P), + k = r(c), + I = A(k), + O = r(p), + M = D(O) + ;(d.uid = 0), + (d.increment = function() { + return d.uid >= x ? (d.uid = 0) : d.uid++ + }) + }, + function(e, t, r, n, i, s, a, o) { + "use strict" + var u = r(n)["default"], + l = r(i)["default"], + c = r(s), + p = u(c), + f = r(a), + h = r(o), + d = l(h) + d["default"]("ArrayExpression", { + fields: { + elements: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach( + h.assertNodeOrValueType("null", "Expression", "SpreadElement") + ) + ), + default: [] + } + }, + visitor: ["elements"], + aliases: ["Expression"] + }), + d["default"]("AssignmentExpression", { + fields: { + operator: { validate: h.assertValueType("string") }, + left: { validate: h.assertNodeType("LVal") }, + right: { validate: h.assertNodeType("Expression") } + }, + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Expression"] + }), + d["default"]("BinaryExpression", { + builder: ["operator", "left", "right"], + fields: { + operator: { validate: h.assertOneOf.apply(void 0, f.BINARY_OPERATORS) }, + left: { validate: h.assertNodeType("Expression") }, + right: { validate: h.assertNodeType("Expression") } + }, + visitor: ["left", "right"], + aliases: ["Binary", "Expression"] + }), + d["default"]("Directive", { + visitor: ["value"], + fields: { value: { validate: h.assertNodeType("DirectiveLiteral") } } + }), + d["default"]("DirectiveLiteral", { + builder: ["value"], + fields: { value: { validate: h.assertValueType("string") } } + }), + d["default"]("BlockStatement", { + builder: ["body", "directives"], + visitor: ["directives", "body"], + fields: { + directives: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Directive")) + ), + default: [] + }, + body: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Statement")) + ) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "Statement"] + }), + d["default"]("BreakStatement", { + visitor: ["label"], + fields: { + label: { validate: h.assertNodeType("Identifier"), optional: !0 } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] + }), + d["default"]("CallExpression", { + visitor: ["callee", "arguments"], + fields: { + callee: { validate: h.assertNodeType("Expression") }, + arguments: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Expression", "SpreadElement")) + ) + } + }, + aliases: ["Expression"] + }), + d["default"]("CatchClause", { + visitor: ["param", "body"], + fields: { + param: { validate: h.assertNodeType("Identifier") }, + body: { validate: h.assertNodeType("BlockStatement") } + }, + aliases: ["Scopable"] + }), + d["default"]("ConditionalExpression", { + visitor: ["test", "consequent", "alternate"], + fields: { + test: { validate: h.assertNodeType("Expression") }, + consequent: { validate: h.assertNodeType("Expression") }, + alternate: { validate: h.assertNodeType("Expression") } + }, + aliases: ["Expression", "Conditional"] + }), + d["default"]("ContinueStatement", { + visitor: ["label"], + fields: { + label: { validate: h.assertNodeType("Identifier"), optional: !0 } + }, + aliases: ["Statement", "Terminatorless", "CompletionStatement"] + }), + d["default"]("DebuggerStatement", { aliases: ["Statement"] }), + d["default"]("DoWhileStatement", { + visitor: ["test", "body"], + fields: { + test: { validate: h.assertNodeType("Expression") }, + body: { validate: h.assertNodeType("Statement") } + }, + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"] + }), + d["default"]("EmptyStatement", { aliases: ["Statement"] }), + d["default"]("ExpressionStatement", { + visitor: ["expression"], + fields: { expression: { validate: h.assertNodeType("Expression") } }, + aliases: ["Statement", "ExpressionWrapper"] + }), + d["default"]("File", { + builder: ["program", "comments", "tokens"], + visitor: ["program"], + fields: { program: { validate: h.assertNodeType("Program") } } + }), + d["default"]("ForInStatement", { + visitor: ["left", "right", "body"], + aliases: [ + "Scopable", + "Statement", + "For", + "BlockParent", + "Loop", + "ForXStatement" + ], + fields: { + left: { validate: h.assertNodeType("VariableDeclaration", "LVal") }, + right: { validate: h.assertNodeType("Expression") }, + body: { validate: h.assertNodeType("Statement") } + } + }), + d["default"]("ForStatement", { + visitor: ["init", "test", "update", "body"], + aliases: ["Scopable", "Statement", "For", "BlockParent", "Loop"], + fields: { + init: { + validate: h.assertNodeType("VariableDeclaration", "Expression"), + optional: !0 + }, + test: { validate: h.assertNodeType("Expression"), optional: !0 }, + update: { validate: h.assertNodeType("Expression"), optional: !0 }, + body: { validate: h.assertNodeType("Statement") } + } + }), + d["default"]("FunctionDeclaration", { + builder: ["id", "params", "body", "generator", "async"], + visitor: ["id", "params", "body", "returnType", "typeParameters"], + fields: { + id: { validate: h.assertNodeType("Identifier") }, + params: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("LVal")) + ) + }, + body: { validate: h.assertNodeType("BlockStatement") }, + generator: { default: !1, validate: h.assertValueType("boolean") }, + async: { default: !1, validate: h.assertValueType("boolean") } + }, + aliases: [ + "Scopable", + "Function", + "BlockParent", + "FunctionParent", + "Statement", + "Pureish", + "Declaration" + ] + }), + d["default"]("FunctionExpression", { + inherits: "FunctionDeclaration", + aliases: [ + "Scopable", + "Function", + "BlockParent", + "FunctionParent", + "Expression", + "Pureish" + ], + fields: { + id: { validate: h.assertNodeType("Identifier"), optional: !0 }, + params: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("LVal")) + ) + }, + body: { validate: h.assertNodeType("BlockStatement") }, + generator: { default: !1, validate: h.assertValueType("boolean") }, + async: { default: !1, validate: h.assertValueType("boolean") } + } + }), + d["default"]("Identifier", { + builder: ["name"], + visitor: ["typeAnnotation"], + aliases: ["Expression", "LVal"], + fields: { + name: { + validate: function(e, t, r) { + !p.isValidIdentifier(r) + } + } + } + }), + d["default"]("IfStatement", { + visitor: ["test", "consequent", "alternate"], + aliases: ["Statement", "Conditional"], + fields: { + test: { validate: h.assertNodeType("Expression") }, + consequent: { validate: h.assertNodeType("Statement") }, + alternate: { optional: !0, validate: h.assertNodeType("Statement") } + } + }), + d["default"]("LabeledStatement", { + visitor: ["label", "body"], + aliases: ["Statement"], + fields: { + label: { validate: h.assertNodeType("Identifier") }, + body: { validate: h.assertNodeType("Statement") } + } + }), + d["default"]("StringLiteral", { + builder: ["value"], + fields: { value: { validate: h.assertValueType("string") } }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] + }), + d["default"]("NumericLiteral", { + builder: ["value"], + deprecatedAlias: "NumberLiteral", + fields: { value: { validate: h.assertValueType("number") } }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] + }), + d["default"]("NullLiteral", { + aliases: ["Expression", "Pureish", "Literal", "Immutable"] + }), + d["default"]("BooleanLiteral", { + builder: ["value"], + fields: { value: { validate: h.assertValueType("boolean") } }, + aliases: ["Expression", "Pureish", "Literal", "Immutable"] + }), + d["default"]("RegExpLiteral", { + builder: ["pattern", "flags"], + deprecatedAlias: "RegexLiteral", + aliases: ["Expression", "Literal"], + fields: { + pattern: { validate: h.assertValueType("string") }, + flags: { validate: h.assertValueType("string"), default: "" } + } + }), + d["default"]("LogicalExpression", { + builder: ["operator", "left", "right"], + visitor: ["left", "right"], + aliases: ["Binary", "Expression"], + fields: { + operator: { + validate: h.assertOneOf.apply(void 0, f.LOGICAL_OPERATORS) + }, + left: { validate: h.assertNodeType("Expression") }, + right: { validate: h.assertNodeType("Expression") } + } + }), + d["default"]("MemberExpression", { + builder: ["object", "property", "computed"], + visitor: ["object", "property"], + aliases: ["Expression", "LVal"], + fields: { + object: { validate: h.assertNodeType("Expression") }, + property: { + validate: function(e, t, r) { + var n = e.computed ? "Expression" : "Identifier" + h.assertNodeType(n)(e, t, r) + } + }, + computed: { default: !1 } + } + }), + d["default"]("NewExpression", { + visitor: ["callee", "arguments"], + aliases: ["Expression"], + fields: { + callee: { validate: h.assertNodeType("Expression") }, + arguments: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Expression", "SpreadElement")) + ) + } + } + }), + d["default"]("Program", { + visitor: ["directives", "body"], + builder: ["body", "directives"], + fields: { + directives: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Directive")) + ), + default: [] + }, + body: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Statement")) + ) + } + }, + aliases: ["Scopable", "BlockParent", "Block", "FunctionParent"] + }), + d["default"]("ObjectExpression", { + visitor: ["properties"], + aliases: ["Expression"], + fields: { + properties: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach( + h.assertNodeType( + "ObjectMethod", + "ObjectProperty", + "SpreadProperty" + ) + ) + ) + } + } + }), + d["default"]("ObjectMethod", { + builder: ["kind", "key", "params", "body", "computed"], + fields: { + kind: { + validate: h.chain( + h.assertValueType("string"), + h.assertOneOf("method", "get", "set") + ), + default: "method" + }, + computed: { validate: h.assertValueType("boolean"), default: !1 }, + key: { + validate: function(e, t, r) { + var n = e.computed + ? ["Expression"] + : ["Identifier", "StringLiteral", "NumericLiteral"] + h.assertNodeType.apply(void 0, n)(e, t, r) + } + }, + decorators: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Decorator")) + ) + }, + body: { validate: h.assertNodeType("BlockStatement") }, + generator: { default: !1, validate: h.assertValueType("boolean") }, + async: { default: !1, validate: h.assertValueType("boolean") } + }, + visitor: [ + "key", + "params", + "body", + "decorators", + "returnType", + "typeParameters" + ], + aliases: [ + "UserWhitespacable", + "Function", + "Scopable", + "BlockParent", + "FunctionParent", + "Method", + "ObjectMember" + ] + }), + d["default"]("ObjectProperty", { + builder: ["key", "value", "computed", "shorthand", "decorators"], + fields: { + computed: { validate: h.assertValueType("boolean"), default: !1 }, + key: { + validate: function(e, t, r) { + var n = e.computed + ? ["Expression"] + : ["Identifier", "StringLiteral", "NumericLiteral"] + h.assertNodeType.apply(void 0, n)(e, t, r) + } + }, + value: { validate: h.assertNodeType("Expression") }, + shorthand: { validate: h.assertValueType("boolean"), default: !1 }, + decorators: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Decorator")) + ), + optional: !0 + } + }, + visitor: ["key", "value", "decorators"], + aliases: ["UserWhitespacable", "Property", "ObjectMember"] + }), + d["default"]("RestElement", { + visitor: ["argument", "typeAnnotation"], + aliases: ["LVal"], + fields: { argument: { validate: h.assertNodeType("LVal") } } + }), + d["default"]("ReturnStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { + argument: { validate: h.assertNodeType("Expression"), optional: !0 } + } + }), + d["default"]("SequenceExpression", { + visitor: ["expressions"], + fields: { + expressions: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Expression")) + ) + } + }, + aliases: ["Expression"] + }), + d["default"]("SwitchCase", { + visitor: ["test", "consequent"], + fields: { + test: { validate: h.assertNodeType("Expression"), optional: !0 }, + consequent: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("Statement")) + ) + } + } + }), + d["default"]("SwitchStatement", { + visitor: ["discriminant", "cases"], + aliases: ["Statement", "BlockParent", "Scopable"], + fields: { + discriminant: { validate: h.assertNodeType("Expression") }, + cases: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("SwitchCase")) + ) + } + } + }), + d["default"]("ThisExpression", { aliases: ["Expression"] }), + d["default"]("ThrowStatement", { + visitor: ["argument"], + aliases: ["Statement", "Terminatorless", "CompletionStatement"], + fields: { argument: { validate: h.assertNodeType("Expression") } } + }), + d["default"]("TryStatement", { + visitor: ["block", "handler", "finalizer"], + aliases: ["Statement"], + fields: { + body: { validate: h.assertNodeType("BlockStatement") }, + handler: { optional: !0, handler: h.assertNodeType("BlockStatement") }, + finalizer: { + optional: !0, + validate: h.assertNodeType("BlockStatement") + } + } + }), + d["default"]("UnaryExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { default: !0 }, + argument: { validate: h.assertNodeType("Expression") }, + operator: { validate: h.assertOneOf.apply(void 0, f.UNARY_OPERATORS) } + }, + visitor: ["argument"], + aliases: ["UnaryLike", "Expression"] + }), + d["default"]("UpdateExpression", { + builder: ["operator", "argument", "prefix"], + fields: { + prefix: { default: !1 }, + argument: { validate: h.assertNodeType("Expression") }, + operator: { validate: h.assertOneOf.apply(void 0, f.UPDATE_OPERATORS) } + }, + visitor: ["argument"], + aliases: ["Expression"] + }), + d["default"]("VariableDeclaration", { + builder: ["kind", "declarations"], + visitor: ["declarations"], + aliases: ["Statement", "Declaration"], + fields: { + kind: { + validate: h.chain( + h.assertValueType("string"), + h.assertOneOf("var", "let", "const") + ) + }, + declarations: { + validate: h.chain( + h.assertValueType("array"), + h.assertEach(h.assertNodeType("VariableDeclarator")) + ) + } + } + }), + d["default"]("VariableDeclarator", { + visitor: ["id", "init"], + fields: { + id: { validate: h.assertNodeType("LVal") }, + init: { optional: !0, validate: h.assertNodeType("Expression") } + } + }), + d["default"]("WhileStatement", { + visitor: ["test", "body"], + aliases: ["Statement", "BlockParent", "Loop", "While", "Scopable"], + fields: { + test: { validate: h.assertNodeType("Expression") }, + body: { validate: h.assertNodeType("BlockStatement", "Statement") } + } + }), + d["default"]("WithStatement", { + visitor: ["object", "body"], + aliases: ["Statement"], + fields: { + object: { object: h.assertNodeType("Expression") }, + body: { validate: h.assertNodeType("BlockStatement", "Statement") } + } + }) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"], + a = r(i), + o = s(a) + o["default"]("AssignmentPattern", { + visitor: ["left", "right"], + aliases: ["Pattern", "LVal"], + fields: { + left: { validate: a.assertNodeType("Identifier") }, + right: { validate: a.assertNodeType("Expression") } + } + }), + o["default"]("ArrayPattern", { + visitor: ["elements", "typeAnnotation"], + aliases: ["Pattern", "LVal"], + fields: { + elements: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("Expression")) + ) + } + } + }), + o["default"]("ArrowFunctionExpression", { + builder: ["params", "body", "async"], + visitor: ["params", "body", "returnType"], + aliases: [ + "Scopable", + "Function", + "BlockParent", + "FunctionParent", + "Expression", + "Pureish" + ], + fields: { + params: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("LVal")) + ) + }, + body: { validate: a.assertNodeType("BlockStatement", "Expression") }, + async: { validate: a.assertValueType("boolean"), default: !1 } + } + }), + o["default"]("ClassBody", { + visitor: ["body"], + fields: { + body: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("ClassMethod", "ClassProperty")) + ) + } + } + }), + o["default"]("ClassDeclaration", { + builder: ["id", "superClass", "body", "decorators"], + visitor: [ + "id", + "body", + "superClass", + "mixins", + "typeParameters", + "superTypeParameters", + "implements", + "decorators" + ], + aliases: ["Scopable", "Class", "Statement", "Declaration", "Pureish"], + fields: { + id: { validate: a.assertNodeType("Identifier") }, + body: { validate: a.assertNodeType("ClassBody") }, + superClass: { optional: !0, validate: a.assertNodeType("Expression") }, + decorators: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("Decorator")) + ) + } + } + }), + o["default"]("ClassExpression", { + inherits: "ClassDeclaration", + aliases: ["Scopable", "Class", "Expression", "Pureish"], + fields: { + id: { optional: !0, validate: a.assertNodeType("Identifier") }, + body: { validate: a.assertNodeType("ClassBody") }, + superClass: { optional: !0, validate: a.assertNodeType("Expression") }, + decorators: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("Decorator")) + ) + } + } + }), + o["default"]("ExportAllDeclaration", { + visitor: ["source"], + aliases: [ + "Statement", + "Declaration", + "ModuleDeclaration", + "ExportDeclaration" + ], + fields: { source: { validate: a.assertNodeType("StringLiteral") } } + }), + o["default"]("ExportDefaultDeclaration", { + visitor: ["declaration"], + aliases: [ + "Statement", + "Declaration", + "ModuleDeclaration", + "ExportDeclaration" + ], + fields: { + declaration: { + validate: a.assertNodeType( + "FunctionDeclaration", + "ClassDeclaration", + "Expression" + ) + } + } + }), + o["default"]("ExportNamedDeclaration", { + visitor: ["declaration", "specifiers", "source"], + aliases: [ + "Statement", + "Declaration", + "ModuleDeclaration", + "ExportDeclaration" + ], + fields: { + declaration: { + validate: a.assertNodeType("Declaration"), + optional: !0 + }, + specifiers: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("ExportSpecifier")) + ) + }, + source: { validate: a.assertNodeType("StringLiteral"), optional: !0 } + } + }), + o["default"]("ExportSpecifier", { + visitor: ["local", "exported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { validate: a.assertNodeType("Identifier") }, + exported: { validate: a.assertNodeType("Identifier") } + } + }), + o["default"]("ForOfStatement", { + visitor: ["left", "right", "body"], + aliases: [ + "Scopable", + "Statement", + "For", + "BlockParent", + "Loop", + "ForXStatement" + ], + fields: { + left: { validate: a.assertNodeType("VariableDeclaration", "LVal") }, + right: { validate: a.assertNodeType("Expression") }, + body: { validate: a.assertNodeType("Statement") } + } + }), + o["default"]("ImportDeclaration", { + visitor: ["specifiers", "source"], + aliases: ["Statement", "Declaration", "ModuleDeclaration"], + fields: { + specifiers: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach( + a.assertNodeType( + "ImportSpecifier", + "ImportDefaultSpecifier", + "ImportNamespaceSpecifier" + ) + ) + ) + }, + source: { validate: a.assertNodeType("StringLiteral") } + } + }), + o["default"]("ImportDefaultSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { local: { validate: a.assertNodeType("Identifier") } } + }), + o["default"]("ImportNamespaceSpecifier", { + visitor: ["local"], + aliases: ["ModuleSpecifier"], + fields: { local: { validate: a.assertNodeType("Identifier") } } + }), + o["default"]("ImportSpecifier", { + visitor: ["local", "imported"], + aliases: ["ModuleSpecifier"], + fields: { + local: { validate: a.assertNodeType("Identifier") }, + imported: { validate: a.assertNodeType("Identifier") } + } + }), + o["default"]("MetaProperty", { + visitor: ["meta", "property"], + aliases: ["Expression"], + fields: { + meta: { validate: a.assertValueType("string") }, + property: { validate: a.assertValueType("string") } + } + }), + o["default"]("ClassMethod", { + aliases: [ + "Function", + "Scopable", + "BlockParent", + "FunctionParent", + "Method" + ], + builder: ["kind", "key", "params", "body", "computed", "static"], + visitor: [ + "key", + "params", + "body", + "decorators", + "returnType", + "typeParameters" + ], + fields: { + kind: { + validate: a.chain( + a.assertValueType("string"), + a.assertOneOf("get", "set", "method", "constructor") + ), + default: "method" + }, + computed: { + default: !1, + validate: a.assertValueType("boolean") + }, + static: { default: !1, validate: a.assertValueType("boolean") }, + key: { + validate: function(e, t, r) { + var n = e.computed + ? ["Expression"] + : ["Identifier", "StringLiteral", "NumericLiteral"] + a.assertNodeType.apply(void 0, n)(e, t, r) + } + }, + params: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("LVal")) + ) + }, + body: { validate: a.assertNodeType("BlockStatement") }, + generator: { default: !1, validate: a.assertValueType("boolean") }, + async: { default: !1, validate: a.assertValueType("boolean") } + } + }), + o["default"]("ObjectPattern", { + visitor: ["properties", "typeAnnotation"], + aliases: ["Pattern", "LVal"], + fields: { + properties: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("RestProperty", "Property")) + ) + } + } + }), + o["default"]("SpreadElement", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { argument: { validate: a.assertNodeType("Expression") } } + }), + o["default"]("Super", { aliases: ["Expression"] }), + o["default"]("TaggedTemplateExpression", { + visitor: ["tag", "quasi"], + aliases: ["Expression"], + fields: { + tag: { validate: a.assertNodeType("Expression") }, + quasi: { validate: a.assertNodeType("TemplateLiteral") } + } + }), + o["default"]("TemplateElement", { + builder: ["value", "tail"], + fields: { + value: {}, + tail: { validate: a.assertValueType("boolean"), default: !1 } + } + }), + o["default"]("TemplateLiteral", { + visitor: ["quasis", "expressions"], + aliases: ["Expression", "Literal"], + fields: { + quasis: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("TemplateElement")) + ) + }, + expressions: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach(a.assertNodeType("Expression")) + ) + } + } + }), + o["default"]("YieldExpression", { + builder: ["argument", "delegate"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { + delegate: { validate: a.assertValueType("boolean"), default: !1 }, + argument: { optional: !0, validate: a.assertNodeType("Expression") } + } + }) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"], + a = r(i), + o = s(a) + o["default"]("AwaitExpression", { + builder: ["argument"], + visitor: ["argument"], + aliases: ["Expression", "Terminatorless"], + fields: { argument: { validate: a.assertNodeType("Expression") } } + }), + o["default"]("BindExpression", { + visitor: ["object", "callee"], + aliases: ["Expression"], + fields: {} + }), + o["default"]("Decorator", { + visitor: ["expression"], + fields: { expression: { validate: a.assertNodeType("Expression") } } + }), + o["default"]("DoExpression", { + visitor: ["body"], + aliases: ["Expression"], + fields: { body: { validate: a.assertNodeType("BlockStatement") } } + }), + o["default"]("ExportDefaultSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { exported: { validate: a.assertNodeType("Identifier") } } + }), + o["default"]("ExportNamespaceSpecifier", { + visitor: ["exported"], + aliases: ["ModuleSpecifier"], + fields: { exported: { validate: a.assertNodeType("Identifier") } } + }), + o["default"]("RestProperty", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { argument: { validate: a.assertNodeType("LVal") } } + }), + o["default"]("SpreadProperty", { + visitor: ["argument"], + aliases: ["UnaryLike"], + fields: { argument: { validate: a.assertNodeType("Expression") } } + }) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"], + a = r(i), + o = s(a) + o["default"]("AnyTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }), + o["default"]("ArrayTypeAnnotation", { + visitor: ["elementType"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("BooleanTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }), + o["default"]("BooleanLiteralTypeAnnotation", { aliases: ["Flow"], fields: {} }), + o["default"]("NullLiteralTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }), + o["default"]("ClassImplements", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("ClassProperty", { + visitor: ["key", "value", "typeAnnotation", "decorators"], + aliases: ["Flow", "Property"], + fields: {} + }), + o["default"]("DeclareClass", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }), + o["default"]("DeclareFunction", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }), + o["default"]("DeclareInterface", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }), + o["default"]("DeclareModule", { + visitor: ["id", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }), + o["default"]("DeclareTypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }), + o["default"]("DeclareVariable", { + visitor: ["id"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }), + o["default"]("ExistentialTypeParam", { aliases: ["Flow"] }), + o["default"]("FunctionTypeAnnotation", { + visitor: ["typeParameters", "params", "rest", "returnType"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("FunctionTypeParam", { + visitor: ["name", "typeAnnotation"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("GenericTypeAnnotation", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("InterfaceExtends", { + visitor: ["id", "typeParameters"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("InterfaceDeclaration", { + visitor: ["id", "typeParameters", "extends", "body"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }), + o["default"]("IntersectionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("MixedTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"] + }), + o["default"]("NullableTypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("NumericLiteralTypeAnnotation", { aliases: ["Flow"], fields: {} }), + o["default"]("NumberTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }), + o["default"]("StringLiteralTypeAnnotation", { aliases: ["Flow"], fields: {} }), + o["default"]("StringTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }), + o["default"]("ThisTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }), + o["default"]("TupleTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("TypeofTypeAnnotation", { + visitor: ["argument"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("TypeAlias", { + visitor: ["id", "typeParameters", "right"], + aliases: ["Flow", "FlowDeclaration", "Statement", "Declaration"], + fields: {} + }), + o["default"]("TypeAnnotation", { + visitor: ["typeAnnotation"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("TypeCastExpression", { + visitor: ["expression", "typeAnnotation"], + aliases: ["Flow", "ExpressionWrapper", "Expression"], + fields: {} + }), + o["default"]("TypeParameterDeclaration", { + visitor: ["params"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("TypeParameterInstantiation", { + visitor: ["params"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("ObjectTypeAnnotation", { + visitor: ["properties", "indexers", "callProperties"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("ObjectTypeCallProperty", { + visitor: ["value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} + }), + o["default"]("ObjectTypeIndexer", { + visitor: ["id", "key", "value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} + }), + o["default"]("ObjectTypeProperty", { + visitor: ["key", "value"], + aliases: ["Flow", "UserWhitespacable"], + fields: {} + }), + o["default"]("QualifiedTypeIdentifier", { + visitor: ["id", "qualification"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("UnionTypeAnnotation", { + visitor: ["types"], + aliases: ["Flow"], + fields: {} + }), + o["default"]("VoidTypeAnnotation", { + aliases: ["Flow", "FlowBaseAnnotation"], + fields: {} + }) + }, + function(e, t, r, n, i, s) { + "use strict" + function a(e) { + return Array.isArray(e) + ? "array" + : null === e + ? "null" + : void 0 === e + ? "undefined" + : typeof e + } + function o(e) { + function t(t, r, n) { + if (Array.isArray(n)) + for (var i = 0; i < n.length; i++) e(t, r + "[" + i + "]", n[i]) + } + return (t.each = e), t + } + function u() { + function e(e, t, n) { + if (r.indexOf(n) < 0) + throw new TypeError( + "Property " + + t + + " expected value to be one of " + + JSON.stringify(r) + + " but got " + + JSON.stringify(n) + ) + } + for (var t = arguments.length, r = Array(t), n = 0; t > n; n++) + r[n] = arguments[n] + return (e.oneOf = r), e + } + function l() { + function e(e, t, n) { + for (var i = !1, s = r, a = Array.isArray(s), o = 0, s = a ? s : d(s); ; ) { + var u + if (a) { + if (o >= s.length) break + u = s[o++] + } else { + if (((o = s.next()), o.done)) break + u = o.value + } + var l = u + if (v.is(l, n)) { + i = !0 + break + } + } + if (!i) + throw new TypeError( + "Property " + + t + + " of " + + e.type + + " expected node to be of a type " + + JSON.stringify(r) + + " but instead got " + + JSON.stringify(n && n.type) + ) + } + for (var t = arguments.length, r = Array(t), n = 0; t > n; n++) + r[n] = arguments[n] + return (e.oneOfNodeTypes = r), e + } + function c() { + function e(e, t, n) { + for (var i = !1, s = r, o = Array.isArray(s), u = 0, s = o ? s : d(s); ; ) { + var l + if (o) { + if (u >= s.length) break + l = s[u++] + } else { + if (((u = s.next()), u.done)) break + l = u.value + } + var c = l + if (a(n) === c || v.is(c, n)) { + i = !0 + break + } + } + if (!i) + throw new TypeError( + "Property " + + t + + " of " + + e.type + + " expected node to be of a type " + + JSON.stringify(r) + + " but instead got " + + JSON.stringify(n && n.type) + ) + } + for (var t = arguments.length, r = Array(t), n = 0; t > n; n++) + r[n] = arguments[n] + return (e.oneOfNodeOrValueTypes = r), e + } + function p(e) { + function t(t, r, n) { + var i = a(n) === e + if (!i) + throw new TypeError( + "Property " + r + " expected type of " + e + " but got " + a(n) + ) + } + return (t.type = e), t + } + function f() { + function e() { + for (var e = r, t = Array.isArray(e), n = 0, e = t ? e : d(e); ; ) { + var i + if (t) { + if (n >= e.length) break + i = e[n++] + } else { + if (((n = e.next()), n.done)) break + i = n.value + } + var s = i + s.apply(void 0, arguments) + } + } + for (var t = arguments.length, r = Array(t), n = 0; t > n; n++) + r[n] = arguments[n] + return (e.chainOf = r), e + } + function h(e) { + var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1], + r = (t.inherits && D[t.inherits]) || {} + ;(t.fields = t.fields || r.fields || {}), + (t.visitor = t.visitor || r.visitor || []), + (t.aliases = t.aliases || r.aliases || []), + (t.builder = t.builder || r.builder || t.visitor || []), + t.deprecatedAlias && (A[t.deprecatedAlias] = e) + for (var n = t.visitor.concat(t.builder), i = 0; i < n.length; i++) { + var s = n[i] + t.fields[s] = t.fields[s] || {} + } + for (var s in t.fields) { + var o = t.fields[s] + void 0 === o["default"] + ? (o["default"] = null) + : o.validate || (o.validate = p(a(o["default"]))) + } + ;(g[e] = t.visitor), + (x[e] = t.builder), + (b[e] = t.fields), + (E[e] = t.aliases), + (D[e] = t) + } + var d = r(n)["default"], + m = r(i)["default"] + ;(t.__esModule = !0), + (t.assertEach = o), + (t.assertOneOf = u), + (t.assertNodeType = l), + (t.assertNodeOrValueType = c), + (t.assertValueType = p), + (t.chain = f), + (t["default"] = h) + var y = r(s), + v = m(y), + g = {} + t.VISITOR_KEYS = g + var E = {} + t.ALIAS_KEYS = E + var b = {} + t.NODE_FIELDS = b + var x = {} + t.BUILDER_KEYS = x + var A = {} + t.DEPRECATED_KEYS = A + var D = {} + }, + function(e, t, r, n, i, s, a, o, u, l) { + "use strict" + r(n), r(i), r(s), r(a), r(o), r(u), r(l) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"], + a = r(i), + o = s(a) + o["default"]("JSXAttribute", { + visitor: ["name", "value"], + aliases: ["JSX", "Immutable"], + fields: { + name: { validate: a.assertNodeType("JSXIdentifier", "JSXNamespacedName") }, + value: { + optional: !0, + validate: a.assertNodeType( + "JSXElement", + "StringLiteral", + "JSXExpressionContainer" + ) + } + } + }), + o["default"]("JSXClosingElement", { + visitor: ["name"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: a.assertNodeType("JSXIdentifier", "JSXMemberExpression") + } + } + }), + o["default"]("JSXElement", { + builder: ["openingElement", "closingElement", "children", "selfClosing"], + visitor: ["openingElement", "children", "closingElement"], + aliases: ["JSX", "Immutable", "Expression"], + fields: { + openingElement: { validate: a.assertNodeType("JSXOpeningElement") }, + closingElement: { + optional: !0, + validate: a.assertNodeType("JSXClosingElement") + }, + children: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach( + a.assertNodeType( + "JSXText", + "JSXExpressionContainer", + "JSXElement" + ) + ) + ) + } + } + }), + o["default"]("JSXEmptyExpression", { aliases: ["JSX", "Expression"] }), + o["default"]("JSXExpressionContainer", { + visitor: ["expression"], + aliases: ["JSX", "Immutable"], + fields: { expression: { validate: a.assertNodeType("Expression") } } + }), + o["default"]("JSXIdentifier", { + builder: ["name"], + aliases: ["JSX", "Expression"], + fields: { name: { validate: a.assertValueType("string") } } + }), + o["default"]("JSXMemberExpression", { + visitor: ["object", "property"], + aliases: ["JSX", "Expression"], + fields: { + object: { + validate: a.assertNodeType("JSXMemberExpression", "JSXIdentifier") + }, + property: { validate: a.assertNodeType("JSXIdentifier") } + } + }), + o["default"]("JSXNamespacedName", { + visitor: ["namespace", "name"], + aliases: ["JSX"], + fields: { + namespace: { validate: a.assertNodeType("JSXIdentifier") }, + name: { validate: a.assertNodeType("JSXIdentifier") } + } + }), + o["default"]("JSXOpeningElement", { + builder: ["name", "attributes", "selfClosing"], + visitor: ["name", "attributes"], + aliases: ["JSX", "Immutable"], + fields: { + name: { + validate: a.assertNodeType("JSXIdentifier", "JSXMemberExpression") + }, + selfClosing: { default: !1, validate: a.assertValueType("boolean") }, + attributes: { + validate: a.chain( + a.assertValueType("array"), + a.assertEach( + a.assertNodeType("JSXAttribute", "JSXSpreadAttribute") + ) + ) + } + } + }), + o["default"]("JSXSpreadAttribute", { + visitor: ["argument"], + aliases: ["JSX"], + fields: { argument: { validate: a.assertNodeType("Expression") } } + }), + o["default"]("JSXText", { + aliases: ["JSX"], + builder: ["value"], + fields: { value: { validate: a.assertValueType("string") } } + }) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"], + a = r(i), + o = s(a) + o["default"]("Noop", { visitor: [] }), + o["default"]("ParenthesizedExpression", { + visitor: ["expression"], + aliases: ["Expression", "ExpressionWrapper"], + fields: { expression: { validate: a.assertNodeType("Expression") } } + }) + }, + function(e, t, r, n, i) { + "use strict" + function s(e) { + var t = a(e) + return 1 === t.length ? t[0] : c.unionTypeAnnotation(t) + } + function a(e) { + for (var t = {}, r = {}, n = [], i = [], s = 0; s < e.length; s++) { + var o = e[s] + if (o && !(i.indexOf(o) >= 0)) { + if (c.isAnyTypeAnnotation(o)) return [o] + if (c.isFlowBaseAnnotation(o)) r[o.type] = o + else if (c.isUnionTypeAnnotation(o)) + n.indexOf(o.types) < 0 && ((e = e.concat(o.types)), n.push(o.types)) + else if (c.isGenericTypeAnnotation(o)) { + var u = o.id.name + if (t[u]) { + var l = t[u] + l.typeParameters + ? o.typeParameters && + (l.typeParameters.params = a( + l.typeParameters.params.concat( + o.typeParameters.params + ) + )) + : (l = o.typeParameters) + } else t[u] = o + } else i.push(o) + } + } + for (var p in r) i.push(r[p]) + for (var f in t) i.push(t[f]) + return i + } + function o(e) { + if ("string" === e) return c.stringTypeAnnotation() + if ("number" === e) return c.numberTypeAnnotation() + if ("undefined" === e) return c.voidTypeAnnotation() + if ("boolean" === e) return c.booleanTypeAnnotation() + if ("function" === e) return c.genericTypeAnnotation(c.identifier("Function")) + if ("object" === e) return c.genericTypeAnnotation(c.identifier("Object")) + if ("symbol" === e) return c.genericTypeAnnotation(c.identifier("Symbol")) + throw new Error("Invalid typeof value") + } + var u = r(n)["default"] + ;(t.__esModule = !0), + (t.createUnionTypeAnnotation = s), + (t.removeTypeDuplicates = a), + (t.createTypeAnnotationBasedOnTypeof = o) + var l = r(i), + c = u(l) + }, + function(e, t, r, n, i, s, a, o, u, l, c, p, f, h, d, m, y, v, g, E, b, x) { + "use strict" + function A(e) { + var t = (ue["is" + e] = function(t, r) { + return ue.is(e, t, r) + }) + ue["assert" + e] = function(r, n) { + if (((n = n || {}), !t(r, n))) + throw new Error( + "Expected type " + + JSON.stringify(e) + + " with option " + + JSON.stringify(n) + ) + } + } + function D(e, t, r) { + if (!t) return !1 + var n = C(t.type, e) + return n ? ("undefined" == typeof r ? !0 : ue.shallowEqual(t, r)) : !1 + } + function C(e, t) { + if (e === t) return !0 + var r = ue.FLIPPED_ALIAS_KEYS[t] + if (r) { + if (r[0] === e) return !0 + for (var n = r, i = Array.isArray(n), s = 0, n = i ? n : q(n); ; ) { + var a + if (i) { + if (s >= n.length) break + a = n[s++] + } else { + if (((s = n.next()), s.done)) break + a = s.value + } + var o = a + if (e === o) return !0 + } + } + return !1 + } + function S(e, t, r) { + if (e) { + var n = ue.NODE_FIELDS[e.type] + if (n) { + var i = n[t] + i && i.validate && ((i.optional && null == r) || i.validate(e, t, r)) + } + } + } + function F(e, t) { + for (var r = W(t), n = r, i = 0; i < n.length; i++) { + var s = n[i] + if (e[s] !== t[s]) return !1 + } + return !0 + } + function w(e, t, r) { + return ( + (e.object = ue.memberExpression(e.object, e.property, e.computed)), + (e.property = t), + (e.computed = !!r), + e + ) + } + function _(e, t) { + return (e.object = ue.memberExpression(t, e.object)), e + } + function T(e) { + var t = arguments.length <= 1 || void 0 === arguments[1] ? "body" : arguments[1] + return (e[t] = ue.toBlock(e[t], e)) + } + function P(e) { + var t = {} + for (var r in e) "_" !== r[0] && (t[r] = e[r]) + return t + } + function B(e) { + var t = P(e) + return delete t.loc, t + } + function k(e) { + var t = {} + for (var r in e) + if ("_" !== r[0]) { + var n = e[r] + n && + (n.type + ? (n = ue.cloneDeep(n)) + : Array.isArray(n) && (n = n.map(ue.cloneDeep))), + (t[r] = n) + } + return t + } + function I(e, t) { + var r = e.split(".") + return function(e) { + if (!ue.isMemberExpression(e)) return !1 + for (var n = [e], i = 0; n.length; ) { + var s = n.shift() + if (t && i === r.length) return !0 + if (ue.isIdentifier(s)) { + if (r[i] !== s.name) return !1 + } else { + if (!ue.isStringLiteral(s)) { + if (ue.isMemberExpression(s)) { + if (s.computed && !ue.isStringLiteral(s.property)) return !1 + n.push(s.object), n.push(s.property) + continue + } + return !1 + } + if (r[i] !== s.value) return !1 + } + if (++i > r.length) return !1 + } + return !0 + } + } + function O(e) { + for ( + var t = ue.COMMENT_KEYS, r = Array.isArray(t), n = 0, t = r ? t : q(t); + ; + + ) { + var i + if (r) { + if (n >= t.length) break + i = t[n++] + } else { + if (((n = t.next()), n.done)) break + i = n.value + } + var s = i + delete e[s] + } + return e + } + function M(e, t) { + return R(e, t), L(e, t), N(e, t), e + } + function R(e, t) { + j("trailingComments", e, t) + } + function L(e, t) { + j("leadingComments", e, t) + } + function N(e, t) { + j("innerComments", e, t) + } + function j(e, t, r) { + t && r && (t[e] = ie["default"](Q["default"]([].concat(t[e], r[e])))) + } + function U(e, t) { + if (!e || !t) return e + for (var r = ue.INHERIT_KEYS.optional, n = 0; n < r.length; n++) { + var i = r[n] + null == e[i] && (e[i] = t[i]) + } + for (var i in t) "_" === i[0] && (e[i] = t[i]) + for (var s = ue.INHERIT_KEYS.force, a = 0; a < s.length; a++) { + var i = s[a] + e[i] = t[i] + } + return ue.inheritsComments(e, t), e + } + function V(e) { + if (!G(e)) throw new TypeError("Not a valid node " + (e && e.type)) + } + function G(e) { + return !(!e || !se.VISITOR_KEYS[e.type]) + } + var W = r(n)["default"], + q = r(i)["default"], + H = r(s)["default"], + Y = r(a)["default"], + J = r(o)["default"], + K = r(u)["default"] + ;(t.__esModule = !0), + (t.is = D), + (t.isType = C), + (t.validate = S), + (t.shallowEqual = F), + (t.appendToMemberExpression = w), + (t.prependToMemberExpression = _), + (t.ensureBlock = T), + (t.clone = P), + (t.cloneWithoutLoc = B), + (t.cloneDeep = k), + (t.buildMatchMemberExpression = I), + (t.removeComments = O), + (t.inheritsComments = M), + (t.inheritTrailingComments = R), + (t.inheritLeadingComments = L), + (t.inheritInnerComments = N), + (t.inherits = U), + (t.assertNode = V), + (t.isNode = G) + var X = r(l), + z = H(X), + $ = r(c), + Q = H($), + Z = r(p), + ee = H(Z), + te = r(f), + re = H(te), + ne = r(h), + ie = H(ne) + r(d) + var se = r(m), + ae = r(y), + oe = Y(ae), + ue = t, + le = r(v) + J(t, K(le, J)), + (t.VISITOR_KEYS = se.VISITOR_KEYS), + (t.ALIAS_KEYS = se.ALIAS_KEYS), + (t.NODE_FIELDS = se.NODE_FIELDS), + (t.BUILDER_KEYS = se.BUILDER_KEYS), + (t.DEPRECATED_KEYS = se.DEPRECATED_KEYS), + (t.react = oe) + for (var ce in ue.VISITOR_KEYS) A(ce) + ;(ue.FLIPPED_ALIAS_KEYS = {}), + re["default"](ue.ALIAS_KEYS, function(e, t) { + re["default"](e, function(e) { + var r = (ue.FLIPPED_ALIAS_KEYS[e] = ue.FLIPPED_ALIAS_KEYS[e] || []) + r.push(t) + }) + }), + re["default"](ue.FLIPPED_ALIAS_KEYS, function(e, t) { + ;(ue[t.toUpperCase() + "_TYPES"] = e), A(t) + }) + var pe = W(ue.VISITOR_KEYS) + .concat(W(ue.FLIPPED_ALIAS_KEYS)) + .concat(W(ue.DEPRECATED_KEYS)) + ;(t.TYPES = pe), + re["default"](ue.BUILDER_KEYS, function(e, t) { + function r() { + if (arguments.length > e.length) + throw new Error( + "t." + + t + + ": Too many arguments passed. Received " + + arguments.length + + " but can receive no more than " + + e.length + ) + var r = {} + r.type = t + for (var n = 0, i = e, s = 0; s < i.length; s++) { + var a = i[s], + o = ue.NODE_FIELDS[t][a], + u = arguments[n++] + void 0 === u && (u = ee["default"](o["default"])), (r[a] = u) + } + for (var a in r) S(r, a, r[a]) + return r + } + ;(ue[t] = r), (ue[t[0].toLowerCase() + t.slice(1)] = r) + }) + var fe = function(e) { + var t = function(t) { + return function() { + return ( + console.trace( + "The node type " + e + " has been renamed to " + r + ), + t.apply(this, arguments) + ) + } + }, + r = ue.DEPRECATED_KEYS[e] + ;(ue[e] = ue[e[0].toLowerCase() + e.slice(1)] = t(ue[r])), + (ue["is" + e] = t(ue["is" + r])), + (ue["assert" + e] = t(ue["assert" + r])) + } + for (var ce in ue.DEPRECATED_KEYS) fe(ce) + z["default"](ue), z["default"](ue.VISITOR_KEYS) + var he = r(g) + J(t, K(he, J)) + var de = r(E) + J(t, K(de, J)) + var me = r(b) + J(t, K(me, J)) + var ye = r(x) + J(t, K(ye, J)) + }, + function(e, t, r, n, i) { + "use strict" + function s(e) { + return !!e && /^[a-z]|\-/.test(e) + } + function a(e, t) { + for (var r = e.value.split(/\r\n|\n|\r/), n = 0, i = 0; i < r.length; i++) + r[i].match(/[^ \t]/) && (n = i) + for (var s = "", i = 0; i < r.length; i++) { + var a = r[i], + o = 0 === i, + u = i === r.length - 1, + l = i === n, + p = a.replace(/\t/g, " ") + o || (p = p.replace(/^[ ]+/, "")), + u || (p = p.replace(/[ ]+$/, "")), + p && (l || (p += " "), (s += p)) + } + s && t.push(c.stringLiteral(s)) + } + function o(e) { + for (var t = [], r = 0; r < e.children.length; r++) { + var n = e.children[r] + c.isJSXText(n) + ? a(n, t) + : (c.isJSXExpressionContainer(n) && (n = n.expression), + c.isJSXEmptyExpression(n) || t.push(n)) + } + return t + } + var u = r(n)["default"] + ;(t.__esModule = !0), (t.isCompatTag = s), (t.buildChildren = o) + var l = r(i), + c = u(l), + p = c.buildMatchMemberExpression("React.Component") + t.isReactComponent = p + }, + function(e, t, r, n, i, s) { + "use strict" + function a(e, t, r) { + for (var n = [].concat(e), i = u(null); n.length; ) { + var s = n.shift() + if (s) { + var a = p.getBindingIdentifiers.keys[s.type] + if (p.isIdentifier(s)) + if (t) { + var o = (i[s.name] = i[s.name] || []) + o.push(s) + } else i[s.name] = s + else if (p.isExportDeclaration(s)) + p.isDeclaration(e.declaration) && n.push(e.declaration) + else { + if (r) { + if (p.isFunctionDeclaration(s)) { + n.push(s.id) + continue + } + if (p.isFunctionExpression(s)) continue + } + if (a) + for (var l = 0; l < a.length; l++) { + var c = a[l] + s[c] && (n = n.concat(s[c])) + } + } + } + } + return i + } + function o(e, t) { + return a(e, t, !0) + } + var u = r(n)["default"], + l = r(i)["default"] + ;(t.__esModule = !0), + (t.getBindingIdentifiers = a), + (t.getOuterBindingIdentifiers = o) + var c = r(s), + p = l(c) + a.keys = { + DeclareClass: ["id"], + DeclareFunction: ["id"], + DeclareModule: ["id"], + DeclareVariable: ["id"], + InterfaceDeclaration: ["id"], + TypeAlias: ["id"], + CatchClause: ["param"], + LabeledStatement: ["label"], + UnaryExpression: ["argument"], + AssignmentExpression: ["left"], + ImportSpecifier: ["local"], + ImportNamespaceSpecifier: ["local"], + ImportDefaultSpecifier: ["local"], + ImportDeclaration: ["specifiers"], + ExportSpecifier: ["exported"], + ExportNamespaceSpecifier: ["exported"], + ExportDefaultSpecifier: ["exported"], + FunctionDeclaration: ["id", "params"], + FunctionExpression: ["id", "params"], + ClassDeclaration: ["id"], + ClassExpression: ["id"], + RestElement: ["argument"], + UpdateExpression: ["argument"], + RestProperty: ["argument"], + ObjectProperty: ["value"], + AssignmentPattern: ["left"], + ArrayPattern: ["elements"], + ObjectPattern: ["properties"], + VariableDeclaration: ["declarations"], + VariableDeclarator: ["id"] + } + }, + function(e, t, r, n, i, s, a, o, u) { + "use strict" + function l(e, t) { + var r = b.getBindingIdentifiers.keys[t.type] + if (r) + for (var n = 0; n < r.length; n++) { + var i = r[n], + s = t[i] + if (Array.isArray(s)) { + if (s.indexOf(e) >= 0) return !0 + } else if (s === e) return !0 + } + return !1 + } + function c(e, t) { + switch (t.type) { + case "BindExpression": + return t.object === e || t.callee === e + case "MemberExpression": + case "JSXMemberExpression": + return t.property === e && t.computed ? !0 : t.object === e + case "MetaProperty": + return !1 + case "ObjectProperty": + if (t.key === e) return t.computed + case "VariableDeclarator": + return t.id !== e + case "ArrowFunctionExpression": + case "FunctionDeclaration": + case "FunctionExpression": + for (var r = t.params, n = 0; n < r.length; n++) { + var i = r[n] + if (i === e) return !1 + } + return t.id !== e + case "ExportSpecifier": + return t.source ? !1 : t.local === e + case "ExportNamespaceSpecifier": + case "ExportDefaultSpecifier": + return !1 + case "JSXAttribute": + return t.name !== e + case "ClassProperty": + return t.value === e + case "ImportDefaultSpecifier": + case "ImportNamespaceSpecifier": + case "ImportSpecifier": + return !1 + case "ClassDeclaration": + case "ClassExpression": + return t.id !== e + case "ClassMethod": + case "ObjectMethod": + return t.key === e && t.computed + case "LabeledStatement": + return !1 + case "CatchClause": + return t.param !== e + case "RestElement": + return !1 + case "AssignmentExpression": + return t.right === e + case "AssignmentPattern": + return t.right === e + case "ObjectPattern": + case "ArrayPattern": + return !1 + } + return !0 + } + function p(e) { + return "string" != typeof e || A["default"].keyword.isReservedWordES6(e, !0) + ? !1 + : A["default"].keyword.isIdentifierNameES6(e) + } + function f(e) { + return ( + C.isVariableDeclaration(e) && ("var" !== e.kind || e[S.BLOCK_SCOPED_SYMBOL]) + ) + } + function h(e) { + return C.isFunctionDeclaration(e) || C.isClassDeclaration(e) || C.isLet(e) + } + function d(e) { + return C.isVariableDeclaration(e, { kind: "var" }) && !e[S.BLOCK_SCOPED_SYMBOL] + } + function m(e) { + return ( + C.isImportDefaultSpecifier(e) || + C.isIdentifier(e.imported || e.exported, { name: "default" }) + ) + } + function y(e, t) { + return C.isBlockStatement(e) && C.isFunction(t, { body: e }) + ? !1 + : C.isScopable(e) + } + function v(e) { + return C.isType(e.type, "Immutable") + ? !0 + : C.isIdentifier(e) + ? "undefined" === e.name + : !1 + } + var g = r(n)["default"], + E = r(i)["default"] + ;(t.__esModule = !0), + (t.isBinding = l), + (t.isReferenced = c), + (t.isValidIdentifier = p), + (t.isLet = f), + (t.isBlockScoped = h), + (t.isVar = d), + (t.isSpecifierDefault = m), + (t.isScope = y), + (t.isImmutable = v) + var b = r(s), + x = r(a), + A = g(x), + D = r(o), + C = E(D), + S = r(u) + }, + function(e, t, r, n) { + function i() { + return ( + "WebkitAppearance" in document.documentElement.style || + (window.console && + (console.firebug || (console.exception && console.table))) || + (navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && + parseInt(RegExp.$1, 10) >= 31) + ) + } + function s() { + var e = arguments, + r = this.useColors + if ( + ((e[0] = + (r ? "%c" : "") + + this.namespace + + (r ? " %c" : " ") + + e[0] + + (r ? "%c " : " ") + + "+" + + t.humanize(this.diff)), + !r) + ) + return e + var n = "color: " + this.color + e = [e[0], n, "color: inherit"].concat(Array.prototype.slice.call(e, 1)) + var i = 0, + s = 0 + return ( + e[0].replace(/%[a-z%]/g, function(e) { + "%%" !== e && (i++, "%c" === e && (s = i)) + }), + e.splice(s, 0, n), + e + ) + } + function a() { + return ( + "object" == typeof console && + console.log && + Function.prototype.apply.call(console.log, console, arguments) + ) + } + function o(e) { + try { + null == e ? t.storage.removeItem("debug") : (t.storage.debug = e) + } catch (r) {} + } + function u() { + var e + try { + e = t.storage.debug + } catch (r) {} + return e + } + function l() { + try { + return window.localStorage + } catch (e) {} + } + ;(t = e.exports = r(n)), + (t.log = a), + (t.formatArgs = s), + (t.save = o), + (t.load = u), + (t.useColors = i), + (t.storage = + "undefined" != typeof chrome && "undefined" != typeof chrome.storage + ? chrome.storage.local + : l()), + (t.colors = [ + "lightseagreen", + "forestgreen", + "goldenrod", + "dodgerblue", + "darkorchid", + "crimson" + ]), + (t.formatters.j = function(e) { + return JSON.stringify(e) + }), + t.enable(u()) + }, + function(e, t, r, n) { + function i() { + return t.colors[p++ % t.colors.length] + } + function s(e) { + function r() {} + function n() { + var e = n, + r = +new Date(), + s = r - (c || r) + ;(e.diff = s), + (e.prev = c), + (e.curr = r), + (c = r), + null == e.useColors && (e.useColors = t.useColors()), + null == e.color && e.useColors && (e.color = i()) + var a = Array.prototype.slice.call(arguments) + ;(a[0] = t.coerce(a[0])), "string" != typeof a[0] && (a = ["%o"].concat(a)) + var o = 0 + ;(a[0] = a[0].replace(/%([a-z%])/g, function(r, n) { + if ("%%" === r) return r + o++ + var i = t.formatters[n] + if ("function" == typeof i) { + var s = a[o] + ;(r = i.call(e, s)), a.splice(o, 1), o-- + } + return r + })), + "function" == typeof t.formatArgs && (a = t.formatArgs.apply(e, a)) + var u = n.log || t.log || console.log.bind(console) + u.apply(e, a) + } + ;(r.enabled = !1), (n.enabled = !0) + var s = t.enabled(e) ? n : r + return (s.namespace = e), s + } + function a(e) { + t.save(e) + for (var r = (e || "").split(/[\s,]+/), n = r.length, i = 0; n > i; i++) + r[i] && + ((e = r[i].replace(/\*/g, ".*?")), + "-" === e[0] + ? t.skips.push(new RegExp("^" + e.substr(1) + "$")) + : t.names.push(new RegExp("^" + e + "$"))) + } + function o() { + t.enable("") + } + function u(e) { + var r, n + for (r = 0, n = t.skips.length; n > r; r++) if (t.skips[r].test(e)) return !1 + for (r = 0, n = t.names.length; n > r; r++) if (t.names[r].test(e)) return !0 + return !1 + } + function l(e) { + return e instanceof Error ? e.stack || e.message : e + } + ;(t = e.exports = s), + (t.coerce = l), + (t.disable = o), + (t.enable = a), + (t.enabled = u), + (t.humanize = r(n)), + (t.names = []), + (t.skips = []), + (t.formatters = {}) + var c, + p = 0 + }, + function(e, t, r, n, i, s, a) { + function o(e, t, r, n) { + var i = e ? e.length : 0 + return i + ? (null != t && + "boolean" != typeof t && + ((n = r), (r = c(e, t, n) ? void 0 : t), (t = !1)), + (r = null == r ? r : u(r, n, 3)), + t ? p(e, r) : l(e, r)) + : [] + } + var u = r(n), + l = r(i), + c = r(s), + p = r(a) + e.exports = o + }, + function(e, t, r, n) { + e.exports = r(n) + }, + function(e, t, r, n, i, s) { + var a = r(n), + o = r(i), + u = r(s), + l = u(a, o) + e.exports = l + }, + function(e, t, r, n, i, s, a, o, u, l) { + function c(e, t, r, n) { + var i = e ? f(e) : 0 + return ( + m(i) || ((e = v(e)), (i = e.length)), + (r = + "number" != typeof r || (n && d(t, r, n)) + ? 0 + : 0 > r + ? g(i + r, 0) + : r || 0), + "string" == typeof e || (!h(e) && y(e)) + ? i >= r && e.indexOf(t, r) > -1 + : !!i && p(e, t, r) > -1 + ) + } + var p = r(n), + f = r(i), + h = r(s), + d = r(a), + m = r(o), + y = r(u), + v = r(l), + g = Math.max + e.exports = c + }, + function(e, t, r, n, i) { + ;(function(t) { + function s(e) { + var t = e ? e.length : 0 + for (this.data = { hash: l(null), set: new u() }; t--; ) this.push(e[t]) + } + var a = r(n), + o = r(i), + u = o(t, "Set"), + l = o(Object, "create") + ;(s.prototype.push = a), (e.exports = s) + }.call( + t, + (function() { + return this + })() + )) + }, + function(e, t, r, n) { + function i(e, t, r) { + for (var n = -1, i = s(t), a = i.length; ++n < a; ) { + var o = i[n], + u = e[o], + l = r(u, t[o], o, e, t) + ;((l === l ? l === u : u !== u) && (void 0 !== u || o in e)) || (e[o] = l) + } + return e + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n, i) { + function s(e, t) { + return null == t ? e : a(t, o(t), e) + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n, i, s, a, o) { + function u(e, t, r) { + var n = typeof e + return "function" == n + ? void 0 === t + ? e + : p(e, t, r) + : null == e + ? f + : "object" == n + ? l(e) + : void 0 === t + ? h(e) + : c(e, t) + } + var l = r(n), + c = r(i), + p = r(s), + f = r(a), + h = r(o) + e.exports = u + }, + function(e, t, r, n, i, s, a, o, u, l, c, p) { + function f(e, t, r, n, i, s, a) { + var o + if ((r && (o = i ? r(e, n, i) : r(e)), void 0 !== o)) return o + if (!x(e)) return e + var u = b(e) + if (u) { + if (((o = v(e)), !t)) return h(e, o) + } else { + var l = J.call(e), + c = l == w + if (l != P && l != A && (!c || i)) return H[l] ? g(e, l, t) : i ? e : {} + if (((o = E(c ? {} : e)), !t)) return m(o, e) + } + s || (s = []), a || (a = []) + for (var p = s.length; p--; ) if (s[p] == e) return a[p] + return ( + s.push(e), + a.push(o), + (u ? d : y)(e, function(n, i) { + o[i] = f(n, t, r, i, e, s, a) + }), + o + ) + } + var h = r(n), + d = r(i), + m = r(s), + y = r(a), + v = r(o), + g = r(u), + E = r(l), + b = r(c), + x = r(p), + A = "[object Arguments]", + D = "[object Array]", + C = "[object Boolean]", + S = "[object Date]", + F = "[object Error]", + w = "[object Function]", + _ = "[object Map]", + T = "[object Number]", + P = "[object Object]", + B = "[object RegExp]", + k = "[object Set]", + I = "[object String]", + O = "[object WeakMap]", + M = "[object ArrayBuffer]", + R = "[object Float32Array]", + L = "[object Float64Array]", + N = "[object Int8Array]", + j = "[object Int16Array]", + U = "[object Int32Array]", + V = "[object Uint8Array]", + G = "[object Uint8ClampedArray]", + W = "[object Uint16Array]", + q = "[object Uint32Array]", + H = {} + ;(H[A] = H[D] = H[M] = H[C] = H[S] = H[R] = H[L] = H[N] = H[j] = H[U] = H[T] = H[ + P + ] = H[B] = H[I] = H[V] = H[G] = H[W] = H[q] = !0), + (H[F] = H[w] = H[_] = H[k] = H[O] = !1) + var Y = Object.prototype, + J = Y.toString + e.exports = f + }, + function(e, t, r, n, i) { + var s = r(n), + a = r(i), + o = a(s) + e.exports = o + }, + function(e, t, r, n) { + var i = r(n), + s = i() + e.exports = s + }, + function(e, t, r, n, i) { + function s(e, t) { + return a(e, t, o) + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n, i) { + function s(e, t) { + return a(e, t, o) + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n) { + function i(e, t, r) { + if (null != e) { + void 0 !== r && r in s(e) && (t = [r]) + for (var n = 0, i = t.length; null != e && i > n; ) e = e[t[n++]] + return n && n == i ? e : void 0 + } + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n) { + function i(e, t, r) { + if (t !== t) return s(e, r) + for (var n = r - 1, i = e.length; ++n < i; ) if (e[n] === t) return n + return -1 + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n, i, s) { + function a(e, t, r, n, i, s) { + return e === t + ? !0 + : null == e || null == t || (!u(e) && !l(t)) + ? e !== e && t !== t + : o(e, t, a, r, n, i, s) + } + var o = r(n), + u = r(i), + l = r(s) + e.exports = a + }, + function(e, t, r, n, i, s, a, o) { + function u(e, t, r, n, i, s, a) { + var o = f(e), + u = f(t), + v = m, + b = m + o || ((v = E.call(e)), v == d ? (v = y) : v != y && (o = h(e))), + u || ((b = E.call(t)), b == d ? (b = y) : b != y && (u = h(t))) + var x = v == y, + A = b == y, + D = v == b + if (D && !o && !x) return c(e, t, v) + if (!i) { + var C = x && g.call(e, "__wrapped__"), + S = A && g.call(t, "__wrapped__") + if (C || S) return r(C ? e.value() : e, S ? t.value() : t, n, i, s, a) + } + if (!D) return !1 + s || (s = []), a || (a = []) + for (var F = s.length; F--; ) if (s[F] == e) return a[F] == t + s.push(e), a.push(t) + var w = (o ? l : p)(e, t, r, n, i, s, a) + return s.pop(), a.pop(), w + } + var l = r(n), + c = r(i), + p = r(s), + f = r(a), + h = r(o), + d = "[object Arguments]", + m = "[object Array]", + y = "[object Object]", + v = Object.prototype, + g = v.hasOwnProperty, + E = v.toString + e.exports = u + }, + function(e, t, r, n, i) { + function s(e, t, r) { + var n = t.length, + i = n, + s = !r + if (null == e) return !i + for (e = o(e); n--; ) { + var u = t[n] + if (s && u[2] ? u[1] !== e[u[0]] : !(u[0] in e)) return !1 + } + for (; ++n < i; ) { + u = t[n] + var l = u[0], + c = e[l], + p = u[1] + if (s && u[2]) { + if (void 0 === c && !(l in e)) return !1 + } else { + var f = r ? r(c, p, l) : void 0 + if (!(void 0 === f ? a(p, c, r, !0) : f)) return !1 + } + } + return !0 + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n, i, s) { + function a(e) { + var t = u(e) + if (1 == t.length && t[0][2]) { + var r = t[0][0], + n = t[0][1] + return function(e) { + return null == e ? !1 : e[r] === n && (void 0 !== n || r in l(e)) + } + } + return function(e) { + return o(e, t) + } + } + var o = r(n), + u = r(i), + l = r(s) + e.exports = a + }, + function(e, t, r, n, i, s, a, o, u, l, c, p) { + function f(e, t) { + var r = y(e), + n = v(e) && g(t), + i = e + "" + return ( + (e = x(e)), + function(s) { + if (null == s) return !1 + var a = i + if (((s = b(s)), (r || !n) && !(a in s))) { + if (((s = 1 == e.length ? s : h(s, m(e, 0, -1))), null == s)) + return !1 + ;(a = E(e)), (s = b(s)) + } + return s[a] === t ? void 0 !== t || a in s : d(t, s[a], void 0, !0) + } + ) + } + var h = r(n), + d = r(i), + m = r(s), + y = r(a), + v = r(o), + g = r(u), + E = r(l), + b = r(c), + x = r(p) + e.exports = f + }, + function(e, t, r, n, i) { + function s(e) { + var t = e + "" + return ( + (e = o(e)), + function(r) { + return a(r, e, t) + } + ) + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n, i, s) { + function a(e, t) { + var r = -1, + n = o, + i = e.length, + s = !0, + a = s && i >= c, + p = a ? l() : null, + f = [] + p ? ((n = u), (s = !1)) : ((a = !1), (p = t ? [] : f)) + e: for (; ++r < i; ) { + var h = e[r], + d = t ? t(h, r, e) : h + if (s && h === h) { + for (var m = p.length; m--; ) if (p[m] === d) continue e + t && p.push(d), f.push(h) + } else n(p, d, 0) < 0 && ((t || a) && p.push(d), f.push(h)) + } + return f + } + var o = r(n), + u = r(i), + l = r(s), + c = 200 + e.exports = a + }, + function(e, t, r, n) { + function i(e, t, r) { + if ("function" != typeof e) return s + if (void 0 === t) return e + switch (r) { + case 1: + return function(r) { + return e.call(t, r) + } + case 3: + return function(r, n, i) { + return e.call(t, r, n, i) + } + case 4: + return function(r, n, i, s) { + return e.call(t, r, n, i, s) + } + case 5: + return function(r, n, i, s, a) { + return e.call(t, r, n, i, s, a) + } + } + return function() { + return e.apply(t, arguments) + } + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n) { + function i(e, t) { + var r = e.data, + n = "string" == typeof t || s(t) ? r.set.has(t) : r.hash[t] + return n ? 0 : -1 + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n) { + function i(e) { + var t = this.data + "string" == typeof e || s(e) ? t.set.add(e) : (t.hash[e] = !0) + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n, i, s) { + function a(e) { + return l(function(t, r) { + var n = -1, + i = null == t ? 0 : r.length, + s = i > 2 ? r[i - 2] : void 0, + a = i > 2 ? r[2] : void 0, + l = i > 1 ? r[i - 1] : void 0 + for ( + "function" == typeof s + ? ((s = o(s, l, 5)), (i -= 2)) + : ((s = "function" == typeof l ? l : void 0), (i -= s ? 1 : 0)), + a && u(r[0], r[1], a) && ((s = 3 > i ? void 0 : s), (i = 1)); + ++n < i; + + ) { + var c = r[n] + c && e(t, c, s) + } + return t + }) + } + var o = r(n), + u = r(i), + l = r(s) + e.exports = a + }, + function(e, t, r, n, i, s) { + function a(e, t) { + return function(r, n) { + var i = r ? o(r) : 0 + if (!u(i)) return e(r, n) + for ( + var s = t ? i : -1, a = l(r); + (t ? s-- : ++s < i) && n(a[s], s, a) !== !1; + + ); + return r + } + } + var o = r(n), + u = r(i), + l = r(s) + e.exports = a + }, + function(e, t, r, n) { + function i(e) { + return function(t, r, n) { + for ( + var i = s(t), a = n(t), o = a.length, u = e ? o : -1; + e ? u-- : ++u < o; + + ) { + var l = a[u] + if (r(i[l], l, i) === !1) break + } + return t + } + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n, i) { + ;(function(t) { + function s(e) { + return l && u ? new a(e) : null + } + var a = r(n), + o = r(i), + u = o(t, "Set"), + l = o(Object, "create") + e.exports = s + }.call( + t, + (function() { + return this + })() + )) + }, + function(e, t, r, n) { + function i(e, t) { + return s(function(r) { + var n = r[0] + return null == n ? n : (r.push(t), e.apply(void 0, r)) + }) + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n, i) { + function s(e, t) { + return function(r, n, i) { + return "function" == typeof n && void 0 === i && o(r) + ? e(r, n) + : t(r, a(n, i, 3)) + } + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n) { + function i(e, t, r, n, i, a, o) { + var u = -1, + l = e.length, + c = t.length + if (l != c && !(i && c > l)) return !1 + for (; ++u < l; ) { + var p = e[u], + f = t[u], + h = n ? n(i ? f : p, i ? p : f, u) : void 0 + if (void 0 !== h) { + if (h) continue + return !1 + } + if (i) { + if ( + !s(t, function(e) { + return p === e || r(p, e, n, i, a, o) + }) + ) + return !1 + } else if (p !== f && !r(p, f, n, i, a, o)) return !1 + } + return !0 + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n) { + function i(e, t, r, n, i, a, u) { + var l = s(e), + c = l.length, + p = s(t), + f = p.length + if (c != f && !i) return !1 + for (var h = c; h--; ) { + var d = l[h] + if (!(i ? d in t : o.call(t, d))) return !1 + } + for (var m = i; ++h < c; ) { + d = l[h] + var y = e[d], + v = t[d], + g = n ? n(i ? v : y, i ? y : v, d) : void 0 + if (!(void 0 === g ? r(y, v, n, i, a, u) : g)) return !1 + m || (m = "constructor" == d) + } + if (!m) { + var E = e.constructor, + b = t.constructor + if ( + E != b && + "constructor" in e && + "constructor" in t && + !( + "function" == typeof E && + E instanceof E && + "function" == typeof b && + b instanceof b + ) + ) + return !1 + } + return !0 + } + var s = r(n), + a = Object.prototype, + o = a.hasOwnProperty + e.exports = i + }, + function(e, t, r, n) { + var i = r(n), + s = i("length") + e.exports = s + }, + function(e, t, r, n, i) { + function s(e) { + for (var t = o(e), r = t.length; r--; ) t[r][2] = a(t[r][1]) + return t + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n) { + function i(e, t) { + var r = null == e ? void 0 : e[t] + return s(r) ? r : void 0 + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n) { + function i(e, t, r) { + var n = e.constructor + switch (t) { + case p: + return s(e) + case a: + case o: + return new n(+e) + case f: + case h: + case d: + case m: + case y: + case v: + case g: + case E: + case b: + var i = e.buffer + return new n(r ? s(i) : i, e.byteOffset, e.length) + case u: + case c: + return new n(e) + case l: + var A = new n(e.source, x.exec(e)) + A.lastIndex = e.lastIndex + } + return A + } + var s = r(n), + a = "[object Boolean]", + o = "[object Date]", + u = "[object Number]", + l = "[object RegExp]", + c = "[object String]", + p = "[object ArrayBuffer]", + f = "[object Float32Array]", + h = "[object Float64Array]", + d = "[object Int8Array]", + m = "[object Int16Array]", + y = "[object Int32Array]", + v = "[object Uint8Array]", + g = "[object Uint8ClampedArray]", + E = "[object Uint16Array]", + b = "[object Uint32Array]", + x = /\w*$/ + e.exports = i + }, + function(e, t, r, n, i) { + function s(e) { + return null != e && o(a(e)) + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n, i, s) { + function a(e, t, r) { + if (!l(r)) return !1 + var n = typeof t + if ("number" == n ? o(r) && u(t, r.length) : "string" == n && t in r) { + var i = r[t] + return e === e ? e === i : i !== i + } + return !1 + } + var o = r(n), + u = r(i), + l = r(s) + e.exports = a + }, + function(e, t, r, n, i) { + function s(e, t) { + var r = typeof e + if (("string" == r && l.test(e)) || "number" == r) return !0 + if (a(e)) return !1 + var n = !u.test(e) + return n || (null != t && e in o(t)) + } + var a = r(n), + o = r(i), + u = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\n\\]|\\.)*?\1)\]/, + l = /^\w*$/ + e.exports = s + }, + function(e, t, r, n) { + function i(e) { + return e === e && !s(e) + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n, i, s, a, o) { + function u(e) { + for ( + var t = h(e), + r = t.length, + n = r && e.length, + i = !!n && f(n) && (c(e) || l(e)), + s = -1, + a = []; + ++s < r; + + ) { + var o = t[s] + ;((i && p(o, n)) || m.call(e, o)) && a.push(o) + } + return a + } + var l = r(n), + c = r(i), + p = r(s), + f = r(a), + h = r(o), + d = Object.prototype, + m = d.hasOwnProperty + e.exports = u + }, + function(e, t, r, n) { + function i(e) { + return s(e) ? e : Object(e) + } + var s = r(n) + e.exports = i + }, + function(e, t, r, n, i) { + function s(e) { + if (o(e)) return e + var t = [] + return ( + a(e).replace(u, function(e, r, n, i) { + t.push(n ? i.replace(l, "$1") : r || e) + }), + t + ) + } + var a = r(n), + o = r(i), + u = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\n\\]|\\.)*?)\2)\]/g, + l = /\\(\\)?/g + e.exports = s + }, + function(e, t, r, n, i, s) { + function a(e, t, r, n) { + return ( + t && "boolean" != typeof t && l(e, t, r) + ? (t = !1) + : "function" == typeof t && ((n = r), (r = t), (t = !1)), + "function" == typeof r ? o(e, t, u(r, n, 3)) : o(e, t) + ) + } + var o = r(n), + u = r(i), + l = r(s) + e.exports = a + }, + function(e, t, r, n, i) { + function s(e, t, r) { + return "function" == typeof t ? a(e, !0, o(t, r, 3)) : a(e, !0) + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n, i) { + function s(e) { + return o(e) && a(e) && l.call(e, "callee") && !c.call(e, "callee") + } + var a = r(n), + o = r(i), + u = Object.prototype, + l = u.hasOwnProperty, + c = u.propertyIsEnumerable + e.exports = s + }, + function(e, t, r, n, i, s) { + var a = r(n), + o = r(i), + u = r(s), + l = "[object Array]", + c = Object.prototype, + p = c.toString, + f = a(Array, "isArray"), + h = + f || + function(e) { + return u(e) && o(e.length) && p.call(e) == l + } + e.exports = h + }, + function(e, t, r, n) { + function i(e) { + return s(e) && u.call(e) == a + } + var s = r(n), + a = "[object Function]", + o = Object.prototype, + u = o.toString + e.exports = i + }, + function(e, t, r, n, i) { + function s(e) { + return null == e ? !1 : a(e) ? f.test(c.call(e)) : o(e) && u.test(e) + } + var a = r(n), + o = r(i), + u = /^\[object .+?Constructor\]$/, + l = Object.prototype, + c = Function.prototype.toString, + p = l.hasOwnProperty, + f = RegExp( + "^" + + c + .call(p) + .replace(/[\\^$.*+?()[\]{}|]/g, "\\$&") + .replace( + /hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, + "$1.*?" + ) + + "$" + ) + e.exports = s + }, + function(e, t, r, n) { + function i(e) { + return "number" == typeof e || (s(e) && u.call(e) == a) + } + var s = r(n), + a = "[object Number]", + o = Object.prototype, + u = o.toString + e.exports = i + }, + function(e, t, r, n, i, s) { + function a(e) { + var t + if ( + !l(e) || + h.call(e) != c || + u(e) || + (!f.call(e, "constructor") && + ((t = e.constructor), "function" == typeof t && !(t instanceof t))) + ) + return !1 + var r + return ( + o(e, function(e, t) { + r = t + }), + void 0 === r || f.call(e, r) + ) + } + var o = r(n), + u = r(i), + l = r(s), + c = "[object Object]", + p = Object.prototype, + f = p.hasOwnProperty, + h = p.toString + e.exports = a + }, + function(e, t, r, n) { + function i(e) { + return s(e) && u.call(e) == a + } + var s = r(n), + a = "[object RegExp]", + o = Object.prototype, + u = o.toString + e.exports = i + }, + function(e, t, r, n) { + function i(e) { + return "string" == typeof e || (s(e) && u.call(e) == a) + } + var s = r(n), + a = "[object String]", + o = Object.prototype, + u = o.toString + e.exports = i + }, + function(e, t, r, n, i) { + function s(e) { + return o(e) && a(e.length) && !!B[I.call(e)] + } + var a = r(n), + o = r(i), + u = "[object Arguments]", + l = "[object Array]", + c = "[object Boolean]", + p = "[object Date]", + f = "[object Error]", + h = "[object Function]", + d = "[object Map]", + m = "[object Number]", + y = "[object Object]", + v = "[object RegExp]", + g = "[object Set]", + E = "[object String]", + b = "[object WeakMap]", + x = "[object ArrayBuffer]", + A = "[object Float32Array]", + D = "[object Float64Array]", + C = "[object Int8Array]", + S = "[object Int16Array]", + F = "[object Int32Array]", + w = "[object Uint8Array]", + _ = "[object Uint8ClampedArray]", + T = "[object Uint16Array]", + P = "[object Uint32Array]", + B = {} + ;(B[A] = B[D] = B[C] = B[S] = B[F] = B[w] = B[_] = B[T] = B[P] = !0), + (B[u] = B[l] = B[x] = B[c] = B[p] = B[f] = B[h] = B[d] = B[m] = B[y] = B[v] = B[ + g + ] = B[E] = B[b] = !1) + var k = Object.prototype, + I = k.toString + e.exports = s + }, + function(e, t, r, n, i, s) { + var a = r(n), + o = r(i), + u = r(s), + l = u(function(e, t, r) { + return r ? a(e, t, r) : o(e, t) + }) + e.exports = l + }, + function(e, t, r, n, i, s) { + var a = r(n), + o = r(i), + u = r(s), + l = u(a, o) + e.exports = l + }, + function(e, t, r, n, i, s, a, o, u, l, c, p) { + function f(e, t) { + if (null == e) return !1 + var r = D.call(e, t) + if (!r && !g(t)) { + if (((t = x(t)), (e = 1 == t.length ? e : h(e, d(t, 0, -1))), null == e)) + return !1 + ;(t = b(t)), (r = D.call(e, t)) + } + return r || (E(e.length) && v(t, e.length) && (y(e) || m(e))) + } + var h = r(n), + d = r(i), + m = r(s), + y = r(a), + v = r(o), + g = r(u), + E = r(l), + b = r(c), + x = r(p), + A = Object.prototype, + D = A.hasOwnProperty + e.exports = f + }, + function(e, t, r, n, i, s, a) { + var o = r(n), + u = r(i), + l = r(s), + c = r(a), + p = o(Object, "keys"), + f = p + ? function(e) { + var t = null == e ? void 0 : e.constructor + return ("function" == typeof t && t.prototype === e) || + ("function" != typeof e && u(e)) + ? c(e) + : l(e) + ? p(e) + : [] + } + : c + e.exports = f + }, + function(e, t, r, n, i, s, a, o) { + function u(e) { + if (null == e) return [] + h(e) || (e = Object(e)) + var t = e.length + t = (t && f(t) && (c(e) || l(e)) && t) || 0 + for ( + var r = e.constructor, + n = -1, + i = "function" == typeof r && r.prototype === e, + s = Array(t), + a = t > 0; + ++n < t; + + ) + s[n] = n + "" + for (var o in e) + (a && p(o, t)) || ("constructor" == o && (i || !m.call(e, o))) || s.push(o) + return s + } + var l = r(n), + c = r(i), + p = r(s), + f = r(a), + h = r(o), + d = Object.prototype, + m = d.hasOwnProperty + e.exports = u + }, + function(e, t, r, n, i) { + function s(e) { + e = o(e) + for (var t = -1, r = a(e), n = r.length, i = Array(n); ++t < n; ) { + var s = r[t] + i[t] = [s, e[s]] + } + return i + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n, i) { + function s(e) { + return a(e, o(e)) + } + var a = r(n), + o = r(i) + e.exports = s + }, + function(e, t, r, n, i, s) { + function a(e) { + return l(e) ? o(e) : u(e) + } + var o = r(n), + u = r(i), + l = r(s) + e.exports = a + }, + function(e, t, r, n, i, s, a, o, u) { + "use strict" + function l(e, t) { + var r = e.node, + n = r.body + r.async = !1 + var i = E.functionExpression(null, [], E.blockStatement(n.body), !0) + ;(i.shadow = !0), + (n.body = [ + E.returnStatement(E.callExpression(E.callExpression(t, [i]), [])) + ]) + } + function c(e, t) { + var r = e.node, + n = b + e.isArrowFunctionExpression() && (e.arrowFunctionToShadowed(), (n = x)), + (r.async = !1), + (r.generator = !0), + r.shadow && (r.shadow = p({}, r.shadow, { arguments: !1 })) + var i = r.id + r.id = null + var s = e.isFunctionDeclaration() + s && (r.type = "FunctionExpression") + var a = E.callExpression(t, [r]), + o = n({ + FUNCTION: a, + PARAMS: r.params.map(function() { + return e.scope.generateUidIdentifier("x") + }) + }).expression, + u = o.body.body[1].argument + if (s) { + var l = E.variableDeclaration("let", [ + E.variableDeclarator(E.identifier(i.name), E.callExpression(o, [])) + ]) + ;(l._blockHoist = !0), (u.id = i), e.replaceWith(l) + } else + i && i.name + ? (u.id = i) + : m["default"]({ node: u, parent: e.parent, scope: e.scope }), + u.id || r.params.length + ? e.replaceWith(E.callExpression(o, [])) + : e.replaceWith(a) + } + var p = r(n)["default"], + f = r(i)["default"], + h = r(s)["default"] + t.__esModule = !0 + var d = r(a), + m = f(d), + y = r(o), + v = f(y), + g = r(u), + E = h(g), + b = v["default"]( + "\n (function () {\n var ref = FUNCTION;\n return function (PARAMS) {\n return ref.apply(this, arguments);\n };\n })\n" + ), + x = v["default"]( + "\n (() => {\n var ref = FUNCTION, _this = this;\n return function(PARAMS) {\n return ref.apply(_this, arguments);\n };\n })\n" + ), + A = { + ArrowFunctionExpression: function(e) { + e.node.async || e.arrowFunctionToShadowed() + }, + AwaitExpression: function(e) { + var t = e.node + t.type = "YieldExpression" + } + } + ;(t["default"] = function(e, t) { + var r = e.node + if (!r.generator) + return ( + e.traverse(A), + e.isClassMethod() || e.isObjectMethod() ? l(e, t) : c(e, t) + ) + }), + (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a, o) { + "use strict" + function u(e, t, r, n) { + if (e.selfReference) { + if (!n.hasBinding(r.name) || n.hasGlobal(r.name)) { + if (!v.isFunction(t)) return + var i = g + t.generator && (i = E) + var s = i({ + FUNCTION: t, + FUNCTION_ID: r, + FUNCTION_KEY: n.generateUidIdentifier(r.name) + }).expression + s.callee._skipModulesRemap = !0 + for ( + var a = s.callee.body.body[0].params, o = 0, u = h["default"](t); + u > o; + o++ + ) + a.push(n.generateUidIdentifier("x")) + return s + } + n.rename(r.name) + } + ;(t.id = r), (n.getProgramParent().references[r.name] = !0) + } + function l(e, t, r) { + var n = { + selfAssignment: !1, + selfReference: !1, + outerDeclar: r.getBindingIdentifier(t), + references: [], + name: t + }, + i = r.getOwnBinding(t) + return ( + i + ? "param" === i.kind && (n.selfReference = !0) + : (n.outerDeclar || r.hasGlobal(t)) && r.traverse(e, b, n), + n + ) + } + var c = r(n)["default"], + p = r(i)["default"] + t.__esModule = !0 + var f = r(s), + h = c(f), + d = r(a), + m = c(d), + y = r(o), + v = p(y), + g = m["default"]( + "\n (function (FUNCTION_KEY) {\n function FUNCTION_ID() {\n return FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n }\n\n return FUNCTION_ID;\n })(FUNCTION)\n" + ), + E = m["default"]( + "\n (function (FUNCTION_KEY) {\n function* FUNCTION_ID() {\n return yield* FUNCTION_KEY.apply(this, arguments);\n }\n\n FUNCTION_ID.toString = function () {\n return FUNCTION_KEY.toString();\n };\n\n return FUNCTION_ID;\n })(FUNCTION)\n" + ), + b = { + "ReferencedIdentifier|BindingIdentifier": function(e, t) { + if (e.node.name === t.name) { + var r = e.scope.getBindingIdentifier(t.name) + r === t.outerDeclar && ((t.selfReference = !0), e.stop()) + } + } + } + ;(t["default"] = function(e) { + var t = e.node, + r = e.parent, + n = e.scope, + i = e.id + if (!t.id) { + if ( + (!v.isObjectProperty(r) && !v.isObjectMethod(r, { kind: "method" })) || + (r.computed && !v.isLiteral(r.key)) + ) { + if (v.isVariableDeclarator(r)) { + if (((i = r.id), v.isIdentifier(i))) { + var s = n.parent.getBinding(i.name) + if (s && s.constant && n.getBinding(i.name) === s) + return (t.id = i), void (t.id[v.NOT_LOCAL_BINDING] = !0) + } + } else if (v.isAssignmentExpression(r)) i = r.left + else if (!i) return + } else i = r.key + var a = void 0 + if (i && v.isLiteral(i)) a = i.value + else { + if (!i || !v.isIdentifier(i)) return + a = i.name + } + ;(a = v.toBindingIdentifierName(a)), + (i = v.identifier(a)), + (i[v.NOT_LOCAL_BINDING] = !0) + var o = l(t, a, n) + return u(o, t, i, n) || t + } + }), + (e.exports = t["default"]) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"] + t.__esModule = !0 + var a = r(i), + o = s(a) + ;(t["default"] = function(e) { + for (var t = e.params, r = 0; r < t.length; r++) { + var n = t[r] + if (o.isAssignmentPattern(n) || o.isRestElement(n)) return r + } + return t.length + }), + (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a, o, u) { + "use strict" + function l(e) { + return (!C.isClassMethod(e) && !C.isObjectMethod(e)) || + ("get" !== e.kind && "set" !== e.kind) + ? "value" + : e.kind + } + function c(e, t, r, n, i) { + var s = C.toKeyAlias(t), + a = {} + if ( + (A["default"](e, s) && (a = e[s]), + (e[s] = a), + (a._inherits = a._inherits || []), + a._inherits.push(t), + (a._key = t.key), + t.computed && (a._computed = !0), + t.decorators) + ) { + var o = (a.decorators = a.decorators || C.arrayExpression([])) + o.elements = o.elements.concat( + t.decorators + .map(function(e) { + return e.expression + }) + .reverse() + ) + } + if (a.value || a.initializer) + throw n.buildCodeFrameError(t, "Key conflict with sibling node") + var u = void 0, + c = void 0 + ;(C.isObjectProperty(t) || C.isObjectMethod(t) || C.isClassMethod(t)) && + (u = C.toComputedKey(t, t.key)), + C.isObjectProperty(t) || C.isClassProperty(t) + ? (c = t.value) + : (C.isObjectMethod(t) || C.isClassMethod(t)) && + (c = C.functionExpression( + null, + t.params, + t.body, + t.generator, + t.async + )) + var p = l(t) + return ( + (r && "value" === p) || (r = p), + i && + C.isStringLiteral(u) && + ("value" === r || "initializer" === r) && + C.isFunctionExpression(c) && + (c = g["default"]({ id: u, node: c, scope: i })), + c && (C.inheritsComments(c, t), (a[r] = c)), + a + ) + } + function p(e) { + for (var t in e) if (e[t]._computed) return !0 + return !1 + } + function f(e) { + for (var t = C.arrayExpression([]), r = 0; r < e.properties.length; r++) { + var n = e.properties[r], + i = n.value + i.properties.unshift( + C.objectProperty(C.identifier("key"), C.toComputedKey(n)) + ), + t.elements.push(i) + } + return t + } + function h(e) { + var t = C.objectExpression([]) + return ( + b["default"](e, function(e) { + var r = C.objectExpression([]), + n = C.objectProperty(e._key, r, e._computed) + b["default"](e, function(e, t) { + if ("_" !== t[0]) { + var n = e + ;(C.isClassMethod(e) || C.isClassProperty(e)) && (e = e.value) + var i = C.objectProperty(C.identifier(t), e) + C.inheritsComments(i, n), + C.removeComments(n), + r.properties.push(i) + } + }), + t.properties.push(n) + }), + t + ) + } + function d(e) { + return ( + b["default"](e, function(e) { + e.value && (e.writable = C.booleanLiteral(!0)), + (e.configurable = C.booleanLiteral(!0)), + (e.enumerable = C.booleanLiteral(!0)) + }), + h(e) + ) + } + var m = r(n)["default"], + y = r(i)["default"] + ;(t.__esModule = !0), + (t.push = c), + (t.hasComputed = p), + (t.toComputedObjectFromClass = f), + (t.toClassObject = h), + (t.toDefineObject = d) + var v = r(s), + g = m(v), + E = r(a), + b = m(E), + x = r(o), + A = m(x), + D = r(u), + C = y(D) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"] + t.__esModule = !0 + var a = r(i), + o = s(a) + ;(t["default"] = function(e, t, r) { + return 1 === r.length && + o.isSpreadElement(r[0]) && + o.isIdentifier(r[0].argument, { name: "arguments" }) + ? o.callExpression(o.memberExpression(e, o.identifier("apply")), [ + t, + r[0].argument + ]) + : o.callExpression( + o.memberExpression(e, o.identifier("call")), + [t].concat(r) + ) + }), + (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a, o, u, l) { + "use strict" + function c(e, t) { + return x.isSuper(e) + ? x.isMemberExpression(t, { computed: !1 }) + ? !1 + : !x.isCallExpression(t, { callee: e }) + : !1 + } + function p(e) { + return x.isMemberExpression(e) && x.isSuper(e.object) + } + var f = r(n)["default"], + h = r(i)["default"], + d = r(s)["default"], + m = r(a)["default"] + t.__esModule = !0 + var y = r(o), + v = d(y), + g = r(u), + E = m(g), + b = r(l), + x = m(b), + A = h(), + D = { + "ObjectMethod|ClassMethod": function(e) { + e.skip() + }, + "FunctionDeclaration|FunctionExpression": function(e) { + e.inShadow("this") || e.skip() + }, + ReturnStatement: function(e, t) { + e.inShadow("this") || t.returns.push(e) + }, + ThisExpression: function(e, t) { + e.node[A] || t.thises.push(e) + }, + enter: function(e, t) { + var r = t.specHandle + t.isLoose && (r = t.looseHandle) + var n = e.isCallExpression() && e.get("callee").isSuper(), + i = r.call(t, e) + i && (t.hasSuper = !0), + n && t.bareSupers.push(e), + i === !0 && e.requeue(), + i !== !0 && + i && + (Array.isArray(i) ? e.replaceWithMultiple(i) : e.replaceWith(i)) + } + }, + C = (function() { + function e(t) { + var r = + arguments.length <= 1 || void 0 === arguments[1] ? !1 : arguments[1] + f(this, e), + (this.forceSuperMemoisation = t.forceSuperMemoisation), + (this.methodPath = t.methodPath), + (this.methodNode = t.methodNode), + (this.superRef = t.superRef), + (this.isStatic = t.isStatic), + (this.hasSuper = !1), + (this.inClass = r), + (this.isLoose = t.isLoose), + (this.scope = this.methodPath.scope), + (this.file = t.file), + (this.opts = t), + (this.bareSupers = []), + (this.returns = []), + (this.thises = []) + } + return ( + (e.prototype.getObjectRef = function() { + return this.opts.objectRef || this.opts.getObjectRef() + }), + (e.prototype.setSuperProperty = function(e, t, r) { + return x.callExpression(this.file.addHelper("set"), [ + x.callExpression( + x.memberExpression( + x.identifier("Object"), + x.identifier("getPrototypeOf") + ), + [ + this.isStatic + ? this.getObjectRef() + : x.memberExpression( + this.getObjectRef(), + x.identifier("prototype") + ) + ] + ), + r ? e : x.stringLiteral(e.name), + t, + x.thisExpression() + ]) + }), + (e.prototype.getSuperProperty = function(e, t) { + return x.callExpression(this.file.addHelper("get"), [ + x.callExpression( + x.memberExpression( + x.identifier("Object"), + x.identifier("getPrototypeOf") + ), + [ + this.isStatic + ? this.getObjectRef() + : x.memberExpression( + this.getObjectRef(), + x.identifier("prototype") + ) + ] + ), + t ? e : x.stringLiteral(e.name), + x.thisExpression() + ]) + }), + (e.prototype.replace = function() { + this.methodPath.traverse(D, this) + }), + (e.prototype.getLooseSuperProperty = function(e, t) { + var r = this.methodNode, + n = this.superRef || x.identifier("Function") + return t.property === e + ? void 0 + : x.isCallExpression(t, { callee: e }) + ? void 0 + : x.isMemberExpression(t) && !r["static"] + ? x.memberExpression(n, x.identifier("prototype")) + : n + }), + (e.prototype.looseHandle = function(e) { + var t = e.node + if (e.isSuper()) return this.getLooseSuperProperty(t, e.parent) + if (e.isCallExpression()) { + var r = t.callee + if (!x.isMemberExpression(r)) return + if (!x.isSuper(r.object)) return + return ( + x.appendToMemberExpression(r, x.identifier("call")), + t.arguments.unshift(x.thisExpression()), + !0 + ) + } + }), + (e.prototype.specHandleAssignmentExpression = function(e, t, r) { + return "=" === r.operator + ? this.setSuperProperty( + r.left.property, + r.right, + r.left.computed + ) + : ((e = e || t.scope.generateUidIdentifier("ref")), + [ + x.variableDeclaration("var", [ + x.variableDeclarator(e, r.left) + ]), + x.expressionStatement( + x.assignmentExpression( + "=", + r.left, + x.binaryExpression(r.operator[0], e, r.right) + ) + ) + ]) + }), + (e.prototype.specHandle = function(e) { + var t = void 0, + r = void 0, + n = void 0, + i = void 0, + s = e.parent, + a = e.node + if (c(a, s)) + throw e.buildCodeFrameError(E.get("classesIllegalBareSuper")) + if (x.isCallExpression(a)) { + var o = a.callee + if (x.isSuper(o)) return + p(o) && ((t = o.property), (r = o.computed), (n = a.arguments)) + } else if (x.isMemberExpression(a) && x.isSuper(a.object)) + (t = a.property), (r = a.computed) + else { + if (x.isUpdateExpression(a) && p(a.argument)) { + var u = x.binaryExpression( + a.operator[0], + a.argument, + x.numericLiteral(1) + ) + if (a.prefix) + return this.specHandleAssignmentExpression(null, e, u) + var l = e.scope.generateUidIdentifier("ref") + return this.specHandleAssignmentExpression(l, e, u).concat( + x.expressionStatement(l) + ) + } + if (x.isAssignmentExpression(a) && p(a.left)) + return this.specHandleAssignmentExpression(null, e, a) + } + if (t) { + var f = this.getSuperProperty(t, r, i) + return n ? this.optimiseCall(f, n) : f + } + }), + (e.prototype.optimiseCall = function(e, t) { + var r = x.thisExpression() + return (r[A] = !0), v["default"](e, r, t) + }), + e + ) + })() + ;(t["default"] = C), (e.exports = t["default"]) + }, + function(e, t, r, n, i) { + "use strict" + var s = r(n)["default"] + t.__esModule = !0 + var a = r(i), + o = s(a), + u = { + Scope: function(e, t) { + "let" === t.kind && e.skip() + }, + Function: function(e) { + e.skip() + }, + VariableDeclaration: function(e, t) { + if (!t.kind || e.node.kind === t.kind) { + for ( + var r = [], n = e.get("declarations"), i = void 0, s = 0; + s < n.length; + s++ + ) { + var a = n[s] + ;(i = a.node.id), + a.node.init && + r.push( + o.expressionStatement( + o.assignmentExpression( + "=", + a.node.id, + a.node.init + ) + ) + ) + for (var u in a.getBindingIdentifiers()) + t.emit(o.identifier(u), u) + } + e.parentPath.isFor({ left: e.node }) + ? e.replaceWith(i) + : e.replaceWithMultiple(r) + } + } + } + ;(t["default"] = function(e, t) { + var r = arguments.length <= 2 || void 0 === arguments[2] ? "var" : arguments[2] + e.traverse(u, { kind: r, emit: t }) + }), + (e.exports = t["default"]) + }, + function(e, t, r, n, i, s, a) { + "use strict" + function o(e, t) { + return d.isRegExpLiteral(e) && e.flags.indexOf(t) >= 0 + } + function u(e, t) { + var r = e.flags.split("") + e.flags.indexOf(t) < 0 || (f["default"](r, t), (e.flags = r.join(""))) + } + var l = r(n)["default"], + c = r(i)["default"] + ;(t.__esModule = !0), (t.is = o), (t.pullFlag = u) + var p = r(s), + f = l(p), + h = r(a), + d = c(h) + }, + function(e, t, r, n) { + function i() { + var e = arguments, + t = e[0] + if (!t || !t.length) return t + for (var r = 0, n = s, i = e.length; ++r < i; ) + for (var a = 0, u = e[r]; (a = n(t, u, a)) > -1; ) o.call(t, a, 1) + return t + } + var s = r(n), + a = Array.prototype, + o = a.splice + e.exports = i + }, + function(e, t, r, n, i, s, a) { + "use strict" + var o = r(n)["default"], + u = r(i)["default"] + t.__esModule = !0 + var l = r(s), + c = o(l), + p = r(a), + f = u(p) + ;(t["default"] = function(e) { + function t(e, r) { + if (f.isJSXIdentifier(e)) { + if ("this" === e.name && f.isReferenced(e, r)) return f.thisExpression() + if (!c["default"].keyword.isIdentifierNameES6(e.name)) + return f.stringLiteral(e.name) + e.type = "Identifier" + } else if (f.isJSXMemberExpression(e)) + return f.memberExpression(t(e.object, e), t(e.property, e)) + return e + } + function r(e) { + return f.isJSXExpressionContainer(e) ? e.expression : e + } + function n(e) { + var t = r(e.value || f.booleanLiteral(!0)) + return ( + f.isStringLiteral(t) && (t.value = t.value.replace(/\n\s+/g, " ")), + f.isValidIdentifier(e.name.name) + ? (e.name.type = "Identifier") + : (e.name = f.stringLiteral(e.name.name)), + f.inherits(f.objectProperty(e.name, t), e) + ) + } + function i(r, n) { + r.parent.children = f.react.buildChildren(r.parent) + var i = t(r.node.name, r.node), + a = [], + o = void 0 + f.isIdentifier(i) ? (o = i.name) : f.isLiteral(i) && (o = i.value) + var u = { tagExpr: i, tagName: o, args: a } + e.pre && e.pre(u, n) + var l = r.node.attributes + return ( + (l = l.length ? s(l, n) : f.nullLiteral()), + a.push(l), + e.post && e.post(u, n), + u.call || f.callExpression(u.callee, a) + ) + } + function s(e, t) { + function r() { + i.length && (s.push(f.objectExpression(i)), (i = [])) + } + for (var i = [], s = []; e.length; ) { + var a = e.shift() + f.isJSXSpreadAttribute(a) ? (r(), s.push(a.argument)) : i.push(n(a)) + } + return ( + r(), + 1 === s.length + ? (e = s[0]) + : (f.isObjectExpression(s[0]) || s.unshift(f.objectExpression([])), + (e = f.callExpression(t.addHelper("extends"), s))), + e + ) + } + var a = {} + return ( + (a.JSXNamespacedName = function(e) { + throw e.buildCodeFrameError( + "Namespace tags are not supported. ReactJSX is not XML." + ) + }), + (a.JSXElement = { + exit: function(e, t) { + var r = i(e.get("openingElement"), t) + ;(r.arguments = r.arguments.concat(e.node.children)), + r.arguments.length >= 3 && (r._prettyCall = !0), + e.replaceWith(f.inherits(r, e.node)) + } + }), + a + ) + }), + (e.exports = t["default"]) + } + ]) + ) +}) diff --git a/docs/assets/getting-started-assets/derive.jpg b/docs/assets/getting-started-assets/derive.jpg new file mode 100755 index 0000000000..7cdd70a9e1 Binary files /dev/null and b/docs/assets/getting-started-assets/derive.jpg differ diff --git a/docs/assets/getting-started-assets/images/bg_hr.png b/docs/assets/getting-started-assets/images/bg_hr.png new file mode 100755 index 0000000000..514aee5056 Binary files /dev/null and b/docs/assets/getting-started-assets/images/bg_hr.png differ diff --git a/docs/assets/getting-started-assets/images/blacktocat.png b/docs/assets/getting-started-assets/images/blacktocat.png new file mode 100755 index 0000000000..e160053a5b Binary files /dev/null and b/docs/assets/getting-started-assets/images/blacktocat.png differ diff --git a/docs/assets/getting-started-assets/images/dust.png b/docs/assets/getting-started-assets/images/dust.png new file mode 100755 index 0000000000..08876f6893 Binary files /dev/null and b/docs/assets/getting-started-assets/images/dust.png differ diff --git a/docs/assets/getting-started-assets/images/favicon.png b/docs/assets/getting-started-assets/images/favicon.png new file mode 100755 index 0000000000..63da62bc9c Binary files /dev/null and b/docs/assets/getting-started-assets/images/favicon.png differ diff --git a/docs/assets/getting-started-assets/images/icon_download.png b/docs/assets/getting-started-assets/images/icon_download.png new file mode 100755 index 0000000000..5a793f1768 Binary files /dev/null and b/docs/assets/getting-started-assets/images/icon_download.png differ diff --git a/docs/assets/getting-started-assets/images/mobservable.png b/docs/assets/getting-started-assets/images/mobservable.png new file mode 100755 index 0000000000..386c308ce0 Binary files /dev/null and b/docs/assets/getting-started-assets/images/mobservable.png differ diff --git a/docs/assets/getting-started-assets/images/sprite_download.png b/docs/assets/getting-started-assets/images/sprite_download.png new file mode 100755 index 0000000000..f9f8de24c1 Binary files /dev/null and b/docs/assets/getting-started-assets/images/sprite_download.png differ diff --git a/docs/assets/getting-started-assets/javascripts/JSXTransformer.js b/docs/assets/getting-started-assets/javascripts/JSXTransformer.js new file mode 100755 index 0000000000..ea2e81513b --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/JSXTransformer.js @@ -0,0 +1,17664 @@ +/** + * JSXTransformer v0.13.3 + */ +;(function(f) { + if (typeof exports === "object" && typeof module !== "undefined") { + module.exports = f() + } else if (typeof define === "function" && define.amd) { + define([], f) + } else { + var g + if (typeof window !== "undefined") { + g = window + } else if (typeof global !== "undefined") { + g = global + } else if (typeof self !== "undefined") { + g = self + } else { + g = this + } + g.JSXTransformer = f() + } +})(function() { + var define, module, exports + return (function e(t, n, r) { + function s(o, u) { + if (!n[o]) { + if (!t[o]) { + var a = typeof require == "function" && require + if (!u && a) return a(o, !0) + if (i) return i(o, !0) + var f = new Error("Cannot find module '" + o + "'") + throw ((f.code = "MODULE_NOT_FOUND"), f) + } + var l = (n[o] = { exports: {} }) + t[o][0].call( + l.exports, + function(e) { + var n = t[o][1][e] + return s(n ? n : e) + }, + l, + l.exports, + e, + t, + n, + r + ) + } + return n[o].exports + } + var i = typeof require == "function" && require + for (var o = 0; o < r.length; o++) s(r[o]) + return s + })( + { + 1: [ + function(_dereq_, module, exports) { + /** + * Copyright 2013-2015, 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. + */ + /* jshint browser: true */ + /* jslint evil: true */ + /*eslint-disable no-eval */ + /*eslint-disable block-scoped-var */ + + "use strict" + + var ReactTools = _dereq_("../main") + var inlineSourceMap = _dereq_("./inline-source-map") + + var headEl + var dummyAnchor + var inlineScriptCount = 0 + + // The source-map library relies on Object.defineProperty, but IE8 doesn't + // support it fully even with es5-sham. Indeed, es5-sham's defineProperty + // throws when Object.prototype.__defineGetter__ is missing, so we skip building + // the source map in that case. + var supportsAccessors = Object.prototype.hasOwnProperty("__defineGetter__") + + /** + * Run provided code through jstransform. + * + * @param {string} source Original source code + * @param {object?} options Options to pass to jstransform + * @return {object} object as returned from jstransform + */ + function transformReact(source, options) { + options = options || {} + + // Force the sourcemaps option manually. We don't want to use it if it will + // break (see above note about supportsAccessors). We'll only override the + // value here if sourceMap was specified and is truthy. This guarantees that + // we won't override any user intent (since this method is exposed publicly). + if (options.sourceMap) { + options.sourceMap = supportsAccessors + } + + // Otherwise just pass all options straight through to react-tools. + return ReactTools.transformWithDetails(source, options) + } + + /** + * Eval provided source after transforming it. + * + * @param {string} source Original source code + * @param {object?} options Options to pass to jstransform + */ + function exec(source, options) { + return eval(transformReact(source, options).code) + } + + /** + * This method returns a nicely formatted line of code pointing to the exact + * location of the error `e`. The line is limited in size so big lines of code + * are also shown in a readable way. + * + * Example: + * ... x', overflow:'scroll'}} id={} onScroll={this.scroll} class=" ... + * ^ + * + * @param {string} code The full string of code + * @param {Error} e The error being thrown + * @return {string} formatted message + * @internal + */ + function createSourceCodeErrorMessage(code, e) { + var sourceLines = code.split("\n") + // e.lineNumber is non-standard so we can't depend on its availability. If + // we're in a browser where it isn't supported, don't even bother trying to + // format anything. We may also hit a case where the line number is reported + // incorrectly and is outside the bounds of the actual code. Handle that too. + if (!e.lineNumber || e.lineNumber > sourceLines.length) { + return "" + } + var erroneousLine = sourceLines[e.lineNumber - 1] + + // Removes any leading indenting spaces and gets the number of + // chars indenting the `erroneousLine` + var indentation = 0 + erroneousLine = erroneousLine.replace(/^\s+/, function(leadingSpaces) { + indentation = leadingSpaces.length + return "" + }) + + // Defines the number of characters that are going to show + // before and after the erroneous code + var LIMIT = 30 + var errorColumn = e.column - indentation + + if (errorColumn > LIMIT) { + erroneousLine = "... " + erroneousLine.slice(errorColumn - LIMIT) + errorColumn = 4 + LIMIT + } + if (erroneousLine.length - errorColumn > LIMIT) { + erroneousLine = erroneousLine.slice(0, errorColumn + LIMIT) + " ..." + } + var message = "\n\n" + erroneousLine + "\n" + message += new Array(errorColumn - 1).join(" ") + "^" + return message + } + + /** + * Actually transform the code. + * + * @param {string} code + * @param {string?} url + * @param {object?} options + * @return {string} The transformed code. + * @internal + */ + function transformCode(code, url, options) { + try { + var transformed = transformReact(code, options) + } catch (e) { + e.message += "\n at " + if (url) { + if ("fileName" in e) { + // We set `fileName` if it's supported by this error object and + // a `url` was provided. + // The error will correctly point to `url` in Firefox. + e.fileName = url + } + e.message += url + ":" + e.lineNumber + ":" + e.columnNumber + } else { + e.message += location.href + } + e.message += createSourceCodeErrorMessage(code, e) + throw e + } + + if (!transformed.sourceMap) { + return transformed.code + } + + var source + if (url == null) { + source = "Inline JSX script" + inlineScriptCount++ + if (inlineScriptCount > 1) { + source += " (" + inlineScriptCount + ")" + } + } else if (dummyAnchor) { + // Firefox has problems when the sourcemap source is a proper URL with a + // protocol and hostname, so use the pathname. We could use just the + // filename, but hopefully using the full path will prevent potential + // issues where the same filename exists in multiple directories. + dummyAnchor.href = url + source = dummyAnchor.pathname.substr(1) + } + + return ( + transformed.code + + "\n" + + inlineSourceMap(transformed.sourceMap, code, source) + ) + } + + /** + * Appends a script element at the end of the with the content of code, + * after transforming it. + * + * @param {string} code The original source code + * @param {string?} url Where the code came from. null if inline + * @param {object?} options Options to pass to jstransform + * @internal + */ + function run(code, url, options) { + var scriptEl = document.createElement("script") + scriptEl.text = transformCode(code, url, options) + headEl.appendChild(scriptEl) + } + + /** + * Load script from the provided url and pass the content to the callback. + * + * @param {string} url The location of the script src + * @param {function} callback Function to call with the content of url + * @internal + */ + function load(url, successCallback, errorCallback) { + var xhr + xhr = window.ActiveXObject + ? new window.ActiveXObject("Microsoft.XMLHTTP") + : new XMLHttpRequest() + + // async, however scripts will be executed in the order they are in the + // DOM to mirror normal script loading. + xhr.open("GET", url, true) + if ("overrideMimeType" in xhr) { + xhr.overrideMimeType("text/plain") + } + xhr.onreadystatechange = function() { + if (xhr.readyState === 4) { + if (xhr.status === 0 || xhr.status === 200) { + successCallback(xhr.responseText) + } else { + errorCallback() + throw new Error("Could not load " + url) + } + } + } + return xhr.send(null) + } + + /** + * Loop over provided script tags and get the content, via innerHTML if an + * inline script, or by using XHR. Transforms are applied if needed. The scripts + * are executed in the order they are found on the page. + * + * @param {array} scripts The + + + + + + + +
    +

    JavaScript mode

    + + +
    + + + +

    + JavaScript mode supports several configuration options: +

      +
    • json which will set the mode to expect JSON + data rather than a JavaScript program.
    • +
    • jsonld which will set the mode to expect + JSON-LD linked data rather + than a JavaScript program (demo).
    • +
    • typescript which will activate additional + syntax highlighting and some other things for TypeScript code + (demo).
    • +
    • statementIndent which (given a number) will + determine the amount of indentation to use for statements + continued on a new line.
    • +
    • wordCharacters, a regexp that indicates which + characters should be considered part of an identifier. + Defaults to /[\w$]/, which does not handle + non-ASCII identifiers. Can be set to something more elaborate + to improve Unicode support.
    • +
    +

    + +

    MIME types defined: text/javascript, application/json, application/ld+json, text/typescript, application/typescript.

    +
    diff --git a/docs/assets/getting-started-assets/javascripts/codemirror/javascript/javascript.js b/docs/assets/getting-started-assets/javascripts/codemirror/javascript/javascript.js new file mode 100755 index 0000000000..a6796c04c4 --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/codemirror/javascript/javascript.js @@ -0,0 +1,894 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +// TODO actually recognize syntax of TypeScript constructs + +;(function(mod) { + if (typeof exports == "object" && typeof module == "object") + // CommonJS + mod(require("../../lib/codemirror")) + else if (typeof define == "function" && define.amd) + // AMD + define(["../../lib/codemirror"], mod) + // Plain browser env + else mod(CodeMirror) +})(function(CodeMirror) { + "use strict" + + CodeMirror.defineMode("javascript", function(config, parserConfig) { + var indentUnit = config.indentUnit + var statementIndent = parserConfig.statementIndent + var jsonldMode = parserConfig.jsonld + var jsonMode = parserConfig.json || jsonldMode + var isTS = parserConfig.typescript + var wordRE = parserConfig.wordCharacters || /[\w$\xa1-\uffff]/ + + // Tokenizer + + var keywords = (function() { + function kw(type) { + return { type: type, style: "keyword" } + } + var A = kw("keyword a"), + B = kw("keyword b"), + C = kw("keyword c") + var operator = kw("operator"), + atom = { type: "atom", style: "atom" } + + var jsKeywords = { + if: kw("if"), + while: A, + with: A, + else: B, + do: B, + try: B, + finally: B, + return: C, + break: C, + continue: C, + new: C, + delete: C, + throw: C, + debugger: C, + var: kw("var"), + const: kw("var"), + let: kw("var"), + function: kw("function"), + catch: kw("catch"), + for: kw("for"), + switch: kw("switch"), + case: kw("case"), + default: kw("default"), + in: operator, + typeof: operator, + instanceof: operator, + true: atom, + false: atom, + null: atom, + undefined: atom, + NaN: atom, + Infinity: atom, + this: kw("this"), + module: kw("module"), + class: kw("class"), + super: kw("atom"), + yield: C, + export: kw("export"), + import: kw("import"), + extends: C + } + + // Extend the 'normal' keywords with the TypeScript language extensions + if (isTS) { + var type = { type: "variable", style: "variable-3" } + var tsKeywords = { + // object-like things + interface: kw("interface"), + extends: kw("extends"), + constructor: kw("constructor"), + + // scope modifiers + public: kw("public"), + private: kw("private"), + protected: kw("protected"), + static: kw("static"), + + // types + string: type, + number: type, + bool: type, + any: type + } + + for (var attr in tsKeywords) { + jsKeywords[attr] = tsKeywords[attr] + } + } + + return jsKeywords + })() + + var isOperatorChar = /[+\-*&%=<>!?|~^]/ + var isJsonldKeyword = /^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/ + + function readRegexp(stream) { + var escaped = false, + next, + inSet = false + while ((next = stream.next()) != null) { + if (!escaped) { + if (next == "/" && !inSet) return + if (next == "[") inSet = true + else if (inSet && next == "]") inSet = false + } + escaped = !escaped && next == "\\" + } + } + + // Used as scratch variables to communicate multiple values without + // consing up tons of objects. + var type, content + function ret(tp, style, cont) { + type = tp + content = cont + return style + } + function tokenBase(stream, state) { + var ch = stream.next() + if (ch == '"' || ch == "'") { + state.tokenize = tokenString(ch) + return state.tokenize(stream, state) + } else if (ch == "." && stream.match(/^\d+(?:[eE][+\-]?\d+)?/)) { + return ret("number", "number") + } else if (ch == "." && stream.match("..")) { + return ret("spread", "meta") + } else if (/[\[\]{}\(\),;\:\.]/.test(ch)) { + return ret(ch) + } else if (ch == "=" && stream.eat(">")) { + return ret("=>", "operator") + } else if (ch == "0" && stream.eat(/x/i)) { + stream.eatWhile(/[\da-f]/i) + return ret("number", "number") + } else if (/\d/.test(ch)) { + stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/) + return ret("number", "number") + } else if (ch == "/") { + if (stream.eat("*")) { + state.tokenize = tokenComment + return tokenComment(stream, state) + } else if (stream.eat("/")) { + stream.skipToEnd() + return ret("comment", "comment") + } else if ( + state.lastType == "operator" || + state.lastType == "keyword c" || + state.lastType == "sof" || + /^[\[{}\(,;:]$/.test(state.lastType) + ) { + readRegexp(stream) + stream.match(/^\b(([gimyu])(?![gimyu]*\2))+\b/) + return ret("regexp", "string-2") + } else { + stream.eatWhile(isOperatorChar) + return ret("operator", "operator", stream.current()) + } + } else if (ch == "`") { + state.tokenize = tokenQuasi + return tokenQuasi(stream, state) + } else if (ch == "#") { + stream.skipToEnd() + return ret("error", "error") + } else if (isOperatorChar.test(ch)) { + stream.eatWhile(isOperatorChar) + return ret("operator", "operator", stream.current()) + } else if (wordRE.test(ch)) { + stream.eatWhile(wordRE) + var word = stream.current(), + known = keywords.propertyIsEnumerable(word) && keywords[word] + return known && state.lastType != "." + ? ret(known.type, known.style, word) + : ret("variable", "variable", word) + } + } + + function tokenString(quote) { + return function(stream, state) { + var escaped = false, + next + if (jsonldMode && stream.peek() == "@" && stream.match(isJsonldKeyword)) { + state.tokenize = tokenBase + return ret("jsonld-keyword", "meta") + } + while ((next = stream.next()) != null) { + if (next == quote && !escaped) break + escaped = !escaped && next == "\\" + } + if (!escaped) state.tokenize = tokenBase + return ret("string", "string") + } + } + + function tokenComment(stream, state) { + var maybeEnd = false, + ch + while ((ch = stream.next())) { + if (ch == "/" && maybeEnd) { + state.tokenize = tokenBase + break + } + maybeEnd = ch == "*" + } + return ret("comment", "comment") + } + + function tokenQuasi(stream, state) { + var escaped = false, + next + while ((next = stream.next()) != null) { + if (!escaped && (next == "`" || (next == "$" && stream.eat("{")))) { + state.tokenize = tokenBase + break + } + escaped = !escaped && next == "\\" + } + return ret("quasi", "string-2", stream.current()) + } + + var brackets = "([{}])" + // This is a crude lookahead trick to try and notice that we're + // parsing the argument patterns for a fat-arrow function before we + // actually hit the arrow token. It only works if the arrow is on + // the same line as the arguments and there's no strange noise + // (comments) in between. Fallback is to only notice when we hit the + // arrow, and not declare the arguments as locals for the arrow + // body. + function findFatArrow(stream, state) { + if (state.fatArrowAt) state.fatArrowAt = null + var arrow = stream.string.indexOf("=>", stream.start) + if (arrow < 0) return + + var depth = 0, + sawSomething = false + for (var pos = arrow - 1; pos >= 0; --pos) { + var ch = stream.string.charAt(pos) + var bracket = brackets.indexOf(ch) + if (bracket >= 0 && bracket < 3) { + if (!depth) { + ++pos + break + } + if (--depth == 0) break + } else if (bracket >= 3 && bracket < 6) { + ++depth + } else if (wordRE.test(ch)) { + sawSomething = true + } else if (/["'\/]/.test(ch)) { + return + } else if (sawSomething && !depth) { + ++pos + break + } + } + if (sawSomething && !depth) state.fatArrowAt = pos + } + + // Parser + + var atomicTypes = { + atom: true, + number: true, + variable: true, + string: true, + regexp: true, + this: true, + "jsonld-keyword": true + } + + function JSLexical(indented, column, type, align, prev, info) { + this.indented = indented + this.column = column + this.type = type + this.prev = prev + this.info = info + if (align != null) this.align = align + } + + function inScope(state, varname) { + for (var v = state.localVars; v; v = v.next) if (v.name == varname) return true + for (var cx = state.context; cx; cx = cx.prev) { + for (var v = cx.vars; v; v = v.next) if (v.name == varname) return true + } + } + + function parseJS(state, style, type, content, stream) { + var cc = state.cc + // Communicate our context to the combinators. + // (Less wasteful than consing up a hundred closures on every call.) + cx.state = state + cx.stream = stream + ;(cx.marked = null), (cx.cc = cc) + cx.style = style + + if (!state.lexical.hasOwnProperty("align")) state.lexical.align = true + + while (true) { + var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement + if (combinator(type, content)) { + while (cc.length && cc[cc.length - 1].lex) cc.pop()() + if (cx.marked) return cx.marked + if (type == "variable" && inScope(state, content)) return "variable-2" + return style + } + } + } + + // Combinator utils + + var cx = { state: null, column: null, marked: null, cc: null } + function pass() { + for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]) + } + function cont() { + pass.apply(null, arguments) + return true + } + function register(varname) { + function inList(list) { + for (var v = list; v; v = v.next) if (v.name == varname) return true + return false + } + var state = cx.state + if (state.context) { + cx.marked = "def" + if (inList(state.localVars)) return + state.localVars = { name: varname, next: state.localVars } + } else { + if (inList(state.globalVars)) return + if (parserConfig.globalVars) + state.globalVars = { name: varname, next: state.globalVars } + } + } + + // Combinators + + var defaultVars = { name: "this", next: { name: "arguments" } } + function pushcontext() { + cx.state.context = { prev: cx.state.context, vars: cx.state.localVars } + cx.state.localVars = defaultVars + } + function popcontext() { + cx.state.localVars = cx.state.context.vars + cx.state.context = cx.state.context.prev + } + function pushlex(type, info) { + var result = function() { + var state = cx.state, + indent = state.indented + if (state.lexical.type == "stat") indent = state.lexical.indented + else + for ( + var outer = state.lexical; + outer && outer.type == ")" && outer.align; + outer = outer.prev + ) + indent = outer.indented + state.lexical = new JSLexical( + indent, + cx.stream.column(), + type, + null, + state.lexical, + info + ) + } + result.lex = true + return result + } + function poplex() { + var state = cx.state + if (state.lexical.prev) { + if (state.lexical.type == ")") state.indented = state.lexical.indented + state.lexical = state.lexical.prev + } + } + poplex.lex = true + + function expect(wanted) { + function exp(type) { + if (type == wanted) return cont() + else if (wanted == ";") return pass() + else return cont(exp) + } + return exp + } + + function statement(type, value) { + if (type == "var") + return cont(pushlex("vardef", value.length), vardef, expect(";"), poplex) + if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex) + if (type == "keyword b") return cont(pushlex("form"), statement, poplex) + if (type == "{") return cont(pushlex("}"), block, poplex) + if (type == ";") return cont() + if (type == "if") { + if ( + cx.state.lexical.info == "else" && + cx.state.cc[cx.state.cc.length - 1] == poplex + ) + cx.state.cc.pop()() + return cont(pushlex("form"), expression, statement, poplex, maybeelse) + } + if (type == "function") return cont(functiondef) + if (type == "for") return cont(pushlex("form"), forspec, statement, poplex) + if (type == "variable") return cont(pushlex("stat"), maybelabel) + if (type == "switch") + return cont( + pushlex("form"), + expression, + pushlex("}", "switch"), + expect("{"), + block, + poplex, + poplex + ) + if (type == "case") return cont(expression, expect(":")) + if (type == "default") return cont(expect(":")) + if (type == "catch") + return cont( + pushlex("form"), + pushcontext, + expect("("), + funarg, + expect(")"), + statement, + poplex, + popcontext + ) + if (type == "module") + return cont(pushlex("form"), pushcontext, afterModule, popcontext, poplex) + if (type == "class") return cont(pushlex("form"), className, poplex) + if (type == "export") return cont(pushlex("form"), afterExport, poplex) + if (type == "import") return cont(pushlex("form"), afterImport, poplex) + return pass(pushlex("stat"), expression, expect(";"), poplex) + } + function expression(type) { + return expressionInner(type, false) + } + function expressionNoComma(type) { + return expressionInner(type, true) + } + function expressionInner(type, noComma) { + if (cx.state.fatArrowAt == cx.stream.start) { + var body = noComma ? arrowBodyNoComma : arrowBody + if (type == "(") + return cont( + pushcontext, + pushlex(")"), + commasep(pattern, ")"), + poplex, + expect("=>"), + body, + popcontext + ) + else if (type == "variable") + return pass(pushcontext, pattern, expect("=>"), body, popcontext) + } + + var maybeop = noComma ? maybeoperatorNoComma : maybeoperatorComma + if (atomicTypes.hasOwnProperty(type)) return cont(maybeop) + if (type == "function") return cont(functiondef, maybeop) + if (type == "keyword c") return cont(noComma ? maybeexpressionNoComma : maybeexpression) + if (type == "(") + return cont( + pushlex(")"), + maybeexpression, + comprehension, + expect(")"), + poplex, + maybeop + ) + if (type == "operator" || type == "spread") + return cont(noComma ? expressionNoComma : expression) + if (type == "[") return cont(pushlex("]"), arrayLiteral, poplex, maybeop) + if (type == "{") return contCommasep(objprop, "}", null, maybeop) + if (type == "quasi") { + return pass(quasi, maybeop) + } + return cont() + } + function maybeexpression(type) { + if (type.match(/[;\}\)\],]/)) return pass() + return pass(expression) + } + function maybeexpressionNoComma(type) { + if (type.match(/[;\}\)\],]/)) return pass() + return pass(expressionNoComma) + } + + function maybeoperatorComma(type, value) { + if (type == ",") return cont(expression) + return maybeoperatorNoComma(type, value, false) + } + function maybeoperatorNoComma(type, value, noComma) { + var me = noComma == false ? maybeoperatorComma : maybeoperatorNoComma + var expr = noComma == false ? expression : expressionNoComma + if (type == "=>") + return cont(pushcontext, noComma ? arrowBodyNoComma : arrowBody, popcontext) + if (type == "operator") { + if (/\+\+|--/.test(value)) return cont(me) + if (value == "?") return cont(expression, expect(":"), expr) + return cont(expr) + } + if (type == "quasi") { + return pass(quasi, me) + } + if (type == ";") return + if (type == "(") return contCommasep(expressionNoComma, ")", "call", me) + if (type == ".") return cont(property, me) + if (type == "[") return cont(pushlex("]"), maybeexpression, expect("]"), poplex, me) + } + function quasi(type, value) { + if (type != "quasi") return pass() + if (value.slice(value.length - 2) != "${") return cont(quasi) + return cont(expression, continueQuasi) + } + function continueQuasi(type) { + if (type == "}") { + cx.marked = "string-2" + cx.state.tokenize = tokenQuasi + return cont(quasi) + } + } + function arrowBody(type) { + findFatArrow(cx.stream, cx.state) + return pass(type == "{" ? statement : expression) + } + function arrowBodyNoComma(type) { + findFatArrow(cx.stream, cx.state) + return pass(type == "{" ? statement : expressionNoComma) + } + function maybelabel(type) { + if (type == ":") return cont(poplex, statement) + return pass(maybeoperatorComma, expect(";"), poplex) + } + function property(type) { + if (type == "variable") { + cx.marked = "property" + return cont() + } + } + function objprop(type, value) { + if (type == "variable" || cx.style == "keyword") { + cx.marked = "property" + if (value == "get" || value == "set") return cont(getterSetter) + return cont(afterprop) + } else if (type == "number" || type == "string") { + cx.marked = jsonldMode ? "property" : cx.style + " property" + return cont(afterprop) + } else if (type == "jsonld-keyword") { + return cont(afterprop) + } else if (type == "[") { + return cont(expression, expect("]"), afterprop) + } + } + function getterSetter(type) { + if (type != "variable") return pass(afterprop) + cx.marked = "property" + return cont(functiondef) + } + function afterprop(type) { + if (type == ":") return cont(expressionNoComma) + if (type == "(") return pass(functiondef) + } + function commasep(what, end) { + function proceed(type) { + if (type == ",") { + var lex = cx.state.lexical + if (lex.info == "call") lex.pos = (lex.pos || 0) + 1 + return cont(what, proceed) + } + if (type == end) return cont() + return cont(expect(end)) + } + return function(type) { + if (type == end) return cont() + return pass(what, proceed) + } + } + function contCommasep(what, end, info) { + for (var i = 3; i < arguments.length; i++) cx.cc.push(arguments[i]) + return cont(pushlex(end, info), commasep(what, end), poplex) + } + function block(type) { + if (type == "}") return cont() + return pass(statement, block) + } + function maybetype(type) { + if (isTS && type == ":") return cont(typedef) + } + function maybedefault(_, value) { + if (value == "=") return cont(expressionNoComma) + } + function typedef(type) { + if (type == "variable") { + cx.marked = "variable-3" + return cont() + } + } + function vardef() { + return pass(pattern, maybetype, maybeAssign, vardefCont) + } + function pattern(type, value) { + if (type == "variable") { + register(value) + return cont() + } + if (type == "[") return contCommasep(pattern, "]") + if (type == "{") return contCommasep(proppattern, "}") + } + function proppattern(type, value) { + if (type == "variable" && !cx.stream.match(/^\s*:/, false)) { + register(value) + return cont(maybeAssign) + } + if (type == "variable") cx.marked = "property" + return cont(expect(":"), pattern, maybeAssign) + } + function maybeAssign(_type, value) { + if (value == "=") return cont(expressionNoComma) + } + function vardefCont(type) { + if (type == ",") return cont(vardef) + } + function maybeelse(type, value) { + if (type == "keyword b" && value == "else") + return cont(pushlex("form", "else"), statement, poplex) + } + function forspec(type) { + if (type == "(") return cont(pushlex(")"), forspec1, expect(")"), poplex) + } + function forspec1(type) { + if (type == "var") return cont(vardef, expect(";"), forspec2) + if (type == ";") return cont(forspec2) + if (type == "variable") return cont(formaybeinof) + return pass(expression, expect(";"), forspec2) + } + function formaybeinof(_type, value) { + if (value == "in" || value == "of") { + cx.marked = "keyword" + return cont(expression) + } + return cont(maybeoperatorComma, forspec2) + } + function forspec2(type, value) { + if (type == ";") return cont(forspec3) + if (value == "in" || value == "of") { + cx.marked = "keyword" + return cont(expression) + } + return pass(expression, expect(";"), forspec3) + } + function forspec3(type) { + if (type != ")") cont(expression) + } + function functiondef(type, value) { + if (value == "*") { + cx.marked = "keyword" + return cont(functiondef) + } + if (type == "variable") { + register(value) + return cont(functiondef) + } + if (type == "(") + return cont( + pushcontext, + pushlex(")"), + commasep(funarg, ")"), + poplex, + statement, + popcontext + ) + } + function funarg(type) { + if (type == "spread") return cont(funarg) + return pass(pattern, maybetype, maybedefault) + } + function className(type, value) { + if (type == "variable") { + register(value) + return cont(classNameAfter) + } + } + function classNameAfter(type, value) { + if (value == "extends") return cont(expression, classNameAfter) + if (type == "{") return cont(pushlex("}"), classBody, poplex) + } + function classBody(type, value) { + if (type == "variable" || cx.style == "keyword") { + if (value == "static") { + cx.marked = "keyword" + return cont(classBody) + } + cx.marked = "property" + if (value == "get" || value == "set") + return cont(classGetterSetter, functiondef, classBody) + return cont(functiondef, classBody) + } + if (value == "*") { + cx.marked = "keyword" + return cont(classBody) + } + if (type == ";") return cont(classBody) + if (type == "}") return cont() + } + function classGetterSetter(type) { + if (type != "variable") return pass() + cx.marked = "property" + return cont() + } + function afterModule(type, value) { + if (type == "string") return cont(statement) + if (type == "variable") { + register(value) + return cont(maybeFrom) + } + } + function afterExport(_type, value) { + if (value == "*") { + cx.marked = "keyword" + return cont(maybeFrom, expect(";")) + } + if (value == "default") { + cx.marked = "keyword" + return cont(expression, expect(";")) + } + return pass(statement) + } + function afterImport(type) { + if (type == "string") return cont() + return pass(importSpec, maybeFrom) + } + function importSpec(type, value) { + if (type == "{") return contCommasep(importSpec, "}") + if (type == "variable") register(value) + if (value == "*") cx.marked = "keyword" + return cont(maybeAs) + } + function maybeAs(_type, value) { + if (value == "as") { + cx.marked = "keyword" + return cont(importSpec) + } + } + function maybeFrom(_type, value) { + if (value == "from") { + cx.marked = "keyword" + return cont(expression) + } + } + function arrayLiteral(type) { + if (type == "]") return cont() + return pass(expressionNoComma, maybeArrayComprehension) + } + function maybeArrayComprehension(type) { + if (type == "for") return pass(comprehension, expect("]")) + if (type == ",") return cont(commasep(maybeexpressionNoComma, "]")) + return pass(commasep(expressionNoComma, "]")) + } + function comprehension(type) { + if (type == "for") return cont(forspec, comprehension) + if (type == "if") return cont(expression, comprehension) + } + + function isContinuedStatement(state, textAfter) { + return ( + state.lastType == "operator" || + state.lastType == "," || + isOperatorChar.test(textAfter.charAt(0)) || + /[,.]/.test(textAfter.charAt(0)) + ) + } + + // Interface + + return { + startState: function(basecolumn) { + var state = { + tokenize: tokenBase, + lastType: "sof", + cc: [], + lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false), + localVars: parserConfig.localVars, + context: parserConfig.localVars && { vars: parserConfig.localVars }, + indented: 0 + } + if (parserConfig.globalVars && typeof parserConfig.globalVars == "object") + state.globalVars = parserConfig.globalVars + return state + }, + + token: function(stream, state) { + if (stream.sol()) { + if (!state.lexical.hasOwnProperty("align")) state.lexical.align = false + state.indented = stream.indentation() + findFatArrow(stream, state) + } + if (state.tokenize != tokenComment && stream.eatSpace()) return null + var style = state.tokenize(stream, state) + if (type == "comment") return style + state.lastType = + type == "operator" && (content == "++" || content == "--") ? "incdec" : type + return parseJS(state, style, type, content, stream) + }, + + indent: function(state, textAfter) { + if (state.tokenize == tokenComment) return CodeMirror.Pass + if (state.tokenize != tokenBase) return 0 + var firstChar = textAfter && textAfter.charAt(0), + lexical = state.lexical + // Kludge to prevent 'maybelse' from blocking lexical scope pops + if (!/^\s*else\b/.test(textAfter)) + for (var i = state.cc.length - 1; i >= 0; --i) { + var c = state.cc[i] + if (c == poplex) lexical = lexical.prev + else if (c != maybeelse) break + } + if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev + if (statementIndent && lexical.type == ")" && lexical.prev.type == "stat") + lexical = lexical.prev + var type = lexical.type, + closing = firstChar == type + + if (type == "vardef") + return ( + lexical.indented + + (state.lastType == "operator" || state.lastType == "," + ? lexical.info + 1 + : 0) + ) + else if (type == "form" && firstChar == "{") return lexical.indented + else if (type == "form") return lexical.indented + indentUnit + else if (type == "stat") + return ( + lexical.indented + + (isContinuedStatement(state, textAfter) ? statementIndent || indentUnit : 0) + ) + else if ( + lexical.info == "switch" && + !closing && + parserConfig.doubleIndentSwitch != false + ) + return ( + lexical.indented + + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit) + ) + else if (lexical.align) return lexical.column + (closing ? 0 : 1) + else return lexical.indented + (closing ? 0 : indentUnit) + }, + + electricInput: /^\s*(?:case .*?:|default:|\{|\})$/, + blockCommentStart: jsonMode ? null : "/*", + blockCommentEnd: jsonMode ? null : "*/", + lineComment: jsonMode ? null : "//", + fold: "brace", + closeBrackets: "()[]{}''\"\"``", + + helperType: jsonMode ? "json" : "javascript", + jsonldMode: jsonldMode, + jsonMode: jsonMode + } + }) + + CodeMirror.registerHelper("wordChars", "javascript", /[\w$]/) + + CodeMirror.defineMIME("text/javascript", "javascript") + CodeMirror.defineMIME("text/ecmascript", "javascript") + CodeMirror.defineMIME("application/javascript", "javascript") + CodeMirror.defineMIME("application/x-javascript", "javascript") + CodeMirror.defineMIME("application/ecmascript", "javascript") + CodeMirror.defineMIME("application/json", { name: "javascript", json: true }) + CodeMirror.defineMIME("application/x-json", { name: "javascript", json: true }) + CodeMirror.defineMIME("application/ld+json", { name: "javascript", jsonld: true }) + CodeMirror.defineMIME("text/typescript", { name: "javascript", typescript: true }) + CodeMirror.defineMIME("application/typescript", { name: "javascript", typescript: true }) +}) diff --git a/docs/assets/getting-started-assets/javascripts/codemirror/javascript/json-ld.html b/docs/assets/getting-started-assets/javascripts/codemirror/javascript/json-ld.html new file mode 100755 index 0000000000..3a37f0bce6 --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/codemirror/javascript/json-ld.html @@ -0,0 +1,72 @@ + + +CodeMirror: JSON-LD mode + + + + + + + + + + + + +
    +

    JSON-LD mode

    + + +
    + + + +

    This is a specialization of the JavaScript mode.

    +
    diff --git a/docs/assets/getting-started-assets/javascripts/codemirror/javascript/test.js b/docs/assets/getting-started-assets/javascripts/codemirror/javascript/test.js new file mode 100755 index 0000000000..fd207b1949 --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/codemirror/javascript/test.js @@ -0,0 +1,252 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: http://codemirror.net/LICENSE + +;(function() { + var mode = CodeMirror.getMode({ indentUnit: 2 }, "javascript") + function MT(name) { + test.mode(name, mode, Array.prototype.slice.call(arguments, 1)) + } + + MT( + "locals", + "[keyword function] [variable foo]([def a], [def b]) { [keyword var] [def c] [operator =] [number 10]; [keyword return] [variable-2 a] [operator +] [variable-2 c] [operator +] [variable d]; }" + ) + + MT( + "comma-and-binop", + "[keyword function](){ [keyword var] [def x] [operator =] [number 1] [operator +] [number 2], [def y]; }" + ) + + MT( + "destructuring", + "([keyword function]([def a], [[[def b], [def c] ]]) {", + " [keyword let] {[def d], [property foo]: [def c][operator =][number 10], [def x]} [operator =] [variable foo]([variable-2 a]);", + " [[[variable-2 c], [variable y] ]] [operator =] [variable-2 c];", + "})();" + ) + + MT( + "class_body", + "[keyword class] [variable Foo] {", + " [property constructor]() {}", + " [property sayName]() {", + " [keyword return] [string-2 `foo${][variable foo][string-2 }oo`];", + " }", + "}" + ) + + MT( + "class", + "[keyword class] [variable Point] [keyword extends] [variable SuperThing] {", + " [property get] [property prop]() { [keyword return] [number 24]; }", + " [property constructor]([def x], [def y]) {", + " [keyword super]([string 'something']);", + " [keyword this].[property x] [operator =] [variable-2 x];", + " }", + "}" + ) + + MT( + "module", + "[keyword module] [string 'foo'] {", + " [keyword export] [keyword let] [def x] [operator =] [number 42];", + " [keyword export] [keyword *] [keyword from] [string 'somewhere'];", + "}" + ) + + MT( + "import", + "[keyword function] [variable foo]() {", + " [keyword import] [def $] [keyword from] [string 'jquery'];", + " [keyword module] [def crypto] [keyword from] [string 'crypto'];", + " [keyword import] { [def encrypt], [def decrypt] } [keyword from] [string 'crypto'];", + "}" + ) + + MT( + "const", + "[keyword function] [variable f]() {", + " [keyword const] [[ [def a], [def b] ]] [operator =] [[ [number 1], [number 2] ]];", + "}" + ) + + MT("for/of", "[keyword for]([keyword let] [variable of] [keyword of] [variable something]) {}") + + MT( + "generator", + "[keyword function*] [variable repeat]([def n]) {", + " [keyword for]([keyword var] [def i] [operator =] [number 0]; [variable-2 i] [operator <] [variable-2 n]; [operator ++][variable-2 i])", + " [keyword yield] [variable-2 i];", + "}" + ) + + MT( + "quotedStringAddition", + "[keyword let] [variable f] [operator =] [variable a] [operator +] [string 'fatarrow'] [operator +] [variable c];" + ) + + MT( + "quotedFatArrow", + "[keyword let] [variable f] [operator =] [variable a] [operator +] [string '=>'] [operator +] [variable c];" + ) + + MT( + "fatArrow", + "[variable array].[property filter]([def a] [operator =>] [variable-2 a] [operator +] [number 1]);", + "[variable a];", // No longer in scope + "[keyword let] [variable f] [operator =] ([[ [def a], [def b] ]], [def c]) [operator =>] [variable-2 a] [operator +] [variable-2 c];", + "[variable c];" + ) + + MT( + "spread", + "[keyword function] [variable f]([def a], [meta ...][def b]) {", + " [variable something]([variable-2 a], [meta ...][variable-2 b]);", + "}" + ) + + MT( + "comprehension", + "[keyword function] [variable f]() {", + " [[([variable x] [operator +] [number 1]) [keyword for] ([keyword var] [def x] [keyword in] [variable y]) [keyword if] [variable pred]([variable-2 x]) ]];", + " ([variable u] [keyword for] ([keyword var] [def u] [keyword of] [variable generateValues]()) [keyword if] ([variable-2 u].[property color] [operator ===] [string 'blue']));", + "}" + ) + + MT( + "quasi", + "[variable re][string-2 `fofdlakj${][variable x] [operator +] ([variable re][string-2 `foo`]) [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]" + ) + + MT( + "quasi_no_function", + "[variable x] [operator =] [string-2 `fofdlakj${][variable x] [operator +] [string-2 `foo`] [operator +] [number 1][string-2 }fdsa`] [operator +] [number 2]" + ) + + MT( + "indent_statement", + "[keyword var] [variable x] [operator =] [number 10]", + "[variable x] [operator +=] [variable y] [operator +]", + " [atom Infinity]", + "[keyword debugger];" + ) + + MT( + "indent_if", + "[keyword if] ([number 1])", + " [keyword break];", + "[keyword else] [keyword if] ([number 2])", + " [keyword continue];", + "[keyword else]", + " [number 10];", + "[keyword if] ([number 1]) {", + " [keyword break];", + "} [keyword else] [keyword if] ([number 2]) {", + " [keyword continue];", + "} [keyword else] {", + " [number 10];", + "}" + ) + + MT( + "indent_for", + "[keyword for] ([keyword var] [variable i] [operator =] [number 0];", + " [variable i] [operator <] [number 100];", + " [variable i][operator ++])", + " [variable doSomething]([variable i]);", + "[keyword debugger];" + ) + + MT("indent_c_style", "[keyword function] [variable foo]()", "{", " [keyword debugger];", "}") + + MT( + "indent_else", + "[keyword for] (;;)", + " [keyword if] ([variable foo])", + " [keyword if] ([variable bar])", + " [number 1];", + " [keyword else]", + " [number 2];", + " [keyword else]", + " [number 3];" + ) + + MT( + "indent_funarg", + "[variable foo]([number 10000],", + " [keyword function]([def a]) {", + " [keyword debugger];", + "};" + ) + + MT( + "indent_below_if", + "[keyword for] (;;)", + " [keyword if] ([variable foo])", + " [number 1];", + "[number 2];" + ) + + MT( + "multilinestring", + "[keyword var] [variable x] [operator =] [string 'foo\\]", + "[string bar'];" + ) + + MT("scary_regexp", "[string-2 /foo[[/]]bar/];") + + MT( + "indent_strange_array", + "[keyword var] [variable x] [operator =] [[", + " [number 1],,", + " [number 2],", + "]];", + "[number 10];" + ) + + MT( + "param_default", + "[keyword function] [variable foo]([def x] [operator =] [string-2 `foo${][number 10][string-2 }bar`]) {", + " [keyword return] [variable-2 x];", + "}" + ) + + var jsonld_mode = CodeMirror.getMode({ indentUnit: 2 }, { name: "javascript", jsonld: true }) + function LD(name) { + test.mode(name, jsonld_mode, Array.prototype.slice.call(arguments, 1)) + } + + LD( + "json_ld_keywords", + "{", + ' [meta "@context"]: {', + ' [meta "@base"]: [string "http://example.com"],', + ' [meta "@vocab"]: [string "http://xmlns.com/foaf/0.1/"],', + ' [property "likesFlavor"]: {', + ' [meta "@container"]: [meta "@list"]', + ' [meta "@reverse"]: [string "@beFavoriteOf"]', + " },", + ' [property "nick"]: { [meta "@container"]: [meta "@set"] },', + ' [property "nick"]: { [meta "@container"]: [meta "@index"] }', + " },", + ' [meta "@graph"]: [[ {', + ' [meta "@id"]: [string "http://dbpedia.org/resource/John_Lennon"],', + ' [property "name"]: [string "John Lennon"],', + ' [property "modified"]: {', + ' [meta "@value"]: [string "2010-05-29T14:17:39+02:00"],', + ' [meta "@type"]: [string "http://www.w3.org/2001/XMLSchema#dateTime"]', + " }", + " } ]]", + "}" + ) + + LD( + "json_ld_fake", + "{", + ' [property "@fake"]: [string "@fake"],', + ' [property "@contextual"]: [string "@identifier"],', + ' [property "user@domain.com"]: [string "@graphical"],', + ' [property "@ID"]: [string "@@ID"]', + "}" + ) +})() diff --git a/docs/assets/getting-started-assets/javascripts/codemirror/javascript/typescript.html b/docs/assets/getting-started-assets/javascripts/codemirror/javascript/typescript.html new file mode 100755 index 0000000000..2cfc5381fe --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/codemirror/javascript/typescript.html @@ -0,0 +1,61 @@ + + +CodeMirror: TypeScript mode + + + + + + + + + +
    +

    TypeScript mode

    + + +
    + + + +

    This is a specialization of the JavaScript mode.

    +
    diff --git a/docs/assets/getting-started-assets/javascripts/codemirror/lib/codemirror.css b/docs/assets/getting-started-assets/javascripts/codemirror/lib/codemirror.css new file mode 100644 index 0000000000..a5d3ab913e --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/codemirror/lib/codemirror.css @@ -0,0 +1,350 @@ +/* BASICS */ + +.CodeMirror { + /* Set height, width, borders, and global font properties here */ + font-family: monospace; + height: 300px; + color: black; + direction: ltr; + } + + /* PADDING */ + + .CodeMirror-lines { + padding: 4px 0; /* Vertical padding around content */ + } + .CodeMirror pre.CodeMirror-line, + .CodeMirror pre.CodeMirror-line-like { + padding: 0 4px; /* Horizontal padding of content */ + } + + .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + background-color: white; /* The little square between H and V scrollbars */ + } + + /* GUTTER */ + + .CodeMirror-gutters { + border-right: 1px solid #ddd; + background-color: #f7f7f7; + white-space: nowrap; + } + .CodeMirror-linenumbers {} + .CodeMirror-linenumber { + padding: 0 3px 0 5px; + min-width: 20px; + text-align: right; + color: #999; + white-space: nowrap; + } + + .CodeMirror-guttermarker { color: black; } + .CodeMirror-guttermarker-subtle { color: #999; } + + /* CURSOR */ + + .CodeMirror-cursor { + border-left: 1px solid black; + border-right: none; + width: 0; + } + /* Shown when moving in bi-directional text */ + .CodeMirror div.CodeMirror-secondarycursor { + border-left: 1px solid silver; + } + .cm-fat-cursor .CodeMirror-cursor { + width: auto; + border: 0 !important; + background: #7e7; + } + .cm-fat-cursor div.CodeMirror-cursors { + z-index: 1; + } + .cm-fat-cursor-mark { + background-color: rgba(20, 255, 20, 0.5); + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; + } + .cm-animate-fat-cursor { + width: auto; + border: 0; + -webkit-animation: blink 1.06s steps(1) infinite; + -moz-animation: blink 1.06s steps(1) infinite; + animation: blink 1.06s steps(1) infinite; + background-color: #7e7; + } + @-moz-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} + } + @-webkit-keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} + } + @keyframes blink { + 0% {} + 50% { background-color: transparent; } + 100% {} + } + + /* Can style cursor different in overwrite (non-insert) mode */ + .CodeMirror-overwrite .CodeMirror-cursor {} + + .cm-tab { display: inline-block; text-decoration: inherit; } + + .CodeMirror-rulers { + position: absolute; + left: 0; right: 0; top: -50px; bottom: 0; + overflow: hidden; + } + .CodeMirror-ruler { + border-left: 1px solid #ccc; + top: 0; bottom: 0; + position: absolute; + } + + /* DEFAULT THEME */ + + .cm-s-default .cm-header {color: blue;} + .cm-s-default .cm-quote {color: #090;} + .cm-negative {color: #d44;} + .cm-positive {color: #292;} + .cm-header, .cm-strong {font-weight: bold;} + .cm-em {font-style: italic;} + .cm-link {text-decoration: underline;} + .cm-strikethrough {text-decoration: line-through;} + + .cm-s-default .cm-keyword {color: #708;} + .cm-s-default .cm-atom {color: #219;} + .cm-s-default .cm-number {color: #164;} + .cm-s-default .cm-def {color: #00f;} + .cm-s-default .cm-variable, + .cm-s-default .cm-punctuation, + .cm-s-default .cm-property, + .cm-s-default .cm-operator {} + .cm-s-default .cm-variable-2 {color: #05a;} + .cm-s-default .cm-variable-3, .cm-s-default .cm-type {color: #085;} + .cm-s-default .cm-comment {color: #a50;} + .cm-s-default .cm-string {color: #a11;} + .cm-s-default .cm-string-2 {color: #f50;} + .cm-s-default .cm-meta {color: #555;} + .cm-s-default .cm-qualifier {color: #555;} + .cm-s-default .cm-builtin {color: #30a;} + .cm-s-default .cm-bracket {color: #997;} + .cm-s-default .cm-tag {color: #170;} + .cm-s-default .cm-attribute {color: #00c;} + .cm-s-default .cm-hr {color: #999;} + .cm-s-default .cm-link {color: #00c;} + + .cm-s-default .cm-error {color: #f00;} + .cm-invalidchar {color: #f00;} + + .CodeMirror-composing { border-bottom: 2px solid; } + + /* Default styles for common addons */ + + div.CodeMirror span.CodeMirror-matchingbracket {color: #0b0;} + div.CodeMirror span.CodeMirror-nonmatchingbracket {color: #a22;} + .CodeMirror-matchingtag { background: rgba(255, 150, 0, .3); } + .CodeMirror-activeline-background {background: #e8f2ff;} + + /* STOP */ + + /* The rest of this file contains styles related to the mechanics of + the editor. You probably shouldn't touch them. */ + + .CodeMirror { + position: relative; + overflow: hidden; + background: white; + } + + .CodeMirror-scroll { + overflow: scroll !important; /* Things will break if this is overridden */ + /* 30px is the magic margin used to hide the element's real scrollbars */ + /* See overflow: hidden in .CodeMirror */ + margin-bottom: -30px; margin-right: -30px; + padding-bottom: 30px; + height: 100%; + outline: none; /* Prevent dragging from highlighting the element */ + position: relative; + } + .CodeMirror-sizer { + position: relative; + border-right: 30px solid transparent; + } + + /* The fake, visible scrollbars. Used to force redraw during scrolling + before actual scrolling happens, thus preventing shaking and + flickering artifacts. */ + .CodeMirror-vscrollbar, .CodeMirror-hscrollbar, .CodeMirror-scrollbar-filler, .CodeMirror-gutter-filler { + position: absolute; + z-index: 6; + display: none; + } + .CodeMirror-vscrollbar { + right: 0; top: 0; + overflow-x: hidden; + overflow-y: scroll; + } + .CodeMirror-hscrollbar { + bottom: 0; left: 0; + overflow-y: hidden; + overflow-x: scroll; + } + .CodeMirror-scrollbar-filler { + right: 0; bottom: 0; + } + .CodeMirror-gutter-filler { + left: 0; bottom: 0; + } + + .CodeMirror-gutters { + position: absolute; left: 0; top: 0; + min-height: 100%; + z-index: 3; + } + .CodeMirror-gutter { + white-space: normal; + height: 100%; + display: inline-block; + vertical-align: top; + margin-bottom: -30px; + } + .CodeMirror-gutter-wrapper { + position: absolute; + z-index: 4; + background: none !important; + border: none !important; + } + .CodeMirror-gutter-background { + position: absolute; + top: 0; bottom: 0; + z-index: 4; + } + .CodeMirror-gutter-elt { + position: absolute; + cursor: default; + z-index: 4; + } + .CodeMirror-gutter-wrapper ::selection { background-color: transparent } + .CodeMirror-gutter-wrapper ::-moz-selection { background-color: transparent } + + .CodeMirror-lines { + cursor: text; + min-height: 1px; /* prevents collapsing before first draw */ + } + .CodeMirror pre.CodeMirror-line, + .CodeMirror pre.CodeMirror-line-like { + /* Reset some styles that the rest of the page might have set */ + -moz-border-radius: 0; -webkit-border-radius: 0; border-radius: 0; + border-width: 0; + background: transparent; + font-family: inherit; + font-size: inherit; + margin: 0; + white-space: pre; + word-wrap: normal; + line-height: inherit; + color: inherit; + z-index: 2; + position: relative; + overflow: visible; + -webkit-tap-highlight-color: transparent; + -webkit-font-variant-ligatures: contextual; + font-variant-ligatures: contextual; + } + .CodeMirror-wrap pre.CodeMirror-line, + .CodeMirror-wrap pre.CodeMirror-line-like { + word-wrap: break-word; + white-space: pre-wrap; + word-break: normal; + } + + .CodeMirror-linebackground { + position: absolute; + left: 0; right: 0; top: 0; bottom: 0; + z-index: 0; + } + + .CodeMirror-linewidget { + position: relative; + z-index: 2; + padding: 0.1px; /* Force widget margins to stay inside of the container */ + } + + .CodeMirror-widget {} + + .CodeMirror-rtl pre { direction: rtl; } + + .CodeMirror-code { + outline: none; + } + + /* Force content-box sizing for the elements where we expect it */ + .CodeMirror-scroll, + .CodeMirror-sizer, + .CodeMirror-gutter, + .CodeMirror-gutters, + .CodeMirror-linenumber { + -moz-box-sizing: content-box; + box-sizing: content-box; + } + + .CodeMirror-measure { + position: absolute; + width: 100%; + height: 0; + overflow: hidden; + visibility: hidden; + } + + .CodeMirror-cursor { + position: absolute; + pointer-events: none; + } + .CodeMirror-measure pre { position: static; } + + div.CodeMirror-cursors { + visibility: hidden; + position: relative; + z-index: 3; + } + div.CodeMirror-dragcursors { + visibility: visible; + } + + .CodeMirror-focused div.CodeMirror-cursors { + visibility: visible; + } + + .CodeMirror-selected { background: #d9d9d9; } + .CodeMirror-focused .CodeMirror-selected { background: #d7d4f0; } + .CodeMirror-crosshair { cursor: crosshair; } + .CodeMirror-line::selection, .CodeMirror-line > span::selection, .CodeMirror-line > span > span::selection { background: #d7d4f0; } + .CodeMirror-line::-moz-selection, .CodeMirror-line > span::-moz-selection, .CodeMirror-line > span > span::-moz-selection { background: #d7d4f0; } + + .cm-searching { + background-color: #ffa; + background-color: rgba(255, 255, 0, .4); + } + + /* Used to force a border model for a node */ + .cm-force-border { padding-right: .1px; } + + @media print { + /* Hide the cursor when printing */ + .CodeMirror div.CodeMirror-cursors { + visibility: hidden; + } + } + + /* See issue #2901 */ + .cm-tab-wrap-hack:after { content: ''; } + + /* Help users use markselection to safely style text background */ + span.CodeMirror-selectedtext { background: none; } + \ No newline at end of file diff --git a/docs/assets/getting-started-assets/javascripts/codemirror/lib/codemirror.js b/docs/assets/getting-started-assets/javascripts/codemirror/lib/codemirror.js new file mode 100644 index 0000000000..32db983dd0 --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/codemirror/lib/codemirror.js @@ -0,0 +1,13920 @@ +// CodeMirror, copyright (c) by Marijn Haverbeke and others +// Distributed under an MIT license: https://codemirror.net/LICENSE + +// This is CodeMirror (https://codemirror.net), a code editor +// implemented in JavaScript on top of the browser's DOM. +// +// You can find some technical background for some of the code below +// at http://marijnhaverbeke.nl/blog/#cm-internals . + +;(function(global, factory) { + typeof exports === "object" && typeof module !== "undefined" + ? (module.exports = factory()) + : typeof define === "function" && define.amd + ? define(factory) + : ((global = global || self), (global.CodeMirror = factory())) +})(this, function() { + "use strict" + + // Kludges for bugs and behavior differences that can't be feature + // detected are enabled based on userAgent etc sniffing. + var userAgent = navigator.userAgent + var platform = navigator.platform + + var gecko = /gecko\/\d/i.test(userAgent) + var ie_upto10 = /MSIE \d/.test(userAgent) + var ie_11up = /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(userAgent) + var edge = /Edge\/(\d+)/.exec(userAgent) + var ie = ie_upto10 || ie_11up || edge + var ie_version = ie && (ie_upto10 ? document.documentMode || 6 : +(edge || ie_11up)[1]) + var webkit = !edge && /WebKit\//.test(userAgent) + var qtwebkit = webkit && /Qt\/\d+\.\d+/.test(userAgent) + var chrome = !edge && /Chrome\//.test(userAgent) + var presto = /Opera\//.test(userAgent) + var safari = /Apple Computer/.test(navigator.vendor) + var mac_geMountainLion = /Mac OS X 1\d\D([8-9]|\d\d)\D/.test(userAgent) + var phantom = /PhantomJS/.test(userAgent) + + var ios = !edge && /AppleWebKit/.test(userAgent) && /Mobile\/\w+/.test(userAgent) + var android = /Android/.test(userAgent) + // This is woefully incomplete. Suggestions for alternative methods welcome. + var mobile = + ios || android || /webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(userAgent) + var mac = ios || /Mac/.test(platform) + var chromeOS = /\bCrOS\b/.test(userAgent) + var windows = /win/i.test(platform) + + var presto_version = presto && userAgent.match(/Version\/(\d*\.\d*)/) + if (presto_version) { + presto_version = Number(presto_version[1]) + } + if (presto_version && presto_version >= 15) { + presto = false + webkit = true + } + // Some browsers use the wrong event properties to signal cmd/ctrl on OS X + var flipCtrlCmd = + mac && (qtwebkit || (presto && (presto_version == null || presto_version < 12.11))) + var captureRightClick = gecko || (ie && ie_version >= 9) + + function classTest(cls) { + return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") + } + + var rmClass = function(node, cls) { + var current = node.className + var match = classTest(cls).exec(current) + if (match) { + var after = current.slice(match.index + match[0].length) + node.className = current.slice(0, match.index) + (after ? match[1] + after : "") + } + } + + function removeChildren(e) { + for (var count = e.childNodes.length; count > 0; --count) { + e.removeChild(e.firstChild) + } + return e + } + + function removeChildrenAndAdd(parent, e) { + return removeChildren(parent).appendChild(e) + } + + function elt(tag, content, className, style) { + var e = document.createElement(tag) + if (className) { + e.className = className + } + if (style) { + e.style.cssText = style + } + if (typeof content == "string") { + e.appendChild(document.createTextNode(content)) + } else if (content) { + for (var i = 0; i < content.length; ++i) { + e.appendChild(content[i]) + } + } + return e + } + // wrapper for elt, which removes the elt from the accessibility tree + function eltP(tag, content, className, style) { + var e = elt(tag, content, className, style) + e.setAttribute("role", "presentation") + return e + } + + var range + if (document.createRange) { + range = function(node, start, end, endNode) { + var r = document.createRange() + r.setEnd(endNode || node, end) + r.setStart(node, start) + return r + } + } else { + range = function(node, start, end) { + var r = document.body.createTextRange() + try { + r.moveToElementText(node.parentNode) + } catch (e) { + return r + } + r.collapse(true) + r.moveEnd("character", end) + r.moveStart("character", start) + return r + } + } + + function contains(parent, child) { + if (child.nodeType == 3) { + // Android browser always returns false when child is a textnode + child = child.parentNode + } + if (parent.contains) { + return parent.contains(child) + } + do { + if (child.nodeType == 11) { + child = child.host + } + if (child == parent) { + return true + } + } while ((child = child.parentNode)) + } + + function activeElt() { + // IE and Edge may throw an "Unspecified Error" when accessing document.activeElement. + // IE < 10 will throw when accessed while the page is loading or in an iframe. + // IE > 9 and Edge will throw when accessed in an iframe if document.body is unavailable. + var activeElement + try { + activeElement = document.activeElement + } catch (e) { + activeElement = document.body || null + } + while ( + activeElement && + activeElement.shadowRoot && + activeElement.shadowRoot.activeElement + ) { + activeElement = activeElement.shadowRoot.activeElement + } + return activeElement + } + + function addClass(node, cls) { + var current = node.className + if (!classTest(cls).test(current)) { + node.className += (current ? " " : "") + cls + } + } + function joinClasses(a, b) { + var as = a.split(" ") + for (var i = 0; i < as.length; i++) { + if (as[i] && !classTest(as[i]).test(b)) { + b += " " + as[i] + } + } + return b + } + + var selectInput = function(node) { + node.select() + } + if (ios) { + // Mobile Safari apparently has a bug where select() is broken. + selectInput = function(node) { + node.selectionStart = 0 + node.selectionEnd = node.value.length + } + } else if (ie) { + // Suppress mysterious IE10 errors + selectInput = function(node) { + try { + node.select() + } catch (_e) {} + } + } + + function bind(f) { + var args = Array.prototype.slice.call(arguments, 1) + return function() { + return f.apply(null, args) + } + } + + function copyObj(obj, target, overwrite) { + if (!target) { + target = {} + } + for (var prop in obj) { + if (obj.hasOwnProperty(prop) && (overwrite !== false || !target.hasOwnProperty(prop))) { + target[prop] = obj[prop] + } + } + return target + } + + // Counts the column offset in a string, taking tabs into account. + // Used mostly to find indentation. + function countColumn(string, end, tabSize, startIndex, startValue) { + if (end == null) { + end = string.search(/[^\s\u00a0]/) + if (end == -1) { + end = string.length + } + } + for (var i = startIndex || 0, n = startValue || 0; ; ) { + var nextTab = string.indexOf("\t", i) + if (nextTab < 0 || nextTab >= end) { + return n + (end - i) + } + n += nextTab - i + n += tabSize - (n % tabSize) + i = nextTab + 1 + } + } + + var Delayed = function() { + this.id = null + this.f = null + this.time = 0 + this.handler = bind(this.onTimeout, this) + } + Delayed.prototype.onTimeout = function(self) { + self.id = 0 + if (self.time <= +new Date()) { + self.f() + } else { + setTimeout(self.handler, self.time - +new Date()) + } + } + Delayed.prototype.set = function(ms, f) { + this.f = f + var time = +new Date() + ms + if (!this.id || time < this.time) { + clearTimeout(this.id) + this.id = setTimeout(this.handler, ms) + this.time = time + } + } + + function indexOf(array, elt) { + for (var i = 0; i < array.length; ++i) { + if (array[i] == elt) { + return i + } + } + return -1 + } + + // Number of pixels added to scroller and sizer to hide scrollbar + var scrollerGap = 30 + + // Returned or thrown by various protocols to signal 'I'm not + // handling this'. + var Pass = { + toString: function() { + return "CodeMirror.Pass" + } + } + + // Reused option objects for setSelection & friends + var sel_dontScroll = { scroll: false }, + sel_mouse = { origin: "*mouse" }, + sel_move = { origin: "+move" } + + // The inverse of countColumn -- find the offset that corresponds to + // a particular column. + function findColumn(string, goal, tabSize) { + for (var pos = 0, col = 0; ; ) { + var nextTab = string.indexOf("\t", pos) + if (nextTab == -1) { + nextTab = string.length + } + var skipped = nextTab - pos + if (nextTab == string.length || col + skipped >= goal) { + return pos + Math.min(skipped, goal - col) + } + col += nextTab - pos + col += tabSize - (col % tabSize) + pos = nextTab + 1 + if (col >= goal) { + return pos + } + } + } + + var spaceStrs = [""] + function spaceStr(n) { + while (spaceStrs.length <= n) { + spaceStrs.push(lst(spaceStrs) + " ") + } + return spaceStrs[n] + } + + function lst(arr) { + return arr[arr.length - 1] + } + + function map(array, f) { + var out = [] + for (var i = 0; i < array.length; i++) { + out[i] = f(array[i], i) + } + return out + } + + function insertSorted(array, value, score) { + var pos = 0, + priority = score(value) + while (pos < array.length && score(array[pos]) <= priority) { + pos++ + } + array.splice(pos, 0, value) + } + + function nothing() {} + + function createObj(base, props) { + var inst + if (Object.create) { + inst = Object.create(base) + } else { + nothing.prototype = base + inst = new nothing() + } + if (props) { + copyObj(props, inst) + } + return inst + } + + var nonASCIISingleCaseWordChar = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/ + function isWordCharBasic(ch) { + return ( + /\w/.test(ch) || + (ch > "\x80" && + (ch.toUpperCase() != ch.toLowerCase() || nonASCIISingleCaseWordChar.test(ch))) + ) + } + function isWordChar(ch, helper) { + if (!helper) { + return isWordCharBasic(ch) + } + if (helper.source.indexOf("\\w") > -1 && isWordCharBasic(ch)) { + return true + } + return helper.test(ch) + } + + function isEmpty(obj) { + for (var n in obj) { + if (obj.hasOwnProperty(n) && obj[n]) { + return false + } + } + return true + } + + // Extending unicode characters. A series of a non-extending char + + // any number of extending chars is treated as a single unit as far + // as editing and measuring is concerned. This is not fully correct, + // since some scripts/fonts/browsers also treat other configurations + // of code points as a group. + var extendingChars = /[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/ + function isExtendingChar(ch) { + return ch.charCodeAt(0) >= 768 && extendingChars.test(ch) + } + + // Returns a number from the range [`0`; `str.length`] unless `pos` is outside that range. + function skipExtendingChars(str, pos, dir) { + while ((dir < 0 ? pos > 0 : pos < str.length) && isExtendingChar(str.charAt(pos))) { + pos += dir + } + return pos + } + + // Returns the value from the range [`from`; `to`] that satisfies + // `pred` and is closest to `from`. Assumes that at least `to` + // satisfies `pred`. Supports `from` being greater than `to`. + function findFirst(pred, from, to) { + // At any point we are certain `to` satisfies `pred`, don't know + // whether `from` does. + var dir = from > to ? -1 : 1 + for (;;) { + if (from == to) { + return from + } + var midF = (from + to) / 2, + mid = dir < 0 ? Math.ceil(midF) : Math.floor(midF) + if (mid == from) { + return pred(mid) ? from : to + } + if (pred(mid)) { + to = mid + } else { + from = mid + dir + } + } + } + + // BIDI HELPERS + + function iterateBidiSections(order, from, to, f) { + if (!order) { + return f(from, to, "ltr", 0) + } + var found = false + for (var i = 0; i < order.length; ++i) { + var part = order[i] + if ((part.from < to && part.to > from) || (from == to && part.to == from)) { + f( + Math.max(part.from, from), + Math.min(part.to, to), + part.level == 1 ? "rtl" : "ltr", + i + ) + found = true + } + } + if (!found) { + f(from, to, "ltr") + } + } + + var bidiOther = null + function getBidiPartAt(order, ch, sticky) { + var found + bidiOther = null + for (var i = 0; i < order.length; ++i) { + var cur = order[i] + if (cur.from < ch && cur.to > ch) { + return i + } + if (cur.to == ch) { + if (cur.from != cur.to && sticky == "before") { + found = i + } else { + bidiOther = i + } + } + if (cur.from == ch) { + if (cur.from != cur.to && sticky != "before") { + found = i + } else { + bidiOther = i + } + } + } + return found != null ? found : bidiOther + } + + // Bidirectional ordering algorithm + // See http://unicode.org/reports/tr9/tr9-13.html for the algorithm + // that this (partially) implements. + + // One-char codes used for character types: + // L (L): Left-to-Right + // R (R): Right-to-Left + // r (AL): Right-to-Left Arabic + // 1 (EN): European Number + // + (ES): European Number Separator + // % (ET): European Number Terminator + // n (AN): Arabic Number + // , (CS): Common Number Separator + // m (NSM): Non-Spacing Mark + // b (BN): Boundary Neutral + // s (B): Paragraph Separator + // t (S): Segment Separator + // w (WS): Whitespace + // N (ON): Other Neutrals + + // Returns null if characters are ordered as they appear + // (left-to-right), or an array of sections ({from, to, level} + // objects) in the order in which they occur visually. + var bidiOrdering = (function() { + // Character types for codepoints 0 to 0xff + var lowTypes = + "bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN" + // Character types for codepoints 0x600 to 0x6f9 + var arabicTypes = + "nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111" + function charType(code) { + if (code <= 0xf7) { + return lowTypes.charAt(code) + } else if (0x590 <= code && code <= 0x5f4) { + return "R" + } else if (0x600 <= code && code <= 0x6f9) { + return arabicTypes.charAt(code - 0x600) + } else if (0x6ee <= code && code <= 0x8ac) { + return "r" + } else if (0x2000 <= code && code <= 0x200b) { + return "w" + } else if (code == 0x200c) { + return "b" + } else { + return "L" + } + } + + var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/ + var isNeutral = /[stwN]/, + isStrong = /[LRr]/, + countsAsLeft = /[Lb1n]/, + countsAsNum = /[1n]/ + + function BidiSpan(level, from, to) { + this.level = level + this.from = from + this.to = to + } + + return function(str, direction) { + var outerType = direction == "ltr" ? "L" : "R" + + if (str.length == 0 || (direction == "ltr" && !bidiRE.test(str))) { + return false + } + var len = str.length, + types = [] + for (var i = 0; i < len; ++i) { + types.push(charType(str.charCodeAt(i))) + } + + // W1. Examine each non-spacing mark (NSM) in the level run, and + // change the type of the NSM to the type of the previous + // character. If the NSM is at the start of the level run, it will + // get the type of sor. + for (var i$1 = 0, prev = outerType; i$1 < len; ++i$1) { + var type = types[i$1] + if (type == "m") { + types[i$1] = prev + } else { + prev = type + } + } + + // W2. Search backwards from each instance of a European number + // until the first strong type (R, L, AL, or sor) is found. If an + // AL is found, change the type of the European number to Arabic + // number. + // W3. Change all ALs to R. + for (var i$2 = 0, cur = outerType; i$2 < len; ++i$2) { + var type$1 = types[i$2] + if (type$1 == "1" && cur == "r") { + types[i$2] = "n" + } else if (isStrong.test(type$1)) { + cur = type$1 + if (type$1 == "r") { + types[i$2] = "R" + } + } + } + + // W4. A single European separator between two European numbers + // changes to a European number. A single common separator between + // two numbers of the same type changes to that type. + for (var i$3 = 1, prev$1 = types[0]; i$3 < len - 1; ++i$3) { + var type$2 = types[i$3] + if (type$2 == "+" && prev$1 == "1" && types[i$3 + 1] == "1") { + types[i$3] = "1" + } else if ( + type$2 == "," && + prev$1 == types[i$3 + 1] && + (prev$1 == "1" || prev$1 == "n") + ) { + types[i$3] = prev$1 + } + prev$1 = type$2 + } + + // W5. A sequence of European terminators adjacent to European + // numbers changes to all European numbers. + // W6. Otherwise, separators and terminators change to Other + // Neutral. + for (var i$4 = 0; i$4 < len; ++i$4) { + var type$3 = types[i$4] + if (type$3 == ",") { + types[i$4] = "N" + } else if (type$3 == "%") { + var end = void 0 + for (end = i$4 + 1; end < len && types[end] == "%"; ++end) {} + var replace = + (i$4 && types[i$4 - 1] == "!") || (end < len && types[end] == "1") + ? "1" + : "N" + for (var j = i$4; j < end; ++j) { + types[j] = replace + } + i$4 = end - 1 + } + } + + // W7. Search backwards from each instance of a European number + // until the first strong type (R, L, or sor) is found. If an L is + // found, then change the type of the European number to L. + for (var i$5 = 0, cur$1 = outerType; i$5 < len; ++i$5) { + var type$4 = types[i$5] + if (cur$1 == "L" && type$4 == "1") { + types[i$5] = "L" + } else if (isStrong.test(type$4)) { + cur$1 = type$4 + } + } + + // N1. A sequence of neutrals takes the direction of the + // surrounding strong text if the text on both sides has the same + // direction. European and Arabic numbers act as if they were R in + // terms of their influence on neutrals. Start-of-level-run (sor) + // and end-of-level-run (eor) are used at level run boundaries. + // N2. Any remaining neutrals take the embedding direction. + for (var i$6 = 0; i$6 < len; ++i$6) { + if (isNeutral.test(types[i$6])) { + var end$1 = void 0 + for (end$1 = i$6 + 1; end$1 < len && isNeutral.test(types[end$1]); ++end$1) {} + var before = (i$6 ? types[i$6 - 1] : outerType) == "L" + var after = (end$1 < len ? types[end$1] : outerType) == "L" + var replace$1 = before == after ? (before ? "L" : "R") : outerType + for (var j$1 = i$6; j$1 < end$1; ++j$1) { + types[j$1] = replace$1 + } + i$6 = end$1 - 1 + } + } + + // Here we depart from the documented algorithm, in order to avoid + // building up an actual levels array. Since there are only three + // levels (0, 1, 2) in an implementation that doesn't take + // explicit embedding into account, we can build up the order on + // the fly, without following the level-based algorithm. + var order = [], + m + for (var i$7 = 0; i$7 < len; ) { + if (countsAsLeft.test(types[i$7])) { + var start = i$7 + for (++i$7; i$7 < len && countsAsLeft.test(types[i$7]); ++i$7) {} + order.push(new BidiSpan(0, start, i$7)) + } else { + var pos = i$7, + at = order.length, + isRTL = direction == "rtl" ? 1 : 0 + for (++i$7; i$7 < len && types[i$7] != "L"; ++i$7) {} + for (var j$2 = pos; j$2 < i$7; ) { + if (countsAsNum.test(types[j$2])) { + if (pos < j$2) { + order.splice(at, 0, new BidiSpan(1, pos, j$2)) + at += isRTL + } + var nstart = j$2 + for (++j$2; j$2 < i$7 && countsAsNum.test(types[j$2]); ++j$2) {} + order.splice(at, 0, new BidiSpan(2, nstart, j$2)) + at += isRTL + pos = j$2 + } else { + ++j$2 + } + } + if (pos < i$7) { + order.splice(at, 0, new BidiSpan(1, pos, i$7)) + } + } + } + if (direction == "ltr") { + if (order[0].level == 1 && (m = str.match(/^\s+/))) { + order[0].from = m[0].length + order.unshift(new BidiSpan(0, 0, m[0].length)) + } + if (lst(order).level == 1 && (m = str.match(/\s+$/))) { + lst(order).to -= m[0].length + order.push(new BidiSpan(0, len - m[0].length, len)) + } + } + + return direction == "rtl" ? order.reverse() : order + } + })() + + // Get the bidi ordering for the given line (and cache it). Returns + // false for lines that are fully left-to-right, and an array of + // BidiSpan objects otherwise. + function getOrder(line, direction) { + var order = line.order + if (order == null) { + order = line.order = bidiOrdering(line.text, direction) + } + return order + } + + // EVENT HANDLING + + // Lightweight event framework. on/off also work on DOM nodes, + // registering native DOM handlers. + + var noHandlers = [] + + var on = function(emitter, type, f) { + if (emitter.addEventListener) { + emitter.addEventListener(type, f, false) + } else if (emitter.attachEvent) { + emitter.attachEvent("on" + type, f) + } else { + var map = emitter._handlers || (emitter._handlers = {}) + map[type] = (map[type] || noHandlers).concat(f) + } + } + + function getHandlers(emitter, type) { + return (emitter._handlers && emitter._handlers[type]) || noHandlers + } + + function off(emitter, type, f) { + if (emitter.removeEventListener) { + emitter.removeEventListener(type, f, false) + } else if (emitter.detachEvent) { + emitter.detachEvent("on" + type, f) + } else { + var map = emitter._handlers, + arr = map && map[type] + if (arr) { + var index = indexOf(arr, f) + if (index > -1) { + map[type] = arr.slice(0, index).concat(arr.slice(index + 1)) + } + } + } + } + + function signal(emitter, type /*, values...*/) { + var handlers = getHandlers(emitter, type) + if (!handlers.length) { + return + } + var args = Array.prototype.slice.call(arguments, 2) + for (var i = 0; i < handlers.length; ++i) { + handlers[i].apply(null, args) + } + } + + // The DOM events that CodeMirror handles can be overridden by + // registering a (non-DOM) handler on the editor for the event name, + // and preventDefault-ing the event in that handler. + function signalDOMEvent(cm, e, override) { + if (typeof e == "string") { + e = { + type: e, + preventDefault: function() { + this.defaultPrevented = true + } + } + } + signal(cm, override || e.type, cm, e) + return e_defaultPrevented(e) || e.codemirrorIgnore + } + + function signalCursorActivity(cm) { + var arr = cm._handlers && cm._handlers.cursorActivity + if (!arr) { + return + } + var set = cm.curOp.cursorActivityHandlers || (cm.curOp.cursorActivityHandlers = []) + for (var i = 0; i < arr.length; ++i) { + if (indexOf(set, arr[i]) == -1) { + set.push(arr[i]) + } + } + } + + function hasHandler(emitter, type) { + return getHandlers(emitter, type).length > 0 + } + + // Add on and off methods to a constructor's prototype, to make + // registering events on such objects more convenient. + function eventMixin(ctor) { + ctor.prototype.on = function(type, f) { + on(this, type, f) + } + ctor.prototype.off = function(type, f) { + off(this, type, f) + } + } + + // Due to the fact that we still support jurassic IE versions, some + // compatibility wrappers are needed. + + function e_preventDefault(e) { + if (e.preventDefault) { + e.preventDefault() + } else { + e.returnValue = false + } + } + function e_stopPropagation(e) { + if (e.stopPropagation) { + e.stopPropagation() + } else { + e.cancelBubble = true + } + } + function e_defaultPrevented(e) { + return e.defaultPrevented != null ? e.defaultPrevented : e.returnValue == false + } + function e_stop(e) { + e_preventDefault(e) + e_stopPropagation(e) + } + + function e_target(e) { + return e.target || e.srcElement + } + function e_button(e) { + var b = e.which + if (b == null) { + if (e.button & 1) { + b = 1 + } else if (e.button & 2) { + b = 3 + } else if (e.button & 4) { + b = 2 + } + } + if (mac && e.ctrlKey && b == 1) { + b = 3 + } + return b + } + + // Detect drag-and-drop + var dragAndDrop = (function() { + // There is *some* kind of drag-and-drop support in IE6-8, but I + // couldn't get it to work yet. + if (ie && ie_version < 9) { + return false + } + var div = elt("div") + return "draggable" in div || "dragDrop" in div + })() + + var zwspSupported + function zeroWidthElement(measure) { + if (zwspSupported == null) { + var test = elt("span", "\u200b") + removeChildrenAndAdd(measure, elt("span", [test, document.createTextNode("x")])) + if (measure.firstChild.offsetHeight != 0) { + zwspSupported = + test.offsetWidth <= 1 && test.offsetHeight > 2 && !(ie && ie_version < 8) + } + } + var node = zwspSupported + ? elt("span", "\u200b") + : elt("span", "\u00a0", null, "display: inline-block; width: 1px; margin-right: -1px") + node.setAttribute("cm-text", "") + return node + } + + // Feature-detect IE's crummy client rect reporting for bidi text + var badBidiRects + function hasBadBidiRects(measure) { + if (badBidiRects != null) { + return badBidiRects + } + var txt = removeChildrenAndAdd(measure, document.createTextNode("A\u062eA")) + var r0 = range(txt, 0, 1).getBoundingClientRect() + var r1 = range(txt, 1, 2).getBoundingClientRect() + removeChildren(measure) + if (!r0 || r0.left == r0.right) { + return false + } // Safari returns null in some cases (#2780) + return (badBidiRects = r1.right - r0.right < 3) + } + + // See if "".split is the broken IE version, if so, provide an + // alternative way to split lines. + var splitLinesAuto = + "\n\nb".split(/\n/).length != 3 + ? function(string) { + var pos = 0, + result = [], + l = string.length + while (pos <= l) { + var nl = string.indexOf("\n", pos) + if (nl == -1) { + nl = string.length + } + var line = string.slice(pos, string.charAt(nl - 1) == "\r" ? nl - 1 : nl) + var rt = line.indexOf("\r") + if (rt != -1) { + result.push(line.slice(0, rt)) + pos += rt + 1 + } else { + result.push(line) + pos = nl + 1 + } + } + return result + } + : function(string) { + return string.split(/\r\n?|\n/) + } + + var hasSelection = window.getSelection + ? function(te) { + try { + return te.selectionStart != te.selectionEnd + } catch (e) { + return false + } + } + : function(te) { + var range + try { + range = te.ownerDocument.selection.createRange() + } catch (e) {} + if (!range || range.parentElement() != te) { + return false + } + return range.compareEndPoints("StartToEnd", range) != 0 + } + + var hasCopyEvent = (function() { + var e = elt("div") + if ("oncopy" in e) { + return true + } + e.setAttribute("oncopy", "return;") + return typeof e.oncopy == "function" + })() + + var badZoomedRects = null + function hasBadZoomedRects(measure) { + if (badZoomedRects != null) { + return badZoomedRects + } + var node = removeChildrenAndAdd(measure, elt("span", "x")) + var normal = node.getBoundingClientRect() + var fromRange = range(node, 0, 1).getBoundingClientRect() + return (badZoomedRects = Math.abs(normal.left - fromRange.left) > 1) + } + + // Known modes, by name and by MIME + var modes = {}, + mimeModes = {} + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + function defineMode(name, mode) { + if (arguments.length > 2) { + mode.dependencies = Array.prototype.slice.call(arguments, 2) + } + modes[name] = mode + } + + function defineMIME(mime, spec) { + mimeModes[mime] = spec + } + + // Given a MIME type, a {name, ...options} config object, or a name + // string, return a mode config object. + function resolveMode(spec) { + if (typeof spec == "string" && mimeModes.hasOwnProperty(spec)) { + spec = mimeModes[spec] + } else if (spec && typeof spec.name == "string" && mimeModes.hasOwnProperty(spec.name)) { + var found = mimeModes[spec.name] + if (typeof found == "string") { + found = { name: found } + } + spec = createObj(found, spec) + spec.name = found.name + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+xml$/.test(spec)) { + return resolveMode("application/xml") + } else if (typeof spec == "string" && /^[\w\-]+\/[\w\-]+\+json$/.test(spec)) { + return resolveMode("application/json") + } + if (typeof spec == "string") { + return { name: spec } + } else { + return spec || { name: "null" } + } + } + + // Given a mode spec (anything that resolveMode accepts), find and + // initialize an actual mode object. + function getMode(options, spec) { + spec = resolveMode(spec) + var mfactory = modes[spec.name] + if (!mfactory) { + return getMode(options, "text/plain") + } + var modeObj = mfactory(options, spec) + if (modeExtensions.hasOwnProperty(spec.name)) { + var exts = modeExtensions[spec.name] + for (var prop in exts) { + if (!exts.hasOwnProperty(prop)) { + continue + } + if (modeObj.hasOwnProperty(prop)) { + modeObj["_" + prop] = modeObj[prop] + } + modeObj[prop] = exts[prop] + } + } + modeObj.name = spec.name + if (spec.helperType) { + modeObj.helperType = spec.helperType + } + if (spec.modeProps) { + for (var prop$1 in spec.modeProps) { + modeObj[prop$1] = spec.modeProps[prop$1] + } + } + + return modeObj + } + + // This can be used to attach properties to mode objects from + // outside the actual mode definition. + var modeExtensions = {} + function extendMode(mode, properties) { + var exts = modeExtensions.hasOwnProperty(mode) + ? modeExtensions[mode] + : (modeExtensions[mode] = {}) + copyObj(properties, exts) + } + + function copyState(mode, state) { + if (state === true) { + return state + } + if (mode.copyState) { + return mode.copyState(state) + } + var nstate = {} + for (var n in state) { + var val = state[n] + if (val instanceof Array) { + val = val.concat([]) + } + nstate[n] = val + } + return nstate + } + + // Given a mode and a state (for that mode), find the inner mode and + // state at the position that the state refers to. + function innerMode(mode, state) { + var info + while (mode.innerMode) { + info = mode.innerMode(state) + if (!info || info.mode == mode) { + break + } + state = info.state + mode = info.mode + } + return info || { mode: mode, state: state } + } + + function startState(mode, a1, a2) { + return mode.startState ? mode.startState(a1, a2) : true + } + + // STRING STREAM + + // Fed to the mode parsers, provides helper functions to make + // parsers more succinct. + + var StringStream = function(string, tabSize, lineOracle) { + this.pos = this.start = 0 + this.string = string + this.tabSize = tabSize || 8 + this.lastColumnPos = this.lastColumnValue = 0 + this.lineStart = 0 + this.lineOracle = lineOracle + } + + StringStream.prototype.eol = function() { + return this.pos >= this.string.length + } + StringStream.prototype.sol = function() { + return this.pos == this.lineStart + } + StringStream.prototype.peek = function() { + return this.string.charAt(this.pos) || undefined + } + StringStream.prototype.next = function() { + if (this.pos < this.string.length) { + return this.string.charAt(this.pos++) + } + } + StringStream.prototype.eat = function(match) { + var ch = this.string.charAt(this.pos) + var ok + if (typeof match == "string") { + ok = ch == match + } else { + ok = ch && (match.test ? match.test(ch) : match(ch)) + } + if (ok) { + ++this.pos + return ch + } + } + StringStream.prototype.eatWhile = function(match) { + var start = this.pos + while (this.eat(match)) {} + return this.pos > start + } + StringStream.prototype.eatSpace = function() { + var start = this.pos + while (/[\s\u00a0]/.test(this.string.charAt(this.pos))) { + ++this.pos + } + return this.pos > start + } + StringStream.prototype.skipToEnd = function() { + this.pos = this.string.length + } + StringStream.prototype.skipTo = function(ch) { + var found = this.string.indexOf(ch, this.pos) + if (found > -1) { + this.pos = found + return true + } + } + StringStream.prototype.backUp = function(n) { + this.pos -= n + } + StringStream.prototype.column = function() { + if (this.lastColumnPos < this.start) { + this.lastColumnValue = countColumn( + this.string, + this.start, + this.tabSize, + this.lastColumnPos, + this.lastColumnValue + ) + this.lastColumnPos = this.start + } + return ( + this.lastColumnValue - + (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) + ) + } + StringStream.prototype.indentation = function() { + return ( + countColumn(this.string, null, this.tabSize) - + (this.lineStart ? countColumn(this.string, this.lineStart, this.tabSize) : 0) + ) + } + StringStream.prototype.match = function(pattern, consume, caseInsensitive) { + if (typeof pattern == "string") { + var cased = function(str) { + return caseInsensitive ? str.toLowerCase() : str + } + var substr = this.string.substr(this.pos, pattern.length) + if (cased(substr) == cased(pattern)) { + if (consume !== false) { + this.pos += pattern.length + } + return true + } + } else { + var match = this.string.slice(this.pos).match(pattern) + if (match && match.index > 0) { + return null + } + if (match && consume !== false) { + this.pos += match[0].length + } + return match + } + } + StringStream.prototype.current = function() { + return this.string.slice(this.start, this.pos) + } + StringStream.prototype.hideFirstChars = function(n, inner) { + this.lineStart += n + try { + return inner() + } finally { + this.lineStart -= n + } + } + StringStream.prototype.lookAhead = function(n) { + var oracle = this.lineOracle + return oracle && oracle.lookAhead(n) + } + StringStream.prototype.baseToken = function() { + var oracle = this.lineOracle + return oracle && oracle.baseToken(this.pos) + } + + // Find the line object corresponding to the given line number. + function getLine(doc, n) { + n -= doc.first + if (n < 0 || n >= doc.size) { + throw new Error("There is no line " + (n + doc.first) + " in the document.") + } + var chunk = doc + while (!chunk.lines) { + for (var i = 0; ; ++i) { + var child = chunk.children[i], + sz = child.chunkSize() + if (n < sz) { + chunk = child + break + } + n -= sz + } + } + return chunk.lines[n] + } + + // Get the part of a document between two positions, as an array of + // strings. + function getBetween(doc, start, end) { + var out = [], + n = start.line + doc.iter(start.line, end.line + 1, function(line) { + var text = line.text + if (n == end.line) { + text = text.slice(0, end.ch) + } + if (n == start.line) { + text = text.slice(start.ch) + } + out.push(text) + ++n + }) + return out + } + // Get the lines between from and to, as array of strings. + function getLines(doc, from, to) { + var out = [] + doc.iter(from, to, function(line) { + out.push(line.text) + }) // iter aborts when callback returns truthy value + return out + } + + // Update the height of a line, propagating the height change + // upwards to parent nodes. + function updateLineHeight(line, height) { + var diff = height - line.height + if (diff) { + for (var n = line; n; n = n.parent) { + n.height += diff + } + } + } + + // Given a line object, find its line number by walking up through + // its parent links. + function lineNo(line) { + if (line.parent == null) { + return null + } + var cur = line.parent, + no = indexOf(cur.lines, line) + for (var chunk = cur.parent; chunk; cur = chunk, chunk = chunk.parent) { + for (var i = 0; ; ++i) { + if (chunk.children[i] == cur) { + break + } + no += chunk.children[i].chunkSize() + } + } + return no + cur.first + } + + // Find the line at the given vertical position, using the height + // information in the document tree. + function lineAtHeight(chunk, h) { + var n = chunk.first + outer: do { + for (var i$1 = 0; i$1 < chunk.children.length; ++i$1) { + var child = chunk.children[i$1], + ch = child.height + if (h < ch) { + chunk = child + continue outer + } + h -= ch + n += child.chunkSize() + } + return n + } while (!chunk.lines) + var i = 0 + for (; i < chunk.lines.length; ++i) { + var line = chunk.lines[i], + lh = line.height + if (h < lh) { + break + } + h -= lh + } + return n + i + } + + function isLine(doc, l) { + return l >= doc.first && l < doc.first + doc.size + } + + function lineNumberFor(options, i) { + return String(options.lineNumberFormatter(i + options.firstLineNumber)) + } + + // A Pos instance represents a position within the text. + function Pos(line, ch, sticky) { + if (sticky === void 0) sticky = null + + if (!(this instanceof Pos)) { + return new Pos(line, ch, sticky) + } + this.line = line + this.ch = ch + this.sticky = sticky + } + + // Compare two positions, return 0 if they are the same, a negative + // number when a is less, and a positive number otherwise. + function cmp(a, b) { + return a.line - b.line || a.ch - b.ch + } + + function equalCursorPos(a, b) { + return a.sticky == b.sticky && cmp(a, b) == 0 + } + + function copyPos(x) { + return Pos(x.line, x.ch) + } + function maxPos(a, b) { + return cmp(a, b) < 0 ? b : a + } + function minPos(a, b) { + return cmp(a, b) < 0 ? a : b + } + + // Most of the external API clips given positions to make sure they + // actually exist within the document. + function clipLine(doc, n) { + return Math.max(doc.first, Math.min(n, doc.first + doc.size - 1)) + } + function clipPos(doc, pos) { + if (pos.line < doc.first) { + return Pos(doc.first, 0) + } + var last = doc.first + doc.size - 1 + if (pos.line > last) { + return Pos(last, getLine(doc, last).text.length) + } + return clipToLen(pos, getLine(doc, pos.line).text.length) + } + function clipToLen(pos, linelen) { + var ch = pos.ch + if (ch == null || ch > linelen) { + return Pos(pos.line, linelen) + } else if (ch < 0) { + return Pos(pos.line, 0) + } else { + return pos + } + } + function clipPosArray(doc, array) { + var out = [] + for (var i = 0; i < array.length; i++) { + out[i] = clipPos(doc, array[i]) + } + return out + } + + var SavedContext = function(state, lookAhead) { + this.state = state + this.lookAhead = lookAhead + } + + var Context = function(doc, state, line, lookAhead) { + this.state = state + this.doc = doc + this.line = line + this.maxLookAhead = lookAhead || 0 + this.baseTokens = null + this.baseTokenPos = 1 + } + + Context.prototype.lookAhead = function(n) { + var line = this.doc.getLine(this.line + n) + if (line != null && n > this.maxLookAhead) { + this.maxLookAhead = n + } + return line + } + + Context.prototype.baseToken = function(n) { + if (!this.baseTokens) { + return null + } + while (this.baseTokens[this.baseTokenPos] <= n) { + this.baseTokenPos += 2 + } + var type = this.baseTokens[this.baseTokenPos + 1] + return { + type: type && type.replace(/( |^)overlay .*/, ""), + size: this.baseTokens[this.baseTokenPos] - n + } + } + + Context.prototype.nextLine = function() { + this.line++ + if (this.maxLookAhead > 0) { + this.maxLookAhead-- + } + } + + Context.fromSaved = function(doc, saved, line) { + if (saved instanceof SavedContext) { + return new Context(doc, copyState(doc.mode, saved.state), line, saved.lookAhead) + } else { + return new Context(doc, copyState(doc.mode, saved), line) + } + } + + Context.prototype.save = function(copy) { + var state = copy !== false ? copyState(this.doc.mode, this.state) : this.state + return this.maxLookAhead > 0 ? new SavedContext(state, this.maxLookAhead) : state + } + + // Compute a style array (an array starting with a mode generation + // -- for invalidation -- followed by pairs of end positions and + // style strings), which is used to highlight the tokens on the + // line. + function highlightLine(cm, line, context, forceToEnd) { + // A styles array always starts with a number identifying the + // mode/overlays that it is based on (for easy invalidation). + var st = [cm.state.modeGen], + lineClasses = {} + // Compute the base array of styles + runMode( + cm, + line.text, + cm.doc.mode, + context, + function(end, style) { + return st.push(end, style) + }, + lineClasses, + forceToEnd + ) + var state = context.state + + // Run overlays, adjust style array. + var loop = function(o) { + context.baseTokens = st + var overlay = cm.state.overlays[o], + i = 1, + at = 0 + context.state = true + runMode( + cm, + line.text, + overlay.mode, + context, + function(end, style) { + var start = i + // Ensure there's a token end at the current position, and that i points at it + while (at < end) { + var i_end = st[i] + if (i_end > end) { + st.splice(i, 1, end, st[i + 1], i_end) + } + i += 2 + at = Math.min(end, i_end) + } + if (!style) { + return + } + if (overlay.opaque) { + st.splice(start, i - start, end, "overlay " + style) + i = start + 2 + } else { + for (; start < i; start += 2) { + var cur = st[start + 1] + st[start + 1] = (cur ? cur + " " : "") + "overlay " + style + } + } + }, + lineClasses + ) + context.state = state + context.baseTokens = null + context.baseTokenPos = 1 + } + + for (var o = 0; o < cm.state.overlays.length; ++o) loop(o) + + return { + styles: st, + classes: lineClasses.bgClass || lineClasses.textClass ? lineClasses : null + } + } + + function getLineStyles(cm, line, updateFrontier) { + if (!line.styles || line.styles[0] != cm.state.modeGen) { + var context = getContextBefore(cm, lineNo(line)) + var resetState = + line.text.length > cm.options.maxHighlightLength && + copyState(cm.doc.mode, context.state) + var result = highlightLine(cm, line, context) + if (resetState) { + context.state = resetState + } + line.stateAfter = context.save(!resetState) + line.styles = result.styles + if (result.classes) { + line.styleClasses = result.classes + } else if (line.styleClasses) { + line.styleClasses = null + } + if (updateFrontier === cm.doc.highlightFrontier) { + cm.doc.modeFrontier = Math.max(cm.doc.modeFrontier, ++cm.doc.highlightFrontier) + } + } + return line.styles + } + + function getContextBefore(cm, n, precise) { + var doc = cm.doc, + display = cm.display + if (!doc.mode.startState) { + return new Context(doc, true, n) + } + var start = findStartLine(cm, n, precise) + var saved = start > doc.first && getLine(doc, start - 1).stateAfter + var context = saved + ? Context.fromSaved(doc, saved, start) + : new Context(doc, startState(doc.mode), start) + + doc.iter(start, n, function(line) { + processLine(cm, line.text, context) + var pos = context.line + line.stateAfter = + pos == n - 1 || pos % 5 == 0 || (pos >= display.viewFrom && pos < display.viewTo) + ? context.save() + : null + context.nextLine() + }) + if (precise) { + doc.modeFrontier = context.line + } + return context + } + + // Lightweight form of highlight -- proceed over this line and + // update state, but don't save a style array. Used for lines that + // aren't currently visible. + function processLine(cm, text, context, startAt) { + var mode = cm.doc.mode + var stream = new StringStream(text, cm.options.tabSize, context) + stream.start = stream.pos = startAt || 0 + if (text == "") { + callBlankLine(mode, context.state) + } + while (!stream.eol()) { + readToken(mode, stream, context.state) + stream.start = stream.pos + } + } + + function callBlankLine(mode, state) { + if (mode.blankLine) { + return mode.blankLine(state) + } + if (!mode.innerMode) { + return + } + var inner = innerMode(mode, state) + if (inner.mode.blankLine) { + return inner.mode.blankLine(inner.state) + } + } + + function readToken(mode, stream, state, inner) { + for (var i = 0; i < 10; i++) { + if (inner) { + inner[0] = innerMode(mode, state).mode + } + var style = mode.token(stream, state) + if (stream.pos > stream.start) { + return style + } + } + throw new Error("Mode " + mode.name + " failed to advance stream.") + } + + var Token = function(stream, type, state) { + this.start = stream.start + this.end = stream.pos + this.string = stream.current() + this.type = type || null + this.state = state + } + + // Utility for getTokenAt and getLineTokens + function takeToken(cm, pos, precise, asArray) { + var doc = cm.doc, + mode = doc.mode, + style + pos = clipPos(doc, pos) + var line = getLine(doc, pos.line), + context = getContextBefore(cm, pos.line, precise) + var stream = new StringStream(line.text, cm.options.tabSize, context), + tokens + if (asArray) { + tokens = [] + } + while ((asArray || stream.pos < pos.ch) && !stream.eol()) { + stream.start = stream.pos + style = readToken(mode, stream, context.state) + if (asArray) { + tokens.push(new Token(stream, style, copyState(doc.mode, context.state))) + } + } + return asArray ? tokens : new Token(stream, style, context.state) + } + + function extractLineClasses(type, output) { + if (type) { + for (;;) { + var lineClass = type.match(/(?:^|\s+)line-(background-)?(\S+)/) + if (!lineClass) { + break + } + type = + type.slice(0, lineClass.index) + + type.slice(lineClass.index + lineClass[0].length) + var prop = lineClass[1] ? "bgClass" : "textClass" + if (output[prop] == null) { + output[prop] = lineClass[2] + } else if (!new RegExp("(?:^|s)" + lineClass[2] + "(?:$|s)").test(output[prop])) { + output[prop] += " " + lineClass[2] + } + } + } + return type + } + + // Run the given mode's parser over a line, calling f for each token. + function runMode(cm, text, mode, context, f, lineClasses, forceToEnd) { + var flattenSpans = mode.flattenSpans + if (flattenSpans == null) { + flattenSpans = cm.options.flattenSpans + } + var curStart = 0, + curStyle = null + var stream = new StringStream(text, cm.options.tabSize, context), + style + var inner = cm.options.addModeClass && [null] + if (text == "") { + extractLineClasses(callBlankLine(mode, context.state), lineClasses) + } + while (!stream.eol()) { + if (stream.pos > cm.options.maxHighlightLength) { + flattenSpans = false + if (forceToEnd) { + processLine(cm, text, context, stream.pos) + } + stream.pos = text.length + style = null + } else { + style = extractLineClasses( + readToken(mode, stream, context.state, inner), + lineClasses + ) + } + if (inner) { + var mName = inner[0].name + if (mName) { + style = "m-" + (style ? mName + " " + style : mName) + } + } + if (!flattenSpans || curStyle != style) { + while (curStart < stream.start) { + curStart = Math.min(stream.start, curStart + 5000) + f(curStart, curStyle) + } + curStyle = style + } + stream.start = stream.pos + } + while (curStart < stream.pos) { + // Webkit seems to refuse to render text nodes longer than 57444 + // characters, and returns inaccurate measurements in nodes + // starting around 5000 chars. + var pos = Math.min(stream.pos, curStart + 5000) + f(pos, curStyle) + curStart = pos + } + } + + // Finds the line to start with when starting a parse. Tries to + // find a line with a stateAfter, so that it can start with a + // valid state. If that fails, it returns the line with the + // smallest indentation, which tends to need the least context to + // parse correctly. + function findStartLine(cm, n, precise) { + var minindent, + minline, + doc = cm.doc + var lim = precise ? -1 : n - (cm.doc.mode.innerMode ? 1000 : 100) + for (var search = n; search > lim; --search) { + if (search <= doc.first) { + return doc.first + } + var line = getLine(doc, search - 1), + after = line.stateAfter + if ( + after && + (!precise || + search + (after instanceof SavedContext ? after.lookAhead : 0) <= + doc.modeFrontier) + ) { + return search + } + var indented = countColumn(line.text, null, cm.options.tabSize) + if (minline == null || minindent > indented) { + minline = search - 1 + minindent = indented + } + } + return minline + } + + function retreatFrontier(doc, n) { + doc.modeFrontier = Math.min(doc.modeFrontier, n) + if (doc.highlightFrontier < n - 10) { + return + } + var start = doc.first + for (var line = n - 1; line > start; line--) { + var saved = getLine(doc, line).stateAfter + // change is on 3 + // state on line 1 looked ahead 2 -- so saw 3 + // test 1 + 2 < 3 should cover this + if (saved && (!(saved instanceof SavedContext) || line + saved.lookAhead < n)) { + start = line + 1 + break + } + } + doc.highlightFrontier = Math.min(doc.highlightFrontier, start) + } + + // Optimize some code when these features are not used. + var sawReadOnlySpans = false, + sawCollapsedSpans = false + + function seeReadOnlySpans() { + sawReadOnlySpans = true + } + + function seeCollapsedSpans() { + sawCollapsedSpans = true + } + + // TEXTMARKER SPANS + + function MarkedSpan(marker, from, to) { + this.marker = marker + this.from = from + this.to = to + } + + // Search an array of spans for a span matching the given marker. + function getMarkedSpanFor(spans, marker) { + if (spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i] + if (span.marker == marker) { + return span + } + } + } + } + // Remove a span from an array, returning undefined if no spans are + // left (we don't store arrays for lines without spans). + function removeMarkedSpan(spans, span) { + var r + for (var i = 0; i < spans.length; ++i) { + if (spans[i] != span) { + ;(r || (r = [])).push(spans[i]) + } + } + return r + } + // Add a span to a line. + function addMarkedSpan(line, span) { + line.markedSpans = line.markedSpans ? line.markedSpans.concat([span]) : [span] + span.marker.attachLine(line) + } + + // Used for the algorithm that adjusts markers for a change in the + // document. These functions cut an array of spans at a given + // character position, returning an array of remaining chunks (or + // undefined if nothing remains). + function markedSpansBefore(old, startCh, isInsert) { + var nw + if (old) { + for (var i = 0; i < old.length; ++i) { + var span = old[i], + marker = span.marker + var startsBefore = + span.from == null || + (marker.inclusiveLeft ? span.from <= startCh : span.from < startCh) + if ( + startsBefore || + (span.from == startCh && + marker.type == "bookmark" && + (!isInsert || !span.marker.insertLeft)) + ) { + var endsAfter = + span.to == null || + (marker.inclusiveRight ? span.to >= startCh : span.to > startCh) + ;(nw || (nw = [])).push( + new MarkedSpan(marker, span.from, endsAfter ? null : span.to) + ) + } + } + } + return nw + } + function markedSpansAfter(old, endCh, isInsert) { + var nw + if (old) { + for (var i = 0; i < old.length; ++i) { + var span = old[i], + marker = span.marker + var endsAfter = + span.to == null || (marker.inclusiveRight ? span.to >= endCh : span.to > endCh) + if ( + endsAfter || + (span.from == endCh && + marker.type == "bookmark" && + (!isInsert || span.marker.insertLeft)) + ) { + var startsBefore = + span.from == null || + (marker.inclusiveLeft ? span.from <= endCh : span.from < endCh) + ;(nw || (nw = [])).push( + new MarkedSpan( + marker, + startsBefore ? null : span.from - endCh, + span.to == null ? null : span.to - endCh + ) + ) + } + } + } + return nw + } + + // Given a change object, compute the new set of marker spans that + // cover the line in which the change took place. Removes spans + // entirely within the change, reconnects spans belonging to the + // same marker that appear on both sides of the change, and cuts off + // spans partially within the change. Returns an array of span + // arrays with one element for each line in (after) the change. + function stretchSpansOverChange(doc, change) { + if (change.full) { + return null + } + var oldFirst = isLine(doc, change.from.line) && getLine(doc, change.from.line).markedSpans + var oldLast = isLine(doc, change.to.line) && getLine(doc, change.to.line).markedSpans + if (!oldFirst && !oldLast) { + return null + } + + var startCh = change.from.ch, + endCh = change.to.ch, + isInsert = cmp(change.from, change.to) == 0 + // Get the spans that 'stick out' on both sides + var first = markedSpansBefore(oldFirst, startCh, isInsert) + var last = markedSpansAfter(oldLast, endCh, isInsert) + + // Next, merge those two ends + var sameLine = change.text.length == 1, + offset = lst(change.text).length + (sameLine ? startCh : 0) + if (first) { + // Fix up .to properties of first + for (var i = 0; i < first.length; ++i) { + var span = first[i] + if (span.to == null) { + var found = getMarkedSpanFor(last, span.marker) + if (!found) { + span.to = startCh + } else if (sameLine) { + span.to = found.to == null ? null : found.to + offset + } + } + } + } + if (last) { + // Fix up .from in last (or move them into first in case of sameLine) + for (var i$1 = 0; i$1 < last.length; ++i$1) { + var span$1 = last[i$1] + if (span$1.to != null) { + span$1.to += offset + } + if (span$1.from == null) { + var found$1 = getMarkedSpanFor(first, span$1.marker) + if (!found$1) { + span$1.from = offset + if (sameLine) { + ;(first || (first = [])).push(span$1) + } + } + } else { + span$1.from += offset + if (sameLine) { + ;(first || (first = [])).push(span$1) + } + } + } + } + // Make sure we didn't create any zero-length spans + if (first) { + first = clearEmptySpans(first) + } + if (last && last != first) { + last = clearEmptySpans(last) + } + + var newMarkers = [first] + if (!sameLine) { + // Fill gap with whole-line-spans + var gap = change.text.length - 2, + gapMarkers + if (gap > 0 && first) { + for (var i$2 = 0; i$2 < first.length; ++i$2) { + if (first[i$2].to == null) { + ;(gapMarkers || (gapMarkers = [])).push( + new MarkedSpan(first[i$2].marker, null, null) + ) + } + } + } + for (var i$3 = 0; i$3 < gap; ++i$3) { + newMarkers.push(gapMarkers) + } + newMarkers.push(last) + } + return newMarkers + } + + // Remove spans that are empty and don't have a clearWhenEmpty + // option of false. + function clearEmptySpans(spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i] + if (span.from != null && span.from == span.to && span.marker.clearWhenEmpty !== false) { + spans.splice(i--, 1) + } + } + if (!spans.length) { + return null + } + return spans + } + + // Used to 'clip' out readOnly ranges when making a change. + function removeReadOnlyRanges(doc, from, to) { + var markers = null + doc.iter(from.line, to.line + 1, function(line) { + if (line.markedSpans) { + for (var i = 0; i < line.markedSpans.length; ++i) { + var mark = line.markedSpans[i].marker + if (mark.readOnly && (!markers || indexOf(markers, mark) == -1)) { + ;(markers || (markers = [])).push(mark) + } + } + } + }) + if (!markers) { + return null + } + var parts = [{ from: from, to: to }] + for (var i = 0; i < markers.length; ++i) { + var mk = markers[i], + m = mk.find(0) + for (var j = 0; j < parts.length; ++j) { + var p = parts[j] + if (cmp(p.to, m.from) < 0 || cmp(p.from, m.to) > 0) { + continue + } + var newParts = [j, 1], + dfrom = cmp(p.from, m.from), + dto = cmp(p.to, m.to) + if (dfrom < 0 || (!mk.inclusiveLeft && !dfrom)) { + newParts.push({ from: p.from, to: m.from }) + } + if (dto > 0 || (!mk.inclusiveRight && !dto)) { + newParts.push({ from: m.to, to: p.to }) + } + parts.splice.apply(parts, newParts) + j += newParts.length - 3 + } + } + return parts + } + + // Connect or disconnect spans from a line. + function detachMarkedSpans(line) { + var spans = line.markedSpans + if (!spans) { + return + } + for (var i = 0; i < spans.length; ++i) { + spans[i].marker.detachLine(line) + } + line.markedSpans = null + } + function attachMarkedSpans(line, spans) { + if (!spans) { + return + } + for (var i = 0; i < spans.length; ++i) { + spans[i].marker.attachLine(line) + } + line.markedSpans = spans + } + + // Helpers used when computing which overlapping collapsed span + // counts as the larger one. + function extraLeft(marker) { + return marker.inclusiveLeft ? -1 : 0 + } + function extraRight(marker) { + return marker.inclusiveRight ? 1 : 0 + } + + // Returns a number indicating which of two overlapping collapsed + // spans is larger (and thus includes the other). Falls back to + // comparing ids when the spans cover exactly the same range. + function compareCollapsedMarkers(a, b) { + var lenDiff = a.lines.length - b.lines.length + if (lenDiff != 0) { + return lenDiff + } + var aPos = a.find(), + bPos = b.find() + var fromCmp = cmp(aPos.from, bPos.from) || extraLeft(a) - extraLeft(b) + if (fromCmp) { + return -fromCmp + } + var toCmp = cmp(aPos.to, bPos.to) || extraRight(a) - extraRight(b) + if (toCmp) { + return toCmp + } + return b.id - a.id + } + + // Find out whether a line ends or starts in a collapsed span. If + // so, return the marker for that span. + function collapsedSpanAtSide(line, start) { + var sps = sawCollapsedSpans && line.markedSpans, + found + if (sps) { + for (var sp = void 0, i = 0; i < sps.length; ++i) { + sp = sps[i] + if ( + sp.marker.collapsed && + (start ? sp.from : sp.to) == null && + (!found || compareCollapsedMarkers(found, sp.marker) < 0) + ) { + found = sp.marker + } + } + } + return found + } + function collapsedSpanAtStart(line) { + return collapsedSpanAtSide(line, true) + } + function collapsedSpanAtEnd(line) { + return collapsedSpanAtSide(line, false) + } + + function collapsedSpanAround(line, ch) { + var sps = sawCollapsedSpans && line.markedSpans, + found + if (sps) { + for (var i = 0; i < sps.length; ++i) { + var sp = sps[i] + if ( + sp.marker.collapsed && + (sp.from == null || sp.from < ch) && + (sp.to == null || sp.to > ch) && + (!found || compareCollapsedMarkers(found, sp.marker) < 0) + ) { + found = sp.marker + } + } + } + return found + } + + // Test whether there exists a collapsed span that partially + // overlaps (covers the start or end, but not both) of a new span. + // Such overlap is not allowed. + function conflictingCollapsedRange(doc, lineNo, from, to, marker) { + var line = getLine(doc, lineNo) + var sps = sawCollapsedSpans && line.markedSpans + if (sps) { + for (var i = 0; i < sps.length; ++i) { + var sp = sps[i] + if (!sp.marker.collapsed) { + continue + } + var found = sp.marker.find(0) + var fromCmp = cmp(found.from, from) || extraLeft(sp.marker) - extraLeft(marker) + var toCmp = cmp(found.to, to) || extraRight(sp.marker) - extraRight(marker) + if ((fromCmp >= 0 && toCmp <= 0) || (fromCmp <= 0 && toCmp >= 0)) { + continue + } + if ( + (fromCmp <= 0 && + (sp.marker.inclusiveRight && marker.inclusiveLeft + ? cmp(found.to, from) >= 0 + : cmp(found.to, from) > 0)) || + (fromCmp >= 0 && + (sp.marker.inclusiveRight && marker.inclusiveLeft + ? cmp(found.from, to) <= 0 + : cmp(found.from, to) < 0)) + ) { + return true + } + } + } + } + + // A visual line is a line as drawn on the screen. Folding, for + // example, can cause multiple logical lines to appear on the same + // visual line. This finds the start of the visual line that the + // given line is part of (usually that is the line itself). + function visualLine(line) { + var merged + while ((merged = collapsedSpanAtStart(line))) { + line = merged.find(-1, true).line + } + return line + } + + function visualLineEnd(line) { + var merged + while ((merged = collapsedSpanAtEnd(line))) { + line = merged.find(1, true).line + } + return line + } + + // Returns an array of logical lines that continue the visual line + // started by the argument, or undefined if there are no such lines. + function visualLineContinued(line) { + var merged, lines + while ((merged = collapsedSpanAtEnd(line))) { + line = merged.find(1, true).line + ;(lines || (lines = [])).push(line) + } + return lines + } + + // Get the line number of the start of the visual line that the + // given line number is part of. + function visualLineNo(doc, lineN) { + var line = getLine(doc, lineN), + vis = visualLine(line) + if (line == vis) { + return lineN + } + return lineNo(vis) + } + + // Get the line number of the start of the next visual line after + // the given line. + function visualLineEndNo(doc, lineN) { + if (lineN > doc.lastLine()) { + return lineN + } + var line = getLine(doc, lineN), + merged + if (!lineIsHidden(doc, line)) { + return lineN + } + while ((merged = collapsedSpanAtEnd(line))) { + line = merged.find(1, true).line + } + return lineNo(line) + 1 + } + + // Compute whether a line is hidden. Lines count as hidden when they + // are part of a visual line that starts with another line, or when + // they are entirely covered by collapsed, non-widget span. + function lineIsHidden(doc, line) { + var sps = sawCollapsedSpans && line.markedSpans + if (sps) { + for (var sp = void 0, i = 0; i < sps.length; ++i) { + sp = sps[i] + if (!sp.marker.collapsed) { + continue + } + if (sp.from == null) { + return true + } + if (sp.marker.widgetNode) { + continue + } + if (sp.from == 0 && sp.marker.inclusiveLeft && lineIsHiddenInner(doc, line, sp)) { + return true + } + } + } + } + function lineIsHiddenInner(doc, line, span) { + if (span.to == null) { + var end = span.marker.find(1, true) + return lineIsHiddenInner( + doc, + end.line, + getMarkedSpanFor(end.line.markedSpans, span.marker) + ) + } + if (span.marker.inclusiveRight && span.to == line.text.length) { + return true + } + for (var sp = void 0, i = 0; i < line.markedSpans.length; ++i) { + sp = line.markedSpans[i] + if ( + sp.marker.collapsed && + !sp.marker.widgetNode && + sp.from == span.to && + (sp.to == null || sp.to != span.from) && + (sp.marker.inclusiveLeft || span.marker.inclusiveRight) && + lineIsHiddenInner(doc, line, sp) + ) { + return true + } + } + } + + // Find the height above the given line. + function heightAtLine(lineObj) { + lineObj = visualLine(lineObj) + + var h = 0, + chunk = lineObj.parent + for (var i = 0; i < chunk.lines.length; ++i) { + var line = chunk.lines[i] + if (line == lineObj) { + break + } else { + h += line.height + } + } + for (var p = chunk.parent; p; chunk = p, p = chunk.parent) { + for (var i$1 = 0; i$1 < p.children.length; ++i$1) { + var cur = p.children[i$1] + if (cur == chunk) { + break + } else { + h += cur.height + } + } + } + return h + } + + // Compute the character length of a line, taking into account + // collapsed ranges (see markText) that might hide parts, and join + // other lines onto it. + function lineLength(line) { + if (line.height == 0) { + return 0 + } + var len = line.text.length, + merged, + cur = line + while ((merged = collapsedSpanAtStart(cur))) { + var found = merged.find(0, true) + cur = found.from.line + len += found.from.ch - found.to.ch + } + cur = line + while ((merged = collapsedSpanAtEnd(cur))) { + var found$1 = merged.find(0, true) + len -= cur.text.length - found$1.from.ch + cur = found$1.to.line + len += cur.text.length - found$1.to.ch + } + return len + } + + // Find the longest line in the document. + function findMaxLine(cm) { + var d = cm.display, + doc = cm.doc + d.maxLine = getLine(doc, doc.first) + d.maxLineLength = lineLength(d.maxLine) + d.maxLineChanged = true + doc.iter(function(line) { + var len = lineLength(line) + if (len > d.maxLineLength) { + d.maxLineLength = len + d.maxLine = line + } + }) + } + + // LINE DATA STRUCTURE + + // Line objects. These hold state related to a line, including + // highlighting info (the styles array). + var Line = function(text, markedSpans, estimateHeight) { + this.text = text + attachMarkedSpans(this, markedSpans) + this.height = estimateHeight ? estimateHeight(this) : 1 + } + + Line.prototype.lineNo = function() { + return lineNo(this) + } + eventMixin(Line) + + // Change the content (text, markers) of a line. Automatically + // invalidates cached information and tries to re-estimate the + // line's height. + function updateLine(line, text, markedSpans, estimateHeight) { + line.text = text + if (line.stateAfter) { + line.stateAfter = null + } + if (line.styles) { + line.styles = null + } + if (line.order != null) { + line.order = null + } + detachMarkedSpans(line) + attachMarkedSpans(line, markedSpans) + var estHeight = estimateHeight ? estimateHeight(line) : 1 + if (estHeight != line.height) { + updateLineHeight(line, estHeight) + } + } + + // Detach a line from the document tree and its markers. + function cleanUpLine(line) { + line.parent = null + detachMarkedSpans(line) + } + + // Convert a style as returned by a mode (either null, or a string + // containing one or more styles) to a CSS style. This is cached, + // and also looks for line-wide styles. + var styleToClassCache = {}, + styleToClassCacheWithMode = {} + function interpretTokenStyle(style, options) { + if (!style || /^\s*$/.test(style)) { + return null + } + var cache = options.addModeClass ? styleToClassCacheWithMode : styleToClassCache + return cache[style] || (cache[style] = style.replace(/\S+/g, "cm-$&")) + } + + // Render the DOM representation of the text of a line. Also builds + // up a 'line map', which points at the DOM nodes that represent + // specific stretches of text, and is used by the measuring code. + // The returned object contains the DOM node, this map, and + // information about line-wide styles that were set by the mode. + function buildLineContent(cm, lineView) { + // The padding-right forces the element to have a 'border', which + // is needed on Webkit to be able to get line-level bounding + // rectangles for it (in measureChar). + var content = eltP("span", null, null, webkit ? "padding-right: .1px" : null) + var builder = { + pre: eltP("pre", [content], "CodeMirror-line"), + content: content, + col: 0, + pos: 0, + cm: cm, + trailingSpace: false, + splitSpaces: cm.getOption("lineWrapping") + } + lineView.measure = {} + + // Iterate over the logical lines that make up this visual line. + for (var i = 0; i <= (lineView.rest ? lineView.rest.length : 0); i++) { + var line = i ? lineView.rest[i - 1] : lineView.line, + order = void 0 + builder.pos = 0 + builder.addToken = buildToken + // Optionally wire in some hacks into the token-rendering + // algorithm, to deal with browser quirks. + if (hasBadBidiRects(cm.display.measure) && (order = getOrder(line, cm.doc.direction))) { + builder.addToken = buildTokenBadBidi(builder.addToken, order) + } + builder.map = [] + var allowFrontierUpdate = lineView != cm.display.externalMeasured && lineNo(line) + insertLineContent(line, builder, getLineStyles(cm, line, allowFrontierUpdate)) + if (line.styleClasses) { + if (line.styleClasses.bgClass) { + builder.bgClass = joinClasses(line.styleClasses.bgClass, builder.bgClass || "") + } + if (line.styleClasses.textClass) { + builder.textClass = joinClasses( + line.styleClasses.textClass, + builder.textClass || "" + ) + } + } + + // Ensure at least a single node is present, for measuring. + if (builder.map.length == 0) { + builder.map.push( + 0, + 0, + builder.content.appendChild(zeroWidthElement(cm.display.measure)) + ) + } + + // Store the map and a cache object for the current logical line + if (i == 0) { + lineView.measure.map = builder.map + lineView.measure.cache = {} + } else { + ;(lineView.measure.maps || (lineView.measure.maps = [])).push(builder.map) + ;(lineView.measure.caches || (lineView.measure.caches = [])).push({}) + } + } + + // See issue #2901 + if (webkit) { + var last = builder.content.lastChild + if ( + /\bcm-tab\b/.test(last.className) || + (last.querySelector && last.querySelector(".cm-tab")) + ) { + builder.content.className = "cm-tab-wrap-hack" + } + } + + signal(cm, "renderLine", cm, lineView.line, builder.pre) + if (builder.pre.className) { + builder.textClass = joinClasses(builder.pre.className, builder.textClass || "") + } + + return builder + } + + function defaultSpecialCharPlaceholder(ch) { + var token = elt("span", "\u2022", "cm-invalidchar") + token.title = "\\u" + ch.charCodeAt(0).toString(16) + token.setAttribute("aria-label", token.title) + return token + } + + // Build up the DOM representation for a single token, and add it to + // the line map. Takes care to render special characters separately. + function buildToken(builder, text, style, startStyle, endStyle, css, attributes) { + if (!text) { + return + } + var displayText = builder.splitSpaces ? splitSpaces(text, builder.trailingSpace) : text + var special = builder.cm.state.specialChars, + mustWrap = false + var content + if (!special.test(text)) { + builder.col += text.length + content = document.createTextNode(displayText) + builder.map.push(builder.pos, builder.pos + text.length, content) + if (ie && ie_version < 9) { + mustWrap = true + } + builder.pos += text.length + } else { + content = document.createDocumentFragment() + var pos = 0 + while (true) { + special.lastIndex = pos + var m = special.exec(text) + var skipped = m ? m.index - pos : text.length - pos + if (skipped) { + var txt = document.createTextNode(displayText.slice(pos, pos + skipped)) + if (ie && ie_version < 9) { + content.appendChild(elt("span", [txt])) + } else { + content.appendChild(txt) + } + builder.map.push(builder.pos, builder.pos + skipped, txt) + builder.col += skipped + builder.pos += skipped + } + if (!m) { + break + } + pos += skipped + 1 + var txt$1 = void 0 + if (m[0] == "\t") { + var tabSize = builder.cm.options.tabSize, + tabWidth = tabSize - (builder.col % tabSize) + txt$1 = content.appendChild(elt("span", spaceStr(tabWidth), "cm-tab")) + txt$1.setAttribute("role", "presentation") + txt$1.setAttribute("cm-text", "\t") + builder.col += tabWidth + } else if (m[0] == "\r" || m[0] == "\n") { + txt$1 = content.appendChild( + elt("span", m[0] == "\r" ? "\u240d" : "\u2424", "cm-invalidchar") + ) + txt$1.setAttribute("cm-text", m[0]) + builder.col += 1 + } else { + txt$1 = builder.cm.options.specialCharPlaceholder(m[0]) + txt$1.setAttribute("cm-text", m[0]) + if (ie && ie_version < 9) { + content.appendChild(elt("span", [txt$1])) + } else { + content.appendChild(txt$1) + } + builder.col += 1 + } + builder.map.push(builder.pos, builder.pos + 1, txt$1) + builder.pos++ + } + } + builder.trailingSpace = displayText.charCodeAt(text.length - 1) == 32 + if (style || startStyle || endStyle || mustWrap || css) { + var fullStyle = style || "" + if (startStyle) { + fullStyle += startStyle + } + if (endStyle) { + fullStyle += endStyle + } + var token = elt("span", [content], fullStyle, css) + if (attributes) { + for (var attr in attributes) { + if (attributes.hasOwnProperty(attr) && attr != "style" && attr != "class") { + token.setAttribute(attr, attributes[attr]) + } + } + } + return builder.content.appendChild(token) + } + builder.content.appendChild(content) + } + + // Change some spaces to NBSP to prevent the browser from collapsing + // trailing spaces at the end of a line when rendering text (issue #1362). + function splitSpaces(text, trailingBefore) { + if (text.length > 1 && !/ /.test(text)) { + return text + } + var spaceBefore = trailingBefore, + result = "" + for (var i = 0; i < text.length; i++) { + var ch = text.charAt(i) + if ( + ch == " " && + spaceBefore && + (i == text.length - 1 || text.charCodeAt(i + 1) == 32) + ) { + ch = "\u00a0" + } + result += ch + spaceBefore = ch == " " + } + return result + } + + // Work around nonsense dimensions being reported for stretches of + // right-to-left text. + function buildTokenBadBidi(inner, order) { + return function(builder, text, style, startStyle, endStyle, css, attributes) { + style = style ? style + " cm-force-border" : "cm-force-border" + var start = builder.pos, + end = start + text.length + for (;;) { + // Find the part that overlaps with the start of this text + var part = void 0 + for (var i = 0; i < order.length; i++) { + part = order[i] + if (part.to > start && part.from <= start) { + break + } + } + if (part.to >= end) { + return inner(builder, text, style, startStyle, endStyle, css, attributes) + } + inner( + builder, + text.slice(0, part.to - start), + style, + startStyle, + null, + css, + attributes + ) + startStyle = null + text = text.slice(part.to - start) + start = part.to + } + } + } + + function buildCollapsedSpan(builder, size, marker, ignoreWidget) { + var widget = !ignoreWidget && marker.widgetNode + if (widget) { + builder.map.push(builder.pos, builder.pos + size, widget) + } + if (!ignoreWidget && builder.cm.display.input.needsContentAttribute) { + if (!widget) { + widget = builder.content.appendChild(document.createElement("span")) + } + widget.setAttribute("cm-marker", marker.id) + } + if (widget) { + builder.cm.display.input.setUneditable(widget) + builder.content.appendChild(widget) + } + builder.pos += size + builder.trailingSpace = false + } + + // Outputs a number of spans to make up a line, taking highlighting + // and marked text into account. + function insertLineContent(line, builder, styles) { + var spans = line.markedSpans, + allText = line.text, + at = 0 + if (!spans) { + for (var i$1 = 1; i$1 < styles.length; i$1 += 2) { + builder.addToken( + builder, + allText.slice(at, (at = styles[i$1])), + interpretTokenStyle(styles[i$1 + 1], builder.cm.options) + ) + } + return + } + + var len = allText.length, + pos = 0, + i = 1, + text = "", + style, + css + var nextChange = 0, + spanStyle, + spanEndStyle, + spanStartStyle, + collapsed, + attributes + for (;;) { + if (nextChange == pos) { + // Update current marker set + spanStyle = spanEndStyle = spanStartStyle = css = "" + attributes = null + collapsed = null + nextChange = Infinity + var foundBookmarks = [], + endStyles = void 0 + for (var j = 0; j < spans.length; ++j) { + var sp = spans[j], + m = sp.marker + if (m.type == "bookmark" && sp.from == pos && m.widgetNode) { + foundBookmarks.push(m) + } else if ( + sp.from <= pos && + (sp.to == null || + sp.to > pos || + (m.collapsed && sp.to == pos && sp.from == pos)) + ) { + if (sp.to != null && sp.to != pos && nextChange > sp.to) { + nextChange = sp.to + spanEndStyle = "" + } + if (m.className) { + spanStyle += " " + m.className + } + if (m.css) { + css = (css ? css + ";" : "") + m.css + } + if (m.startStyle && sp.from == pos) { + spanStartStyle += " " + m.startStyle + } + if (m.endStyle && sp.to == nextChange) { + ;(endStyles || (endStyles = [])).push(m.endStyle, sp.to) + } + // support for the old title property + // https://github.com/codemirror/CodeMirror/pull/5673 + if (m.title) { + ;(attributes || (attributes = {})).title = m.title + } + if (m.attributes) { + for (var attr in m.attributes) { + ;(attributes || (attributes = {}))[attr] = m.attributes[attr] + } + } + if ( + m.collapsed && + (!collapsed || compareCollapsedMarkers(collapsed.marker, m) < 0) + ) { + collapsed = sp + } + } else if (sp.from > pos && nextChange > sp.from) { + nextChange = sp.from + } + } + if (endStyles) { + for (var j$1 = 0; j$1 < endStyles.length; j$1 += 2) { + if (endStyles[j$1 + 1] == nextChange) { + spanEndStyle += " " + endStyles[j$1] + } + } + } + + if (!collapsed || collapsed.from == pos) { + for (var j$2 = 0; j$2 < foundBookmarks.length; ++j$2) { + buildCollapsedSpan(builder, 0, foundBookmarks[j$2]) + } + } + if (collapsed && (collapsed.from || 0) == pos) { + buildCollapsedSpan( + builder, + (collapsed.to == null ? len + 1 : collapsed.to) - pos, + collapsed.marker, + collapsed.from == null + ) + if (collapsed.to == null) { + return + } + if (collapsed.to == pos) { + collapsed = false + } + } + } + if (pos >= len) { + break + } + + var upto = Math.min(len, nextChange) + while (true) { + if (text) { + var end = pos + text.length + if (!collapsed) { + var tokenText = end > upto ? text.slice(0, upto - pos) : text + builder.addToken( + builder, + tokenText, + style ? style + spanStyle : spanStyle, + spanStartStyle, + pos + tokenText.length == nextChange ? spanEndStyle : "", + css, + attributes + ) + } + if (end >= upto) { + text = text.slice(upto - pos) + pos = upto + break + } + pos = end + spanStartStyle = "" + } + text = allText.slice(at, (at = styles[i++])) + style = interpretTokenStyle(styles[i++], builder.cm.options) + } + } + } + + // These objects are used to represent the visible (currently drawn) + // part of the document. A LineView may correspond to multiple + // logical lines, if those are connected by collapsed ranges. + function LineView(doc, line, lineN) { + // The starting line + this.line = line + // Continuing lines, if any + this.rest = visualLineContinued(line) + // Number of logical lines in this visual line + this.size = this.rest ? lineNo(lst(this.rest)) - lineN + 1 : 1 + this.node = this.text = null + this.hidden = lineIsHidden(doc, line) + } + + // Create a range of LineView objects for the given lines. + function buildViewArray(cm, from, to) { + var array = [], + nextPos + for (var pos = from; pos < to; pos = nextPos) { + var view = new LineView(cm.doc, getLine(cm.doc, pos), pos) + nextPos = pos + view.size + array.push(view) + } + return array + } + + var operationGroup = null + + function pushOperation(op) { + if (operationGroup) { + operationGroup.ops.push(op) + } else { + op.ownsGroup = operationGroup = { + ops: [op], + delayedCallbacks: [] + } + } + } + + function fireCallbacksForOps(group) { + // Calls delayed callbacks and cursorActivity handlers until no + // new ones appear + var callbacks = group.delayedCallbacks, + i = 0 + do { + for (; i < callbacks.length; i++) { + callbacks[i].call(null) + } + for (var j = 0; j < group.ops.length; j++) { + var op = group.ops[j] + if (op.cursorActivityHandlers) { + while (op.cursorActivityCalled < op.cursorActivityHandlers.length) { + op.cursorActivityHandlers[op.cursorActivityCalled++].call(null, op.cm) + } + } + } + } while (i < callbacks.length) + } + + function finishOperation(op, endCb) { + var group = op.ownsGroup + if (!group) { + return + } + + try { + fireCallbacksForOps(group) + } finally { + operationGroup = null + endCb(group) + } + } + + var orphanDelayedCallbacks = null + + // Often, we want to signal events at a point where we are in the + // middle of some work, but don't want the handler to start calling + // other methods on the editor, which might be in an inconsistent + // state or simply not expect any other events to happen. + // signalLater looks whether there are any handlers, and schedules + // them to be executed when the last operation ends, or, if no + // operation is active, when a timeout fires. + function signalLater(emitter, type /*, values...*/) { + var arr = getHandlers(emitter, type) + if (!arr.length) { + return + } + var args = Array.prototype.slice.call(arguments, 2), + list + if (operationGroup) { + list = operationGroup.delayedCallbacks + } else if (orphanDelayedCallbacks) { + list = orphanDelayedCallbacks + } else { + list = orphanDelayedCallbacks = [] + setTimeout(fireOrphanDelayed, 0) + } + var loop = function(i) { + list.push(function() { + return arr[i].apply(null, args) + }) + } + + for (var i = 0; i < arr.length; ++i) loop(i) + } + + function fireOrphanDelayed() { + var delayed = orphanDelayedCallbacks + orphanDelayedCallbacks = null + for (var i = 0; i < delayed.length; ++i) { + delayed[i]() + } + } + + // When an aspect of a line changes, a string is added to + // lineView.changes. This updates the relevant part of the line's + // DOM structure. + function updateLineForChanges(cm, lineView, lineN, dims) { + for (var j = 0; j < lineView.changes.length; j++) { + var type = lineView.changes[j] + if (type == "text") { + updateLineText(cm, lineView) + } else if (type == "gutter") { + updateLineGutter(cm, lineView, lineN, dims) + } else if (type == "class") { + updateLineClasses(cm, lineView) + } else if (type == "widget") { + updateLineWidgets(cm, lineView, dims) + } + } + lineView.changes = null + } + + // Lines with gutter elements, widgets or a background class need to + // be wrapped, and have the extra elements added to the wrapper div + function ensureLineWrapped(lineView) { + if (lineView.node == lineView.text) { + lineView.node = elt("div", null, null, "position: relative") + if (lineView.text.parentNode) { + lineView.text.parentNode.replaceChild(lineView.node, lineView.text) + } + lineView.node.appendChild(lineView.text) + if (ie && ie_version < 8) { + lineView.node.style.zIndex = 2 + } + } + return lineView.node + } + + function updateLineBackground(cm, lineView) { + var cls = lineView.bgClass + ? lineView.bgClass + " " + (lineView.line.bgClass || "") + : lineView.line.bgClass + if (cls) { + cls += " CodeMirror-linebackground" + } + if (lineView.background) { + if (cls) { + lineView.background.className = cls + } else { + lineView.background.parentNode.removeChild(lineView.background) + lineView.background = null + } + } else if (cls) { + var wrap = ensureLineWrapped(lineView) + lineView.background = wrap.insertBefore(elt("div", null, cls), wrap.firstChild) + cm.display.input.setUneditable(lineView.background) + } + } + + // Wrapper around buildLineContent which will reuse the structure + // in display.externalMeasured when possible. + function getLineContent(cm, lineView) { + var ext = cm.display.externalMeasured + if (ext && ext.line == lineView.line) { + cm.display.externalMeasured = null + lineView.measure = ext.measure + return ext.built + } + return buildLineContent(cm, lineView) + } + + // Redraw the line's text. Interacts with the background and text + // classes because the mode may output tokens that influence these + // classes. + function updateLineText(cm, lineView) { + var cls = lineView.text.className + var built = getLineContent(cm, lineView) + if (lineView.text == lineView.node) { + lineView.node = built.pre + } + lineView.text.parentNode.replaceChild(built.pre, lineView.text) + lineView.text = built.pre + if (built.bgClass != lineView.bgClass || built.textClass != lineView.textClass) { + lineView.bgClass = built.bgClass + lineView.textClass = built.textClass + updateLineClasses(cm, lineView) + } else if (cls) { + lineView.text.className = cls + } + } + + function updateLineClasses(cm, lineView) { + updateLineBackground(cm, lineView) + if (lineView.line.wrapClass) { + ensureLineWrapped(lineView).className = lineView.line.wrapClass + } else if (lineView.node != lineView.text) { + lineView.node.className = "" + } + var textClass = lineView.textClass + ? lineView.textClass + " " + (lineView.line.textClass || "") + : lineView.line.textClass + lineView.text.className = textClass || "" + } + + function updateLineGutter(cm, lineView, lineN, dims) { + if (lineView.gutter) { + lineView.node.removeChild(lineView.gutter) + lineView.gutter = null + } + if (lineView.gutterBackground) { + lineView.node.removeChild(lineView.gutterBackground) + lineView.gutterBackground = null + } + if (lineView.line.gutterClass) { + var wrap = ensureLineWrapped(lineView) + lineView.gutterBackground = elt( + "div", + null, + "CodeMirror-gutter-background " + lineView.line.gutterClass, + "left: " + + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + + "px; width: " + + dims.gutterTotalWidth + + "px" + ) + cm.display.input.setUneditable(lineView.gutterBackground) + wrap.insertBefore(lineView.gutterBackground, lineView.text) + } + var markers = lineView.line.gutterMarkers + if (cm.options.lineNumbers || markers) { + var wrap$1 = ensureLineWrapped(lineView) + var gutterWrap = (lineView.gutter = elt( + "div", + null, + "CodeMirror-gutter-wrapper", + "left: " + (cm.options.fixedGutter ? dims.fixedPos : -dims.gutterTotalWidth) + "px" + )) + cm.display.input.setUneditable(gutterWrap) + wrap$1.insertBefore(gutterWrap, lineView.text) + if (lineView.line.gutterClass) { + gutterWrap.className += " " + lineView.line.gutterClass + } + if (cm.options.lineNumbers && (!markers || !markers["CodeMirror-linenumbers"])) { + lineView.lineNumber = gutterWrap.appendChild( + elt( + "div", + lineNumberFor(cm.options, lineN), + "CodeMirror-linenumber CodeMirror-gutter-elt", + "left: " + + dims.gutterLeft["CodeMirror-linenumbers"] + + "px; width: " + + cm.display.lineNumInnerWidth + + "px" + ) + ) + } + if (markers) { + for (var k = 0; k < cm.display.gutterSpecs.length; ++k) { + var id = cm.display.gutterSpecs[k].className, + found = markers.hasOwnProperty(id) && markers[id] + if (found) { + gutterWrap.appendChild( + elt( + "div", + [found], + "CodeMirror-gutter-elt", + "left: " + + dims.gutterLeft[id] + + "px; width: " + + dims.gutterWidth[id] + + "px" + ) + ) + } + } + } + } + } + + function updateLineWidgets(cm, lineView, dims) { + if (lineView.alignable) { + lineView.alignable = null + } + var isWidget = classTest("CodeMirror-linewidget") + for (var node = lineView.node.firstChild, next = void 0; node; node = next) { + next = node.nextSibling + if (isWidget.test(node.className)) { + lineView.node.removeChild(node) + } + } + insertLineWidgets(cm, lineView, dims) + } + + // Build a line's DOM representation from scratch + function buildLineElement(cm, lineView, lineN, dims) { + var built = getLineContent(cm, lineView) + lineView.text = lineView.node = built.pre + if (built.bgClass) { + lineView.bgClass = built.bgClass + } + if (built.textClass) { + lineView.textClass = built.textClass + } + + updateLineClasses(cm, lineView) + updateLineGutter(cm, lineView, lineN, dims) + insertLineWidgets(cm, lineView, dims) + return lineView.node + } + + // A lineView may contain multiple logical lines (when merged by + // collapsed spans). The widgets for all of them need to be drawn. + function insertLineWidgets(cm, lineView, dims) { + insertLineWidgetsFor(cm, lineView.line, lineView, dims, true) + if (lineView.rest) { + for (var i = 0; i < lineView.rest.length; i++) { + insertLineWidgetsFor(cm, lineView.rest[i], lineView, dims, false) + } + } + } + + function insertLineWidgetsFor(cm, line, lineView, dims, allowAbove) { + if (!line.widgets) { + return + } + var wrap = ensureLineWrapped(lineView) + for (var i = 0, ws = line.widgets; i < ws.length; ++i) { + var widget = ws[i], + node = elt( + "div", + [widget.node], + "CodeMirror-linewidget" + (widget.className ? " " + widget.className : "") + ) + if (!widget.handleMouseEvents) { + node.setAttribute("cm-ignore-events", "true") + } + positionLineWidget(widget, node, lineView, dims) + cm.display.input.setUneditable(node) + if (allowAbove && widget.above) { + wrap.insertBefore(node, lineView.gutter || lineView.text) + } else { + wrap.appendChild(node) + } + signalLater(widget, "redraw") + } + } + + function positionLineWidget(widget, node, lineView, dims) { + if (widget.noHScroll) { + ;(lineView.alignable || (lineView.alignable = [])).push(node) + var width = dims.wrapperWidth + node.style.left = dims.fixedPos + "px" + if (!widget.coverGutter) { + width -= dims.gutterTotalWidth + node.style.paddingLeft = dims.gutterTotalWidth + "px" + } + node.style.width = width + "px" + } + if (widget.coverGutter) { + node.style.zIndex = 5 + node.style.position = "relative" + if (!widget.noHScroll) { + node.style.marginLeft = -dims.gutterTotalWidth + "px" + } + } + } + + function widgetHeight(widget) { + if (widget.height != null) { + return widget.height + } + var cm = widget.doc.cm + if (!cm) { + return 0 + } + if (!contains(document.body, widget.node)) { + var parentStyle = "position: relative;" + if (widget.coverGutter) { + parentStyle += "margin-left: -" + cm.display.gutters.offsetWidth + "px;" + } + if (widget.noHScroll) { + parentStyle += "width: " + cm.display.wrapper.clientWidth + "px;" + } + removeChildrenAndAdd(cm.display.measure, elt("div", [widget.node], null, parentStyle)) + } + return (widget.height = widget.node.parentNode.offsetHeight) + } + + // Return true when the given mouse event happened in a widget + function eventInWidget(display, e) { + for (var n = e_target(e); n != display.wrapper; n = n.parentNode) { + if ( + !n || + (n.nodeType == 1 && n.getAttribute("cm-ignore-events") == "true") || + (n.parentNode == display.sizer && n != display.mover) + ) { + return true + } + } + } + + // POSITION MEASUREMENT + + function paddingTop(display) { + return display.lineSpace.offsetTop + } + function paddingVert(display) { + return display.mover.offsetHeight - display.lineSpace.offsetHeight + } + function paddingH(display) { + if (display.cachedPaddingH) { + return display.cachedPaddingH + } + var e = removeChildrenAndAdd(display.measure, elt("pre", "x", "CodeMirror-line-like")) + var style = window.getComputedStyle ? window.getComputedStyle(e) : e.currentStyle + var data = { left: parseInt(style.paddingLeft), right: parseInt(style.paddingRight) } + if (!isNaN(data.left) && !isNaN(data.right)) { + display.cachedPaddingH = data + } + return data + } + + function scrollGap(cm) { + return scrollerGap - cm.display.nativeBarWidth + } + function displayWidth(cm) { + return cm.display.scroller.clientWidth - scrollGap(cm) - cm.display.barWidth + } + function displayHeight(cm) { + return cm.display.scroller.clientHeight - scrollGap(cm) - cm.display.barHeight + } + + // Ensure the lineView.wrapping.heights array is populated. This is + // an array of bottom offsets for the lines that make up a drawn + // line. When lineWrapping is on, there might be more than one + // height. + function ensureLineHeights(cm, lineView, rect) { + var wrapping = cm.options.lineWrapping + var curWidth = wrapping && displayWidth(cm) + if (!lineView.measure.heights || (wrapping && lineView.measure.width != curWidth)) { + var heights = (lineView.measure.heights = []) + if (wrapping) { + lineView.measure.width = curWidth + var rects = lineView.text.firstChild.getClientRects() + for (var i = 0; i < rects.length - 1; i++) { + var cur = rects[i], + next = rects[i + 1] + if (Math.abs(cur.bottom - next.bottom) > 2) { + heights.push((cur.bottom + next.top) / 2 - rect.top) + } + } + } + heights.push(rect.bottom - rect.top) + } + } + + // Find a line map (mapping character offsets to text nodes) and a + // measurement cache for the given line number. (A line view might + // contain multiple lines when collapsed ranges are present.) + function mapFromLineView(lineView, line, lineN) { + if (lineView.line == line) { + return { map: lineView.measure.map, cache: lineView.measure.cache } + } + for (var i = 0; i < lineView.rest.length; i++) { + if (lineView.rest[i] == line) { + return { map: lineView.measure.maps[i], cache: lineView.measure.caches[i] } + } + } + for (var i$1 = 0; i$1 < lineView.rest.length; i$1++) { + if (lineNo(lineView.rest[i$1]) > lineN) { + return { + map: lineView.measure.maps[i$1], + cache: lineView.measure.caches[i$1], + before: true + } + } + } + } + + // Render a line into the hidden node display.externalMeasured. Used + // when measurement is needed for a line that's not in the viewport. + function updateExternalMeasurement(cm, line) { + line = visualLine(line) + var lineN = lineNo(line) + var view = (cm.display.externalMeasured = new LineView(cm.doc, line, lineN)) + view.lineN = lineN + var built = (view.built = buildLineContent(cm, view)) + view.text = built.pre + removeChildrenAndAdd(cm.display.lineMeasure, built.pre) + return view + } + + // Get a {top, bottom, left, right} box (in line-local coordinates) + // for a given character. + function measureChar(cm, line, ch, bias) { + return measureCharPrepared(cm, prepareMeasureForLine(cm, line), ch, bias) + } + + // Find a line view that corresponds to the given line number. + function findViewForLine(cm, lineN) { + if (lineN >= cm.display.viewFrom && lineN < cm.display.viewTo) { + return cm.display.view[findViewIndex(cm, lineN)] + } + var ext = cm.display.externalMeasured + if (ext && lineN >= ext.lineN && lineN < ext.lineN + ext.size) { + return ext + } + } + + // Measurement can be split in two steps, the set-up work that + // applies to the whole line, and the measurement of the actual + // character. Functions like coordsChar, that need to do a lot of + // measurements in a row, can thus ensure that the set-up work is + // only done once. + function prepareMeasureForLine(cm, line) { + var lineN = lineNo(line) + var view = findViewForLine(cm, lineN) + if (view && !view.text) { + view = null + } else if (view && view.changes) { + updateLineForChanges(cm, view, lineN, getDimensions(cm)) + cm.curOp.forceUpdate = true + } + if (!view) { + view = updateExternalMeasurement(cm, line) + } + + var info = mapFromLineView(view, line, lineN) + return { + line: line, + view: view, + rect: null, + map: info.map, + cache: info.cache, + before: info.before, + hasHeights: false + } + } + + // Given a prepared measurement object, measures the position of an + // actual character (or fetches it from the cache). + function measureCharPrepared(cm, prepared, ch, bias, varHeight) { + if (prepared.before) { + ch = -1 + } + var key = ch + (bias || ""), + found + if (prepared.cache.hasOwnProperty(key)) { + found = prepared.cache[key] + } else { + if (!prepared.rect) { + prepared.rect = prepared.view.text.getBoundingClientRect() + } + if (!prepared.hasHeights) { + ensureLineHeights(cm, prepared.view, prepared.rect) + prepared.hasHeights = true + } + found = measureCharInner(cm, prepared, ch, bias) + if (!found.bogus) { + prepared.cache[key] = found + } + } + return { + left: found.left, + right: found.right, + top: varHeight ? found.rtop : found.top, + bottom: varHeight ? found.rbottom : found.bottom + } + } + + var nullRect = { left: 0, right: 0, top: 0, bottom: 0 } + + function nodeAndOffsetInLineMap(map, ch, bias) { + var node, start, end, collapse, mStart, mEnd + // First, search the line map for the text node corresponding to, + // or closest to, the target character. + for (var i = 0; i < map.length; i += 3) { + mStart = map[i] + mEnd = map[i + 1] + if (ch < mStart) { + start = 0 + end = 1 + collapse = "left" + } else if (ch < mEnd) { + start = ch - mStart + end = start + 1 + } else if (i == map.length - 3 || (ch == mEnd && map[i + 3] > ch)) { + end = mEnd - mStart + start = end - 1 + if (ch >= mEnd) { + collapse = "right" + } + } + if (start != null) { + node = map[i + 2] + if (mStart == mEnd && bias == (node.insertLeft ? "left" : "right")) { + collapse = bias + } + if (bias == "left" && start == 0) { + while (i && map[i - 2] == map[i - 3] && map[i - 1].insertLeft) { + node = map[(i -= 3) + 2] + collapse = "left" + } + } + if (bias == "right" && start == mEnd - mStart) { + while ( + i < map.length - 3 && + map[i + 3] == map[i + 4] && + !map[i + 5].insertLeft + ) { + node = map[(i += 3) + 2] + collapse = "right" + } + } + break + } + } + return { + node: node, + start: start, + end: end, + collapse: collapse, + coverStart: mStart, + coverEnd: mEnd + } + } + + function getUsefulRect(rects, bias) { + var rect = nullRect + if (bias == "left") { + for (var i = 0; i < rects.length; i++) { + if ((rect = rects[i]).left != rect.right) { + break + } + } + } else { + for (var i$1 = rects.length - 1; i$1 >= 0; i$1--) { + if ((rect = rects[i$1]).left != rect.right) { + break + } + } + } + return rect + } + + function measureCharInner(cm, prepared, ch, bias) { + var place = nodeAndOffsetInLineMap(prepared.map, ch, bias) + var node = place.node, + start = place.start, + end = place.end, + collapse = place.collapse + + var rect + if (node.nodeType == 3) { + // If it is a text node, use a range to retrieve the coordinates. + for (var i$1 = 0; i$1 < 4; i$1++) { + // Retry a maximum of 4 times when nonsense rectangles are returned + while ( + start && + isExtendingChar(prepared.line.text.charAt(place.coverStart + start)) + ) { + --start + } + while ( + place.coverStart + end < place.coverEnd && + isExtendingChar(prepared.line.text.charAt(place.coverStart + end)) + ) { + ++end + } + if ( + ie && + ie_version < 9 && + start == 0 && + end == place.coverEnd - place.coverStart + ) { + rect = node.parentNode.getBoundingClientRect() + } else { + rect = getUsefulRect(range(node, start, end).getClientRects(), bias) + } + if (rect.left || rect.right || start == 0) { + break + } + end = start + start = start - 1 + collapse = "right" + } + if (ie && ie_version < 11) { + rect = maybeUpdateRectForZooming(cm.display.measure, rect) + } + } else { + // If it is a widget, simply get the box for the whole widget. + if (start > 0) { + collapse = bias = "right" + } + var rects + if (cm.options.lineWrapping && (rects = node.getClientRects()).length > 1) { + rect = rects[bias == "right" ? rects.length - 1 : 0] + } else { + rect = node.getBoundingClientRect() + } + } + if (ie && ie_version < 9 && !start && (!rect || (!rect.left && !rect.right))) { + var rSpan = node.parentNode.getClientRects()[0] + if (rSpan) { + rect = { + left: rSpan.left, + right: rSpan.left + charWidth(cm.display), + top: rSpan.top, + bottom: rSpan.bottom + } + } else { + rect = nullRect + } + } + + var rtop = rect.top - prepared.rect.top, + rbot = rect.bottom - prepared.rect.top + var mid = (rtop + rbot) / 2 + var heights = prepared.view.measure.heights + var i = 0 + for (; i < heights.length - 1; i++) { + if (mid < heights[i]) { + break + } + } + var top = i ? heights[i - 1] : 0, + bot = heights[i] + var result = { + left: (collapse == "right" ? rect.right : rect.left) - prepared.rect.left, + right: (collapse == "left" ? rect.left : rect.right) - prepared.rect.left, + top: top, + bottom: bot + } + if (!rect.left && !rect.right) { + result.bogus = true + } + if (!cm.options.singleCursorHeightPerLine) { + result.rtop = rtop + result.rbottom = rbot + } + + return result + } + + // Work around problem with bounding client rects on ranges being + // returned incorrectly when zoomed on IE10 and below. + function maybeUpdateRectForZooming(measure, rect) { + if ( + !window.screen || + screen.logicalXDPI == null || + screen.logicalXDPI == screen.deviceXDPI || + !hasBadZoomedRects(measure) + ) { + return rect + } + var scaleX = screen.logicalXDPI / screen.deviceXDPI + var scaleY = screen.logicalYDPI / screen.deviceYDPI + return { + left: rect.left * scaleX, + right: rect.right * scaleX, + top: rect.top * scaleY, + bottom: rect.bottom * scaleY + } + } + + function clearLineMeasurementCacheFor(lineView) { + if (lineView.measure) { + lineView.measure.cache = {} + lineView.measure.heights = null + if (lineView.rest) { + for (var i = 0; i < lineView.rest.length; i++) { + lineView.measure.caches[i] = {} + } + } + } + } + + function clearLineMeasurementCache(cm) { + cm.display.externalMeasure = null + removeChildren(cm.display.lineMeasure) + for (var i = 0; i < cm.display.view.length; i++) { + clearLineMeasurementCacheFor(cm.display.view[i]) + } + } + + function clearCaches(cm) { + clearLineMeasurementCache(cm) + cm.display.cachedCharWidth = cm.display.cachedTextHeight = cm.display.cachedPaddingH = null + if (!cm.options.lineWrapping) { + cm.display.maxLineChanged = true + } + cm.display.lineNumChars = null + } + + function pageScrollX() { + // Work around https://bugs.chromium.org/p/chromium/issues/detail?id=489206 + // which causes page_Offset and bounding client rects to use + // different reference viewports and invalidate our calculations. + if (chrome && android) { + return -( + document.body.getBoundingClientRect().left - + parseInt(getComputedStyle(document.body).marginLeft) + ) + } + return window.pageXOffset || (document.documentElement || document.body).scrollLeft + } + function pageScrollY() { + if (chrome && android) { + return -( + document.body.getBoundingClientRect().top - + parseInt(getComputedStyle(document.body).marginTop) + ) + } + return window.pageYOffset || (document.documentElement || document.body).scrollTop + } + + function widgetTopHeight(lineObj) { + var height = 0 + if (lineObj.widgets) { + for (var i = 0; i < lineObj.widgets.length; ++i) { + if (lineObj.widgets[i].above) { + height += widgetHeight(lineObj.widgets[i]) + } + } + } + return height + } + + // Converts a {top, bottom, left, right} box from line-local + // coordinates into another coordinate system. Context may be one of + // "line", "div" (display.lineDiv), "local"./null (editor), "window", + // or "page". + function intoCoordSystem(cm, lineObj, rect, context, includeWidgets) { + if (!includeWidgets) { + var height = widgetTopHeight(lineObj) + rect.top += height + rect.bottom += height + } + if (context == "line") { + return rect + } + if (!context) { + context = "local" + } + var yOff = heightAtLine(lineObj) + if (context == "local") { + yOff += paddingTop(cm.display) + } else { + yOff -= cm.display.viewOffset + } + if (context == "page" || context == "window") { + var lOff = cm.display.lineSpace.getBoundingClientRect() + yOff += lOff.top + (context == "window" ? 0 : pageScrollY()) + var xOff = lOff.left + (context == "window" ? 0 : pageScrollX()) + rect.left += xOff + rect.right += xOff + } + rect.top += yOff + rect.bottom += yOff + return rect + } + + // Coverts a box from "div" coords to another coordinate system. + // Context may be "window", "page", "div", or "local"./null. + function fromCoordSystem(cm, coords, context) { + if (context == "div") { + return coords + } + var left = coords.left, + top = coords.top + // First move into "page" coordinate system + if (context == "page") { + left -= pageScrollX() + top -= pageScrollY() + } else if (context == "local" || !context) { + var localBox = cm.display.sizer.getBoundingClientRect() + left += localBox.left + top += localBox.top + } + + var lineSpaceBox = cm.display.lineSpace.getBoundingClientRect() + return { left: left - lineSpaceBox.left, top: top - lineSpaceBox.top } + } + + function charCoords(cm, pos, context, lineObj, bias) { + if (!lineObj) { + lineObj = getLine(cm.doc, pos.line) + } + return intoCoordSystem(cm, lineObj, measureChar(cm, lineObj, pos.ch, bias), context) + } + + // Returns a box for a given cursor position, which may have an + // 'other' property containing the position of the secondary cursor + // on a bidi boundary. + // A cursor Pos(line, char, "before") is on the same visual line as `char - 1` + // and after `char - 1` in writing order of `char - 1` + // A cursor Pos(line, char, "after") is on the same visual line as `char` + // and before `char` in writing order of `char` + // Examples (upper-case letters are RTL, lower-case are LTR): + // Pos(0, 1, ...) + // before after + // ab a|b a|b + // aB a|B aB| + // Ab |Ab A|b + // AB B|A B|A + // Every position after the last character on a line is considered to stick + // to the last character on the line. + function cursorCoords(cm, pos, context, lineObj, preparedMeasure, varHeight) { + lineObj = lineObj || getLine(cm.doc, pos.line) + if (!preparedMeasure) { + preparedMeasure = prepareMeasureForLine(cm, lineObj) + } + function get(ch, right) { + var m = measureCharPrepared( + cm, + preparedMeasure, + ch, + right ? "right" : "left", + varHeight + ) + if (right) { + m.left = m.right + } else { + m.right = m.left + } + return intoCoordSystem(cm, lineObj, m, context) + } + var order = getOrder(lineObj, cm.doc.direction), + ch = pos.ch, + sticky = pos.sticky + if (ch >= lineObj.text.length) { + ch = lineObj.text.length + sticky = "before" + } else if (ch <= 0) { + ch = 0 + sticky = "after" + } + if (!order) { + return get(sticky == "before" ? ch - 1 : ch, sticky == "before") + } + + function getBidi(ch, partPos, invert) { + var part = order[partPos], + right = part.level == 1 + return get(invert ? ch - 1 : ch, right != invert) + } + var partPos = getBidiPartAt(order, ch, sticky) + var other = bidiOther + var val = getBidi(ch, partPos, sticky == "before") + if (other != null) { + val.other = getBidi(ch, other, sticky != "before") + } + return val + } + + // Used to cheaply estimate the coordinates for a position. Used for + // intermediate scroll updates. + function estimateCoords(cm, pos) { + var left = 0 + pos = clipPos(cm.doc, pos) + if (!cm.options.lineWrapping) { + left = charWidth(cm.display) * pos.ch + } + var lineObj = getLine(cm.doc, pos.line) + var top = heightAtLine(lineObj) + paddingTop(cm.display) + return { left: left, right: left, top: top, bottom: top + lineObj.height } + } + + // Positions returned by coordsChar contain some extra information. + // xRel is the relative x position of the input coordinates compared + // to the found position (so xRel > 0 means the coordinates are to + // the right of the character position, for example). When outside + // is true, that means the coordinates lie outside the line's + // vertical range. + function PosWithInfo(line, ch, sticky, outside, xRel) { + var pos = Pos(line, ch, sticky) + pos.xRel = xRel + if (outside) { + pos.outside = outside + } + return pos + } + + // Compute the character position closest to the given coordinates. + // Input must be lineSpace-local ("div" coordinate system). + function coordsChar(cm, x, y) { + var doc = cm.doc + y += cm.display.viewOffset + if (y < 0) { + return PosWithInfo(doc.first, 0, null, -1, -1) + } + var lineN = lineAtHeight(doc, y), + last = doc.first + doc.size - 1 + if (lineN > last) { + return PosWithInfo(doc.first + doc.size - 1, getLine(doc, last).text.length, null, 1, 1) + } + if (x < 0) { + x = 0 + } + + var lineObj = getLine(doc, lineN) + for (;;) { + var found = coordsCharInner(cm, lineObj, lineN, x, y) + var collapsed = collapsedSpanAround( + lineObj, + found.ch + (found.xRel > 0 || found.outside > 0 ? 1 : 0) + ) + if (!collapsed) { + return found + } + var rangeEnd = collapsed.find(1) + if (rangeEnd.line == lineN) { + return rangeEnd + } + lineObj = getLine(doc, (lineN = rangeEnd.line)) + } + } + + function wrappedLineExtent(cm, lineObj, preparedMeasure, y) { + y -= widgetTopHeight(lineObj) + var end = lineObj.text.length + var begin = findFirst( + function(ch) { + return measureCharPrepared(cm, preparedMeasure, ch - 1).bottom <= y + }, + end, + 0 + ) + end = findFirst( + function(ch) { + return measureCharPrepared(cm, preparedMeasure, ch).top > y + }, + begin, + end + ) + return { begin: begin, end: end } + } + + function wrappedLineExtentChar(cm, lineObj, preparedMeasure, target) { + if (!preparedMeasure) { + preparedMeasure = prepareMeasureForLine(cm, lineObj) + } + var targetTop = intoCoordSystem( + cm, + lineObj, + measureCharPrepared(cm, preparedMeasure, target), + "line" + ).top + return wrappedLineExtent(cm, lineObj, preparedMeasure, targetTop) + } + + // Returns true if the given side of a box is after the given + // coordinates, in top-to-bottom, left-to-right order. + function boxIsAfter(box, x, y, left) { + return box.bottom <= y ? false : box.top > y ? true : (left ? box.left : box.right) > x + } + + function coordsCharInner(cm, lineObj, lineNo, x, y) { + // Move y into line-local coordinate space + y -= heightAtLine(lineObj) + var preparedMeasure = prepareMeasureForLine(cm, lineObj) + // When directly calling `measureCharPrepared`, we have to adjust + // for the widgets at this line. + var widgetHeight = widgetTopHeight(lineObj) + var begin = 0, + end = lineObj.text.length, + ltr = true + + var order = getOrder(lineObj, cm.doc.direction) + // If the line isn't plain left-to-right text, first figure out + // which bidi section the coordinates fall into. + if (order) { + var part = (cm.options.lineWrapping ? coordsBidiPartWrapped : coordsBidiPart)( + cm, + lineObj, + lineNo, + preparedMeasure, + order, + x, + y + ) + ltr = part.level != 1 + // The awkward -1 offsets are needed because findFirst (called + // on these below) will treat its first bound as inclusive, + // second as exclusive, but we want to actually address the + // characters in the part's range + begin = ltr ? part.from : part.to - 1 + end = ltr ? part.to : part.from - 1 + } + + // A binary search to find the first character whose bounding box + // starts after the coordinates. If we run across any whose box wrap + // the coordinates, store that. + var chAround = null, + boxAround = null + var ch = findFirst( + function(ch) { + var box = measureCharPrepared(cm, preparedMeasure, ch) + box.top += widgetHeight + box.bottom += widgetHeight + if (!boxIsAfter(box, x, y, false)) { + return false + } + if (box.top <= y && box.left <= x) { + chAround = ch + boxAround = box + } + return true + }, + begin, + end + ) + + var baseX, + sticky, + outside = false + // If a box around the coordinates was found, use that + if (boxAround) { + // Distinguish coordinates nearer to the left or right side of the box + var atLeft = x - boxAround.left < boxAround.right - x, + atStart = atLeft == ltr + ch = chAround + (atStart ? 0 : 1) + sticky = atStart ? "after" : "before" + baseX = atLeft ? boxAround.left : boxAround.right + } else { + // (Adjust for extended bound, if necessary.) + if (!ltr && (ch == end || ch == begin)) { + ch++ + } + // To determine which side to associate with, get the box to the + // left of the character and compare it's vertical position to the + // coordinates + sticky = + ch == 0 + ? "after" + : ch == lineObj.text.length + ? "before" + : measureCharPrepared(cm, preparedMeasure, ch - (ltr ? 1 : 0)).bottom + + widgetHeight <= + y == + ltr + ? "after" + : "before" + // Now get accurate coordinates for this place, in order to get a + // base X position + var coords = cursorCoords(cm, Pos(lineNo, ch, sticky), "line", lineObj, preparedMeasure) + baseX = coords.left + outside = y < coords.top ? -1 : y >= coords.bottom ? 1 : 0 + } + + ch = skipExtendingChars(lineObj.text, ch, 1) + return PosWithInfo(lineNo, ch, sticky, outside, x - baseX) + } + + function coordsBidiPart(cm, lineObj, lineNo, preparedMeasure, order, x, y) { + // Bidi parts are sorted left-to-right, and in a non-line-wrapping + // situation, we can take this ordering to correspond to the visual + // ordering. This finds the first part whose end is after the given + // coordinates. + var index = findFirst( + function(i) { + var part = order[i], + ltr = part.level != 1 + return boxIsAfter( + cursorCoords( + cm, + Pos(lineNo, ltr ? part.to : part.from, ltr ? "before" : "after"), + "line", + lineObj, + preparedMeasure + ), + x, + y, + true + ) + }, + 0, + order.length - 1 + ) + var part = order[index] + // If this isn't the first part, the part's start is also after + // the coordinates, and the coordinates aren't on the same line as + // that start, move one part back. + if (index > 0) { + var ltr = part.level != 1 + var start = cursorCoords( + cm, + Pos(lineNo, ltr ? part.from : part.to, ltr ? "after" : "before"), + "line", + lineObj, + preparedMeasure + ) + if (boxIsAfter(start, x, y, true) && start.top > y) { + part = order[index - 1] + } + } + return part + } + + function coordsBidiPartWrapped(cm, lineObj, _lineNo, preparedMeasure, order, x, y) { + // In a wrapped line, rtl text on wrapping boundaries can do things + // that don't correspond to the ordering in our `order` array at + // all, so a binary search doesn't work, and we want to return a + // part that only spans one line so that the binary search in + // coordsCharInner is safe. As such, we first find the extent of the + // wrapped line, and then do a flat search in which we discard any + // spans that aren't on the line. + var ref = wrappedLineExtent(cm, lineObj, preparedMeasure, y) + var begin = ref.begin + var end = ref.end + if (/\s/.test(lineObj.text.charAt(end - 1))) { + end-- + } + var part = null, + closestDist = null + for (var i = 0; i < order.length; i++) { + var p = order[i] + if (p.from >= end || p.to <= begin) { + continue + } + var ltr = p.level != 1 + var endX = measureCharPrepared( + cm, + preparedMeasure, + ltr ? Math.min(end, p.to) - 1 : Math.max(begin, p.from) + ).right + // Weigh against spans ending before this, so that they are only + // picked if nothing ends after + var dist = endX < x ? x - endX + 1e9 : endX - x + if (!part || closestDist > dist) { + part = p + closestDist = dist + } + } + if (!part) { + part = order[order.length - 1] + } + // Clip the part to the wrapped line. + if (part.from < begin) { + part = { from: begin, to: part.to, level: part.level } + } + if (part.to > end) { + part = { from: part.from, to: end, level: part.level } + } + return part + } + + var measureText + // Compute the default text height. + function textHeight(display) { + if (display.cachedTextHeight != null) { + return display.cachedTextHeight + } + if (measureText == null) { + measureText = elt("pre", null, "CodeMirror-line-like") + // Measure a bunch of lines, for browsers that compute + // fractional heights. + for (var i = 0; i < 49; ++i) { + measureText.appendChild(document.createTextNode("x")) + measureText.appendChild(elt("br")) + } + measureText.appendChild(document.createTextNode("x")) + } + removeChildrenAndAdd(display.measure, measureText) + var height = measureText.offsetHeight / 50 + if (height > 3) { + display.cachedTextHeight = height + } + removeChildren(display.measure) + return height || 1 + } + + // Compute the default character width. + function charWidth(display) { + if (display.cachedCharWidth != null) { + return display.cachedCharWidth + } + var anchor = elt("span", "xxxxxxxxxx") + var pre = elt("pre", [anchor], "CodeMirror-line-like") + removeChildrenAndAdd(display.measure, pre) + var rect = anchor.getBoundingClientRect(), + width = (rect.right - rect.left) / 10 + if (width > 2) { + display.cachedCharWidth = width + } + return width || 10 + } + + // Do a bulk-read of the DOM positions and sizes needed to draw the + // view, so that we don't interleave reading and writing to the DOM. + function getDimensions(cm) { + var d = cm.display, + left = {}, + width = {} + var gutterLeft = d.gutters.clientLeft + for (var n = d.gutters.firstChild, i = 0; n; n = n.nextSibling, ++i) { + var id = cm.display.gutterSpecs[i].className + left[id] = n.offsetLeft + n.clientLeft + gutterLeft + width[id] = n.clientWidth + } + return { + fixedPos: compensateForHScroll(d), + gutterTotalWidth: d.gutters.offsetWidth, + gutterLeft: left, + gutterWidth: width, + wrapperWidth: d.wrapper.clientWidth + } + } + + // Computes display.scroller.scrollLeft + display.gutters.offsetWidth, + // but using getBoundingClientRect to get a sub-pixel-accurate + // result. + function compensateForHScroll(display) { + return ( + display.scroller.getBoundingClientRect().left - + display.sizer.getBoundingClientRect().left + ) + } + + // Returns a function that estimates the height of a line, to use as + // first approximation until the line becomes visible (and is thus + // properly measurable). + function estimateHeight(cm) { + var th = textHeight(cm.display), + wrapping = cm.options.lineWrapping + var perLine = + wrapping && Math.max(5, cm.display.scroller.clientWidth / charWidth(cm.display) - 3) + return function(line) { + if (lineIsHidden(cm.doc, line)) { + return 0 + } + + var widgetsHeight = 0 + if (line.widgets) { + for (var i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].height) { + widgetsHeight += line.widgets[i].height + } + } + } + + if (wrapping) { + return widgetsHeight + (Math.ceil(line.text.length / perLine) || 1) * th + } else { + return widgetsHeight + th + } + } + } + + function estimateLineHeights(cm) { + var doc = cm.doc, + est = estimateHeight(cm) + doc.iter(function(line) { + var estHeight = est(line) + if (estHeight != line.height) { + updateLineHeight(line, estHeight) + } + }) + } + + // Given a mouse event, find the corresponding position. If liberal + // is false, it checks whether a gutter or scrollbar was clicked, + // and returns null if it was. forRect is used by rectangular + // selections, and tries to estimate a character position even for + // coordinates beyond the right of the text. + function posFromMouse(cm, e, liberal, forRect) { + var display = cm.display + if (!liberal && e_target(e).getAttribute("cm-not-content") == "true") { + return null + } + + var x, + y, + space = display.lineSpace.getBoundingClientRect() + // Fails unpredictably on IE[67] when mouse is dragged around quickly. + try { + x = e.clientX - space.left + y = e.clientY - space.top + } catch (e) { + return null + } + var coords = coordsChar(cm, x, y), + line + if ( + forRect && + coords.xRel > 0 && + (line = getLine(cm.doc, coords.line).text).length == coords.ch + ) { + var colDiff = countColumn(line, line.length, cm.options.tabSize) - line.length + coords = Pos( + coords.line, + Math.max( + 0, + Math.round((x - paddingH(cm.display).left) / charWidth(cm.display)) - colDiff + ) + ) + } + return coords + } + + // Find the view element corresponding to a given line. Return null + // when the line isn't visible. + function findViewIndex(cm, n) { + if (n >= cm.display.viewTo) { + return null + } + n -= cm.display.viewFrom + if (n < 0) { + return null + } + var view = cm.display.view + for (var i = 0; i < view.length; i++) { + n -= view[i].size + if (n < 0) { + return i + } + } + } + + // Updates the display.view data structure for a given change to the + // document. From and to are in pre-change coordinates. Lendiff is + // the amount of lines added or subtracted by the change. This is + // used for changes that span multiple lines, or change the way + // lines are divided into visual lines. regLineChange (below) + // registers single-line changes. + function regChange(cm, from, to, lendiff) { + if (from == null) { + from = cm.doc.first + } + if (to == null) { + to = cm.doc.first + cm.doc.size + } + if (!lendiff) { + lendiff = 0 + } + + var display = cm.display + if ( + lendiff && + to < display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers > from) + ) { + display.updateLineNumbers = from + } + + cm.curOp.viewChanged = true + + if (from >= display.viewTo) { + // Change after + if (sawCollapsedSpans && visualLineNo(cm.doc, from) < display.viewTo) { + resetView(cm) + } + } else if (to <= display.viewFrom) { + // Change before + if (sawCollapsedSpans && visualLineEndNo(cm.doc, to + lendiff) > display.viewFrom) { + resetView(cm) + } else { + display.viewFrom += lendiff + display.viewTo += lendiff + } + } else if (from <= display.viewFrom && to >= display.viewTo) { + // Full overlap + resetView(cm) + } else if (from <= display.viewFrom) { + // Top overlap + var cut = viewCuttingPoint(cm, to, to + lendiff, 1) + if (cut) { + display.view = display.view.slice(cut.index) + display.viewFrom = cut.lineN + display.viewTo += lendiff + } else { + resetView(cm) + } + } else if (to >= display.viewTo) { + // Bottom overlap + var cut$1 = viewCuttingPoint(cm, from, from, -1) + if (cut$1) { + display.view = display.view.slice(0, cut$1.index) + display.viewTo = cut$1.lineN + } else { + resetView(cm) + } + } else { + // Gap in the middle + var cutTop = viewCuttingPoint(cm, from, from, -1) + var cutBot = viewCuttingPoint(cm, to, to + lendiff, 1) + if (cutTop && cutBot) { + display.view = display.view + .slice(0, cutTop.index) + .concat(buildViewArray(cm, cutTop.lineN, cutBot.lineN)) + .concat(display.view.slice(cutBot.index)) + display.viewTo += lendiff + } else { + resetView(cm) + } + } + + var ext = display.externalMeasured + if (ext) { + if (to < ext.lineN) { + ext.lineN += lendiff + } else if (from < ext.lineN + ext.size) { + display.externalMeasured = null + } + } + } + + // Register a change to a single line. Type must be one of "text", + // "gutter", "class", "widget" + function regLineChange(cm, line, type) { + cm.curOp.viewChanged = true + var display = cm.display, + ext = cm.display.externalMeasured + if (ext && line >= ext.lineN && line < ext.lineN + ext.size) { + display.externalMeasured = null + } + + if (line < display.viewFrom || line >= display.viewTo) { + return + } + var lineView = display.view[findViewIndex(cm, line)] + if (lineView.node == null) { + return + } + var arr = lineView.changes || (lineView.changes = []) + if (indexOf(arr, type) == -1) { + arr.push(type) + } + } + + // Clear the view. + function resetView(cm) { + cm.display.viewFrom = cm.display.viewTo = cm.doc.first + cm.display.view = [] + cm.display.viewOffset = 0 + } + + function viewCuttingPoint(cm, oldN, newN, dir) { + var index = findViewIndex(cm, oldN), + diff, + view = cm.display.view + if (!sawCollapsedSpans || newN == cm.doc.first + cm.doc.size) { + return { index: index, lineN: newN } + } + var n = cm.display.viewFrom + for (var i = 0; i < index; i++) { + n += view[i].size + } + if (n != oldN) { + if (dir > 0) { + if (index == view.length - 1) { + return null + } + diff = n + view[index].size - oldN + index++ + } else { + diff = n - oldN + } + oldN += diff + newN += diff + } + while (visualLineNo(cm.doc, newN) != newN) { + if (index == (dir < 0 ? 0 : view.length - 1)) { + return null + } + newN += dir * view[index - (dir < 0 ? 1 : 0)].size + index += dir + } + return { index: index, lineN: newN } + } + + // Force the view to cover a given range, adding empty view element + // or clipping off existing ones as needed. + function adjustView(cm, from, to) { + var display = cm.display, + view = display.view + if (view.length == 0 || from >= display.viewTo || to <= display.viewFrom) { + display.view = buildViewArray(cm, from, to) + display.viewFrom = from + } else { + if (display.viewFrom > from) { + display.view = buildViewArray(cm, from, display.viewFrom).concat(display.view) + } else if (display.viewFrom < from) { + display.view = display.view.slice(findViewIndex(cm, from)) + } + display.viewFrom = from + if (display.viewTo < to) { + display.view = display.view.concat(buildViewArray(cm, display.viewTo, to)) + } else if (display.viewTo > to) { + display.view = display.view.slice(0, findViewIndex(cm, to)) + } + } + display.viewTo = to + } + + // Count the number of lines in the view whose DOM representation is + // out of date (or nonexistent). + function countDirtyView(cm) { + var view = cm.display.view, + dirty = 0 + for (var i = 0; i < view.length; i++) { + var lineView = view[i] + if (!lineView.hidden && (!lineView.node || lineView.changes)) { + ++dirty + } + } + return dirty + } + + function updateSelection(cm) { + cm.display.input.showSelection(cm.display.input.prepareSelection()) + } + + function prepareSelection(cm, primary) { + if (primary === void 0) primary = true + + var doc = cm.doc, + result = {} + var curFragment = (result.cursors = document.createDocumentFragment()) + var selFragment = (result.selection = document.createDocumentFragment()) + + for (var i = 0; i < doc.sel.ranges.length; i++) { + if (!primary && i == doc.sel.primIndex) { + continue + } + var range = doc.sel.ranges[i] + if (range.from().line >= cm.display.viewTo || range.to().line < cm.display.viewFrom) { + continue + } + var collapsed = range.empty() + if (collapsed || cm.options.showCursorWhenSelecting) { + drawSelectionCursor(cm, range.head, curFragment) + } + if (!collapsed) { + drawSelectionRange(cm, range, selFragment) + } + } + return result + } + + // Draws a cursor for the given range + function drawSelectionCursor(cm, head, output) { + var pos = cursorCoords(cm, head, "div", null, null, !cm.options.singleCursorHeightPerLine) + + var cursor = output.appendChild(elt("div", "\u00a0", "CodeMirror-cursor")) + cursor.style.left = pos.left + "px" + cursor.style.top = pos.top + "px" + cursor.style.height = Math.max(0, pos.bottom - pos.top) * cm.options.cursorHeight + "px" + + if (pos.other) { + // Secondary cursor, shown when on a 'jump' in bi-directional text + var otherCursor = output.appendChild( + elt("div", "\u00a0", "CodeMirror-cursor CodeMirror-secondarycursor") + ) + otherCursor.style.display = "" + otherCursor.style.left = pos.other.left + "px" + otherCursor.style.top = pos.other.top + "px" + otherCursor.style.height = (pos.other.bottom - pos.other.top) * 0.85 + "px" + } + } + + function cmpCoords(a, b) { + return a.top - b.top || a.left - b.left + } + + // Draws the given range as a highlighted selection + function drawSelectionRange(cm, range, output) { + var display = cm.display, + doc = cm.doc + var fragment = document.createDocumentFragment() + var padding = paddingH(cm.display), + leftSide = padding.left + var rightSide = + Math.max(display.sizerWidth, displayWidth(cm) - display.sizer.offsetLeft) - + padding.right + var docLTR = doc.direction == "ltr" + + function add(left, top, width, bottom) { + if (top < 0) { + top = 0 + } + top = Math.round(top) + bottom = Math.round(bottom) + fragment.appendChild( + elt( + "div", + null, + "CodeMirror-selected", + "position: absolute; left: " + + left + + "px;\n top: " + + top + + "px; width: " + + (width == null ? rightSide - left : width) + + "px;\n height: " + + (bottom - top) + + "px" + ) + ) + } + + function drawForLine(line, fromArg, toArg) { + var lineObj = getLine(doc, line) + var lineLen = lineObj.text.length + var start, end + function coords(ch, bias) { + return charCoords(cm, Pos(line, ch), "div", lineObj, bias) + } + + function wrapX(pos, dir, side) { + var extent = wrappedLineExtentChar(cm, lineObj, null, pos) + var prop = (dir == "ltr") == (side == "after") ? "left" : "right" + var ch = + side == "after" + ? extent.begin + : extent.end - (/\s/.test(lineObj.text.charAt(extent.end - 1)) ? 2 : 1) + return coords(ch, prop)[prop] + } + + var order = getOrder(lineObj, doc.direction) + iterateBidiSections(order, fromArg || 0, toArg == null ? lineLen : toArg, function( + from, + to, + dir, + i + ) { + var ltr = dir == "ltr" + var fromPos = coords(from, ltr ? "left" : "right") + var toPos = coords(to - 1, ltr ? "right" : "left") + + var openStart = fromArg == null && from == 0, + openEnd = toArg == null && to == lineLen + var first = i == 0, + last = !order || i == order.length - 1 + if (toPos.top - fromPos.top <= 3) { + // Single line + var openLeft = (docLTR ? openStart : openEnd) && first + var openRight = (docLTR ? openEnd : openStart) && last + var left = openLeft ? leftSide : (ltr ? fromPos : toPos).left + var right = openRight ? rightSide : (ltr ? toPos : fromPos).right + add(left, fromPos.top, right - left, fromPos.bottom) + } else { + // Multiple lines + var topLeft, topRight, botLeft, botRight + if (ltr) { + topLeft = docLTR && openStart && first ? leftSide : fromPos.left + topRight = docLTR ? rightSide : wrapX(from, dir, "before") + botLeft = docLTR ? leftSide : wrapX(to, dir, "after") + botRight = docLTR && openEnd && last ? rightSide : toPos.right + } else { + topLeft = !docLTR ? leftSide : wrapX(from, dir, "before") + topRight = !docLTR && openStart && first ? rightSide : fromPos.right + botLeft = !docLTR && openEnd && last ? leftSide : toPos.left + botRight = !docLTR ? rightSide : wrapX(to, dir, "after") + } + add(topLeft, fromPos.top, topRight - topLeft, fromPos.bottom) + if (fromPos.bottom < toPos.top) { + add(leftSide, fromPos.bottom, null, toPos.top) + } + add(botLeft, toPos.top, botRight - botLeft, toPos.bottom) + } + + if (!start || cmpCoords(fromPos, start) < 0) { + start = fromPos + } + if (cmpCoords(toPos, start) < 0) { + start = toPos + } + if (!end || cmpCoords(fromPos, end) < 0) { + end = fromPos + } + if (cmpCoords(toPos, end) < 0) { + end = toPos + } + }) + return { start: start, end: end } + } + + var sFrom = range.from(), + sTo = range.to() + if (sFrom.line == sTo.line) { + drawForLine(sFrom.line, sFrom.ch, sTo.ch) + } else { + var fromLine = getLine(doc, sFrom.line), + toLine = getLine(doc, sTo.line) + var singleVLine = visualLine(fromLine) == visualLine(toLine) + var leftEnd = drawForLine( + sFrom.line, + sFrom.ch, + singleVLine ? fromLine.text.length + 1 : null + ).end + var rightStart = drawForLine(sTo.line, singleVLine ? 0 : null, sTo.ch).start + if (singleVLine) { + if (leftEnd.top < rightStart.top - 2) { + add(leftEnd.right, leftEnd.top, null, leftEnd.bottom) + add(leftSide, rightStart.top, rightStart.left, rightStart.bottom) + } else { + add(leftEnd.right, leftEnd.top, rightStart.left - leftEnd.right, leftEnd.bottom) + } + } + if (leftEnd.bottom < rightStart.top) { + add(leftSide, leftEnd.bottom, null, rightStart.top) + } + } + + output.appendChild(fragment) + } + + // Cursor-blinking + function restartBlink(cm) { + if (!cm.state.focused) { + return + } + var display = cm.display + clearInterval(display.blinker) + var on = true + display.cursorDiv.style.visibility = "" + if (cm.options.cursorBlinkRate > 0) { + display.blinker = setInterval(function() { + return (display.cursorDiv.style.visibility = (on = !on) ? "" : "hidden") + }, cm.options.cursorBlinkRate) + } else if (cm.options.cursorBlinkRate < 0) { + display.cursorDiv.style.visibility = "hidden" + } + } + + function ensureFocus(cm) { + if (!cm.state.focused) { + cm.display.input.focus() + onFocus(cm) + } + } + + function delayBlurEvent(cm) { + cm.state.delayingBlurEvent = true + setTimeout(function() { + if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false + onBlur(cm) + } + }, 100) + } + + function onFocus(cm, e) { + if (cm.state.delayingBlurEvent) { + cm.state.delayingBlurEvent = false + } + + if (cm.options.readOnly == "nocursor") { + return + } + if (!cm.state.focused) { + signal(cm, "focus", cm, e) + cm.state.focused = true + addClass(cm.display.wrapper, "CodeMirror-focused") + // This test prevents this from firing when a context + // menu is closed (since the input reset would kill the + // select-all detection hack) + if (!cm.curOp && cm.display.selForContextMenu != cm.doc.sel) { + cm.display.input.reset() + if (webkit) { + setTimeout(function() { + return cm.display.input.reset(true) + }, 20) + } // Issue #1730 + } + cm.display.input.receivedFocus() + } + restartBlink(cm) + } + function onBlur(cm, e) { + if (cm.state.delayingBlurEvent) { + return + } + + if (cm.state.focused) { + signal(cm, "blur", cm, e) + cm.state.focused = false + rmClass(cm.display.wrapper, "CodeMirror-focused") + } + clearInterval(cm.display.blinker) + setTimeout(function() { + if (!cm.state.focused) { + cm.display.shift = false + } + }, 150) + } + + // Read the actual heights of the rendered lines, and update their + // stored heights to match. + function updateHeightsInViewport(cm) { + var display = cm.display + var prevBottom = display.lineDiv.offsetTop + for (var i = 0; i < display.view.length; i++) { + var cur = display.view[i], + wrapping = cm.options.lineWrapping + var height = void 0, + width = 0 + if (cur.hidden) { + continue + } + if (ie && ie_version < 8) { + var bot = cur.node.offsetTop + cur.node.offsetHeight + height = bot - prevBottom + prevBottom = bot + } else { + var box = cur.node.getBoundingClientRect() + height = box.bottom - box.top + // Check that lines don't extend past the right of the current + // editor width + if (!wrapping && cur.text.firstChild) { + width = cur.text.firstChild.getBoundingClientRect().right - box.left - 1 + } + } + var diff = cur.line.height - height + if (diff > 0.005 || diff < -0.005) { + updateLineHeight(cur.line, height) + updateWidgetHeight(cur.line) + if (cur.rest) { + for (var j = 0; j < cur.rest.length; j++) { + updateWidgetHeight(cur.rest[j]) + } + } + } + if (width > cm.display.sizerWidth) { + var chWidth = Math.ceil(width / charWidth(cm.display)) + if (chWidth > cm.display.maxLineLength) { + cm.display.maxLineLength = chWidth + cm.display.maxLine = cur.line + cm.display.maxLineChanged = true + } + } + } + } + + // Read and store the height of line widgets associated with the + // given line. + function updateWidgetHeight(line) { + if (line.widgets) { + for (var i = 0; i < line.widgets.length; ++i) { + var w = line.widgets[i], + parent = w.node.parentNode + if (parent) { + w.height = parent.offsetHeight + } + } + } + } + + // Compute the lines that are visible in a given viewport (defaults + // the the current scroll position). viewport may contain top, + // height, and ensure (see op.scrollToPos) properties. + function visibleLines(display, doc, viewport) { + var top = + viewport && viewport.top != null + ? Math.max(0, viewport.top) + : display.scroller.scrollTop + top = Math.floor(top - paddingTop(display)) + var bottom = + viewport && viewport.bottom != null + ? viewport.bottom + : top + display.wrapper.clientHeight + + var from = lineAtHeight(doc, top), + to = lineAtHeight(doc, bottom) + // Ensure is a {from: {line, ch}, to: {line, ch}} object, and + // forces those lines into the viewport (if possible). + if (viewport && viewport.ensure) { + var ensureFrom = viewport.ensure.from.line, + ensureTo = viewport.ensure.to.line + if (ensureFrom < from) { + from = ensureFrom + to = lineAtHeight( + doc, + heightAtLine(getLine(doc, ensureFrom)) + display.wrapper.clientHeight + ) + } else if (Math.min(ensureTo, doc.lastLine()) >= to) { + from = lineAtHeight( + doc, + heightAtLine(getLine(doc, ensureTo)) - display.wrapper.clientHeight + ) + to = ensureTo + } + } + return { from: from, to: Math.max(to, from + 1) } + } + + // SCROLLING THINGS INTO VIEW + + // If an editor sits on the top or bottom of the window, partially + // scrolled out of view, this ensures that the cursor is visible. + function maybeScrollWindow(cm, rect) { + if (signalDOMEvent(cm, "scrollCursorIntoView")) { + return + } + + var display = cm.display, + box = display.sizer.getBoundingClientRect(), + doScroll = null + if (rect.top + box.top < 0) { + doScroll = true + } else if ( + rect.bottom + box.top > + (window.innerHeight || document.documentElement.clientHeight) + ) { + doScroll = false + } + if (doScroll != null && !phantom) { + var scrollNode = elt( + "div", + "\u200b", + null, + "position: absolute;\n top: " + + (rect.top - display.viewOffset - paddingTop(cm.display)) + + "px;\n height: " + + (rect.bottom - rect.top + scrollGap(cm) + display.barHeight) + + "px;\n left: " + + rect.left + + "px; width: " + + Math.max(2, rect.right - rect.left) + + "px;" + ) + cm.display.lineSpace.appendChild(scrollNode) + scrollNode.scrollIntoView(doScroll) + cm.display.lineSpace.removeChild(scrollNode) + } + } + + // Scroll a given position into view (immediately), verifying that + // it actually became visible (as line heights are accurately + // measured, the position of something may 'drift' during drawing). + function scrollPosIntoView(cm, pos, end, margin) { + if (margin == null) { + margin = 0 + } + var rect + if (!cm.options.lineWrapping && pos == end) { + // Set pos and end to the cursor positions around the character pos sticks to + // If pos.sticky == "before", that is around pos.ch - 1, otherwise around pos.ch + // If pos == Pos(_, 0, "before"), pos and end are unchanged + pos = pos.ch + ? Pos(pos.line, pos.sticky == "before" ? pos.ch - 1 : pos.ch, "after") + : pos + end = pos.sticky == "before" ? Pos(pos.line, pos.ch + 1, "before") : pos + } + for (var limit = 0; limit < 5; limit++) { + var changed = false + var coords = cursorCoords(cm, pos) + var endCoords = !end || end == pos ? coords : cursorCoords(cm, end) + rect = { + left: Math.min(coords.left, endCoords.left), + top: Math.min(coords.top, endCoords.top) - margin, + right: Math.max(coords.left, endCoords.left), + bottom: Math.max(coords.bottom, endCoords.bottom) + margin + } + var scrollPos = calculateScrollPos(cm, rect) + var startTop = cm.doc.scrollTop, + startLeft = cm.doc.scrollLeft + if (scrollPos.scrollTop != null) { + updateScrollTop(cm, scrollPos.scrollTop) + if (Math.abs(cm.doc.scrollTop - startTop) > 1) { + changed = true + } + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft) + if (Math.abs(cm.doc.scrollLeft - startLeft) > 1) { + changed = true + } + } + if (!changed) { + break + } + } + return rect + } + + // Scroll a given set of coordinates into view (immediately). + function scrollIntoView(cm, rect) { + var scrollPos = calculateScrollPos(cm, rect) + if (scrollPos.scrollTop != null) { + updateScrollTop(cm, scrollPos.scrollTop) + } + if (scrollPos.scrollLeft != null) { + setScrollLeft(cm, scrollPos.scrollLeft) + } + } + + // Calculate a new scroll position needed to scroll the given + // rectangle into view. Returns an object with scrollTop and + // scrollLeft properties. When these are undefined, the + // vertical/horizontal position does not need to be adjusted. + function calculateScrollPos(cm, rect) { + var display = cm.display, + snapMargin = textHeight(cm.display) + if (rect.top < 0) { + rect.top = 0 + } + var screentop = + cm.curOp && cm.curOp.scrollTop != null ? cm.curOp.scrollTop : display.scroller.scrollTop + var screen = displayHeight(cm), + result = {} + if (rect.bottom - rect.top > screen) { + rect.bottom = rect.top + screen + } + var docBottom = cm.doc.height + paddingVert(display) + var atTop = rect.top < snapMargin, + atBottom = rect.bottom > docBottom - snapMargin + if (rect.top < screentop) { + result.scrollTop = atTop ? 0 : rect.top + } else if (rect.bottom > screentop + screen) { + var newTop = Math.min(rect.top, (atBottom ? docBottom : rect.bottom) - screen) + if (newTop != screentop) { + result.scrollTop = newTop + } + } + + var screenleft = + cm.curOp && cm.curOp.scrollLeft != null + ? cm.curOp.scrollLeft + : display.scroller.scrollLeft + var screenw = displayWidth(cm) - (cm.options.fixedGutter ? display.gutters.offsetWidth : 0) + var tooWide = rect.right - rect.left > screenw + if (tooWide) { + rect.right = rect.left + screenw + } + if (rect.left < 10) { + result.scrollLeft = 0 + } else if (rect.left < screenleft) { + result.scrollLeft = Math.max(0, rect.left - (tooWide ? 0 : 10)) + } else if (rect.right > screenw + screenleft - 3) { + result.scrollLeft = rect.right + (tooWide ? 0 : 10) - screenw + } + return result + } + + // Store a relative adjustment to the scroll position in the current + // operation (to be applied when the operation finishes). + function addToScrollTop(cm, top) { + if (top == null) { + return + } + resolveScrollToPos(cm) + cm.curOp.scrollTop = + (cm.curOp.scrollTop == null ? cm.doc.scrollTop : cm.curOp.scrollTop) + top + } + + // Make sure that at the end of the operation the current cursor is + // shown. + function ensureCursorVisible(cm) { + resolveScrollToPos(cm) + var cur = cm.getCursor() + cm.curOp.scrollToPos = { from: cur, to: cur, margin: cm.options.cursorScrollMargin } + } + + function scrollToCoords(cm, x, y) { + if (x != null || y != null) { + resolveScrollToPos(cm) + } + if (x != null) { + cm.curOp.scrollLeft = x + } + if (y != null) { + cm.curOp.scrollTop = y + } + } + + function scrollToRange(cm, range) { + resolveScrollToPos(cm) + cm.curOp.scrollToPos = range + } + + // When an operation has its scrollToPos property set, and another + // scroll action is applied before the end of the operation, this + // 'simulates' scrolling that position into view in a cheap way, so + // that the effect of intermediate scroll commands is not ignored. + function resolveScrollToPos(cm) { + var range = cm.curOp.scrollToPos + if (range) { + cm.curOp.scrollToPos = null + var from = estimateCoords(cm, range.from), + to = estimateCoords(cm, range.to) + scrollToCoordsRange(cm, from, to, range.margin) + } + } + + function scrollToCoordsRange(cm, from, to, margin) { + var sPos = calculateScrollPos(cm, { + left: Math.min(from.left, to.left), + top: Math.min(from.top, to.top) - margin, + right: Math.max(from.right, to.right), + bottom: Math.max(from.bottom, to.bottom) + margin + }) + scrollToCoords(cm, sPos.scrollLeft, sPos.scrollTop) + } + + // Sync the scrollable area and scrollbars, ensure the viewport + // covers the visible area. + function updateScrollTop(cm, val) { + if (Math.abs(cm.doc.scrollTop - val) < 2) { + return + } + if (!gecko) { + updateDisplaySimple(cm, { top: val }) + } + setScrollTop(cm, val, true) + if (gecko) { + updateDisplaySimple(cm) + } + startWorker(cm, 100) + } + + function setScrollTop(cm, val, forceScroll) { + val = Math.max( + 0, + Math.min(cm.display.scroller.scrollHeight - cm.display.scroller.clientHeight, val) + ) + if (cm.display.scroller.scrollTop == val && !forceScroll) { + return + } + cm.doc.scrollTop = val + cm.display.scrollbars.setScrollTop(val) + if (cm.display.scroller.scrollTop != val) { + cm.display.scroller.scrollTop = val + } + } + + // Sync scroller and scrollbar, ensure the gutter elements are + // aligned. + function setScrollLeft(cm, val, isScroller, forceScroll) { + val = Math.max( + 0, + Math.min(val, cm.display.scroller.scrollWidth - cm.display.scroller.clientWidth) + ) + if ( + (isScroller ? val == cm.doc.scrollLeft : Math.abs(cm.doc.scrollLeft - val) < 2) && + !forceScroll + ) { + return + } + cm.doc.scrollLeft = val + alignHorizontally(cm) + if (cm.display.scroller.scrollLeft != val) { + cm.display.scroller.scrollLeft = val + } + cm.display.scrollbars.setScrollLeft(val) + } + + // SCROLLBARS + + // Prepare DOM reads needed to update the scrollbars. Done in one + // shot to minimize update/measure roundtrips. + function measureForScrollbars(cm) { + var d = cm.display, + gutterW = d.gutters.offsetWidth + var docH = Math.round(cm.doc.height + paddingVert(cm.display)) + return { + clientHeight: d.scroller.clientHeight, + viewHeight: d.wrapper.clientHeight, + scrollWidth: d.scroller.scrollWidth, + clientWidth: d.scroller.clientWidth, + viewWidth: d.wrapper.clientWidth, + barLeft: cm.options.fixedGutter ? gutterW : 0, + docHeight: docH, + scrollHeight: docH + scrollGap(cm) + d.barHeight, + nativeBarWidth: d.nativeBarWidth, + gutterWidth: gutterW + } + } + + var NativeScrollbars = function(place, scroll, cm) { + this.cm = cm + var vert = (this.vert = elt( + "div", + [elt("div", null, null, "min-width: 1px")], + "CodeMirror-vscrollbar" + )) + var horiz = (this.horiz = elt( + "div", + [elt("div", null, null, "height: 100%; min-height: 1px")], + "CodeMirror-hscrollbar" + )) + vert.tabIndex = horiz.tabIndex = -1 + place(vert) + place(horiz) + + on(vert, "scroll", function() { + if (vert.clientHeight) { + scroll(vert.scrollTop, "vertical") + } + }) + on(horiz, "scroll", function() { + if (horiz.clientWidth) { + scroll(horiz.scrollLeft, "horizontal") + } + }) + + this.checkedZeroWidth = false + // Need to set a minimum width to see the scrollbar on IE7 (but must not set it on IE8). + if (ie && ie_version < 8) { + this.horiz.style.minHeight = this.vert.style.minWidth = "18px" + } + } + + NativeScrollbars.prototype.update = function(measure) { + var needsH = measure.scrollWidth > measure.clientWidth + 1 + var needsV = measure.scrollHeight > measure.clientHeight + 1 + var sWidth = measure.nativeBarWidth + + if (needsV) { + this.vert.style.display = "block" + this.vert.style.bottom = needsH ? sWidth + "px" : "0" + var totalHeight = measure.viewHeight - (needsH ? sWidth : 0) + // A bug in IE8 can cause this value to be negative, so guard it. + this.vert.firstChild.style.height = + Math.max(0, measure.scrollHeight - measure.clientHeight + totalHeight) + "px" + } else { + this.vert.style.display = "" + this.vert.firstChild.style.height = "0" + } + + if (needsH) { + this.horiz.style.display = "block" + this.horiz.style.right = needsV ? sWidth + "px" : "0" + this.horiz.style.left = measure.barLeft + "px" + var totalWidth = measure.viewWidth - measure.barLeft - (needsV ? sWidth : 0) + this.horiz.firstChild.style.width = + Math.max(0, measure.scrollWidth - measure.clientWidth + totalWidth) + "px" + } else { + this.horiz.style.display = "" + this.horiz.firstChild.style.width = "0" + } + + if (!this.checkedZeroWidth && measure.clientHeight > 0) { + if (sWidth == 0) { + this.zeroWidthHack() + } + this.checkedZeroWidth = true + } + + return { right: needsV ? sWidth : 0, bottom: needsH ? sWidth : 0 } + } + + NativeScrollbars.prototype.setScrollLeft = function(pos) { + if (this.horiz.scrollLeft != pos) { + this.horiz.scrollLeft = pos + } + if (this.disableHoriz) { + this.enableZeroWidthBar(this.horiz, this.disableHoriz, "horiz") + } + } + + NativeScrollbars.prototype.setScrollTop = function(pos) { + if (this.vert.scrollTop != pos) { + this.vert.scrollTop = pos + } + if (this.disableVert) { + this.enableZeroWidthBar(this.vert, this.disableVert, "vert") + } + } + + NativeScrollbars.prototype.zeroWidthHack = function() { + var w = mac && !mac_geMountainLion ? "12px" : "18px" + this.horiz.style.height = this.vert.style.width = w + this.horiz.style.pointerEvents = this.vert.style.pointerEvents = "none" + this.disableHoriz = new Delayed() + this.disableVert = new Delayed() + } + + NativeScrollbars.prototype.enableZeroWidthBar = function(bar, delay, type) { + bar.style.pointerEvents = "auto" + function maybeDisable() { + // To find out whether the scrollbar is still visible, we + // check whether the element under the pixel in the bottom + // right corner of the scrollbar box is the scrollbar box + // itself (when the bar is still visible) or its filler child + // (when the bar is hidden). If it is still visible, we keep + // it enabled, if it's hidden, we disable pointer events. + var box = bar.getBoundingClientRect() + var elt = + type == "vert" + ? document.elementFromPoint(box.right - 1, (box.top + box.bottom) / 2) + : document.elementFromPoint((box.right + box.left) / 2, box.bottom - 1) + if (elt != bar) { + bar.style.pointerEvents = "none" + } else { + delay.set(1000, maybeDisable) + } + } + delay.set(1000, maybeDisable) + } + + NativeScrollbars.prototype.clear = function() { + var parent = this.horiz.parentNode + parent.removeChild(this.horiz) + parent.removeChild(this.vert) + } + + var NullScrollbars = function() {} + + NullScrollbars.prototype.update = function() { + return { bottom: 0, right: 0 } + } + NullScrollbars.prototype.setScrollLeft = function() {} + NullScrollbars.prototype.setScrollTop = function() {} + NullScrollbars.prototype.clear = function() {} + + function updateScrollbars(cm, measure) { + if (!measure) { + measure = measureForScrollbars(cm) + } + var startWidth = cm.display.barWidth, + startHeight = cm.display.barHeight + updateScrollbarsInner(cm, measure) + for ( + var i = 0; + (i < 4 && startWidth != cm.display.barWidth) || startHeight != cm.display.barHeight; + i++ + ) { + if (startWidth != cm.display.barWidth && cm.options.lineWrapping) { + updateHeightsInViewport(cm) + } + updateScrollbarsInner(cm, measureForScrollbars(cm)) + startWidth = cm.display.barWidth + startHeight = cm.display.barHeight + } + } + + // Re-synchronize the fake scrollbars with the actual size of the + // content. + function updateScrollbarsInner(cm, measure) { + var d = cm.display + var sizes = d.scrollbars.update(measure) + + d.sizer.style.paddingRight = (d.barWidth = sizes.right) + "px" + d.sizer.style.paddingBottom = (d.barHeight = sizes.bottom) + "px" + d.heightForcer.style.borderBottom = sizes.bottom + "px solid transparent" + + if (sizes.right && sizes.bottom) { + d.scrollbarFiller.style.display = "block" + d.scrollbarFiller.style.height = sizes.bottom + "px" + d.scrollbarFiller.style.width = sizes.right + "px" + } else { + d.scrollbarFiller.style.display = "" + } + if (sizes.bottom && cm.options.coverGutterNextToScrollbar && cm.options.fixedGutter) { + d.gutterFiller.style.display = "block" + d.gutterFiller.style.height = sizes.bottom + "px" + d.gutterFiller.style.width = measure.gutterWidth + "px" + } else { + d.gutterFiller.style.display = "" + } + } + + var scrollbarModel = { native: NativeScrollbars, null: NullScrollbars } + + function initScrollbars(cm) { + if (cm.display.scrollbars) { + cm.display.scrollbars.clear() + if (cm.display.scrollbars.addClass) { + rmClass(cm.display.wrapper, cm.display.scrollbars.addClass) + } + } + + cm.display.scrollbars = new scrollbarModel[cm.options.scrollbarStyle]( + function(node) { + cm.display.wrapper.insertBefore(node, cm.display.scrollbarFiller) + // Prevent clicks in the scrollbars from killing focus + on(node, "mousedown", function() { + if (cm.state.focused) { + setTimeout(function() { + return cm.display.input.focus() + }, 0) + } + }) + node.setAttribute("cm-not-content", "true") + }, + function(pos, axis) { + if (axis == "horizontal") { + setScrollLeft(cm, pos) + } else { + updateScrollTop(cm, pos) + } + }, + cm + ) + if (cm.display.scrollbars.addClass) { + addClass(cm.display.wrapper, cm.display.scrollbars.addClass) + } + } + + // Operations are used to wrap a series of changes to the editor + // state in such a way that each change won't have to update the + // cursor and display (which would be awkward, slow, and + // error-prone). Instead, display updates are batched and then all + // combined and executed at once. + + var nextOpId = 0 + // Start a new operation. + function startOperation(cm) { + cm.curOp = { + cm: cm, + viewChanged: false, // Flag that indicates that lines might need to be redrawn + startHeight: cm.doc.height, // Used to detect need to update scrollbar + forceUpdate: false, // Used to force a redraw + updateInput: 0, // Whether to reset the input textarea + typing: false, // Whether this reset should be careful to leave existing text (for compositing) + changeObjs: null, // Accumulated changes, for firing change events + cursorActivityHandlers: null, // Set of handlers to fire cursorActivity on + cursorActivityCalled: 0, // Tracks which cursorActivity handlers have been called already + selectionChanged: false, // Whether the selection needs to be redrawn + updateMaxLine: false, // Set when the widest line needs to be determined anew + scrollLeft: null, + scrollTop: null, // Intermediate scroll position, not pushed to DOM yet + scrollToPos: null, // Used to scroll to a specific position + focus: false, + id: ++nextOpId // Unique ID + } + pushOperation(cm.curOp) + } + + // Finish an operation, updating the display and signalling delayed events + function endOperation(cm) { + var op = cm.curOp + if (op) { + finishOperation(op, function(group) { + for (var i = 0; i < group.ops.length; i++) { + group.ops[i].cm.curOp = null + } + endOperations(group) + }) + } + } + + // The DOM updates done when an operation finishes are batched so + // that the minimum number of relayouts are required. + function endOperations(group) { + var ops = group.ops + for ( + var i = 0; + i < ops.length; + i++ // Read DOM + ) { + endOperation_R1(ops[i]) + } + for ( + var i$1 = 0; + i$1 < ops.length; + i$1++ // Write DOM (maybe) + ) { + endOperation_W1(ops[i$1]) + } + for ( + var i$2 = 0; + i$2 < ops.length; + i$2++ // Read DOM + ) { + endOperation_R2(ops[i$2]) + } + for ( + var i$3 = 0; + i$3 < ops.length; + i$3++ // Write DOM (maybe) + ) { + endOperation_W2(ops[i$3]) + } + for ( + var i$4 = 0; + i$4 < ops.length; + i$4++ // Read DOM + ) { + endOperation_finish(ops[i$4]) + } + } + + function endOperation_R1(op) { + var cm = op.cm, + display = cm.display + maybeClipScrollbars(cm) + if (op.updateMaxLine) { + findMaxLine(cm) + } + + op.mustUpdate = + op.viewChanged || + op.forceUpdate || + op.scrollTop != null || + (op.scrollToPos && + (op.scrollToPos.from.line < display.viewFrom || + op.scrollToPos.to.line >= display.viewTo)) || + (display.maxLineChanged && cm.options.lineWrapping) + op.update = + op.mustUpdate && + new DisplayUpdate( + cm, + op.mustUpdate && { top: op.scrollTop, ensure: op.scrollToPos }, + op.forceUpdate + ) + } + + function endOperation_W1(op) { + op.updatedDisplay = op.mustUpdate && updateDisplayIfNeeded(op.cm, op.update) + } + + function endOperation_R2(op) { + var cm = op.cm, + display = cm.display + if (op.updatedDisplay) { + updateHeightsInViewport(cm) + } + + op.barMeasure = measureForScrollbars(cm) + + // If the max line changed since it was last measured, measure it, + // and ensure the document's width matches it. + // updateDisplay_W2 will use these properties to do the actual resizing + if (display.maxLineChanged && !cm.options.lineWrapping) { + op.adjustWidthTo = + measureChar(cm, display.maxLine, display.maxLine.text.length).left + 3 + cm.display.sizerWidth = op.adjustWidthTo + op.barMeasure.scrollWidth = Math.max( + display.scroller.clientWidth, + display.sizer.offsetLeft + op.adjustWidthTo + scrollGap(cm) + cm.display.barWidth + ) + op.maxScrollLeft = Math.max( + 0, + display.sizer.offsetLeft + op.adjustWidthTo - displayWidth(cm) + ) + } + + if (op.updatedDisplay || op.selectionChanged) { + op.preparedSelection = display.input.prepareSelection() + } + } + + function endOperation_W2(op) { + var cm = op.cm + + if (op.adjustWidthTo != null) { + cm.display.sizer.style.minWidth = op.adjustWidthTo + "px" + if (op.maxScrollLeft < cm.doc.scrollLeft) { + setScrollLeft(cm, Math.min(cm.display.scroller.scrollLeft, op.maxScrollLeft), true) + } + cm.display.maxLineChanged = false + } + + var takeFocus = op.focus && op.focus == activeElt() + if (op.preparedSelection) { + cm.display.input.showSelection(op.preparedSelection, takeFocus) + } + if (op.updatedDisplay || op.startHeight != cm.doc.height) { + updateScrollbars(cm, op.barMeasure) + } + if (op.updatedDisplay) { + setDocumentHeight(cm, op.barMeasure) + } + + if (op.selectionChanged) { + restartBlink(cm) + } + + if (cm.state.focused && op.updateInput) { + cm.display.input.reset(op.typing) + } + if (takeFocus) { + ensureFocus(op.cm) + } + } + + function endOperation_finish(op) { + var cm = op.cm, + display = cm.display, + doc = cm.doc + + if (op.updatedDisplay) { + postUpdateDisplay(cm, op.update) + } + + // Abort mouse wheel delta measurement, when scrolling explicitly + if ( + display.wheelStartX != null && + (op.scrollTop != null || op.scrollLeft != null || op.scrollToPos) + ) { + display.wheelStartX = display.wheelStartY = null + } + + // Propagate the scroll position to the actual DOM scroller + if (op.scrollTop != null) { + setScrollTop(cm, op.scrollTop, op.forceScroll) + } + + if (op.scrollLeft != null) { + setScrollLeft(cm, op.scrollLeft, true, true) + } + // If we need to scroll a specific position into view, do so. + if (op.scrollToPos) { + var rect = scrollPosIntoView( + cm, + clipPos(doc, op.scrollToPos.from), + clipPos(doc, op.scrollToPos.to), + op.scrollToPos.margin + ) + maybeScrollWindow(cm, rect) + } + + // Fire events for markers that are hidden/unidden by editing or + // undoing + var hidden = op.maybeHiddenMarkers, + unhidden = op.maybeUnhiddenMarkers + if (hidden) { + for (var i = 0; i < hidden.length; ++i) { + if (!hidden[i].lines.length) { + signal(hidden[i], "hide") + } + } + } + if (unhidden) { + for (var i$1 = 0; i$1 < unhidden.length; ++i$1) { + if (unhidden[i$1].lines.length) { + signal(unhidden[i$1], "unhide") + } + } + } + + if (display.wrapper.offsetHeight) { + doc.scrollTop = cm.display.scroller.scrollTop + } + + // Fire change events, and delayed event handlers + if (op.changeObjs) { + signal(cm, "changes", cm, op.changeObjs) + } + if (op.update) { + op.update.finish() + } + } + + // Run the given function in an operation + function runInOp(cm, f) { + if (cm.curOp) { + return f() + } + startOperation(cm) + try { + return f() + } finally { + endOperation(cm) + } + } + // Wraps a function in an operation. Returns the wrapped function. + function operation(cm, f) { + return function() { + if (cm.curOp) { + return f.apply(cm, arguments) + } + startOperation(cm) + try { + return f.apply(cm, arguments) + } finally { + endOperation(cm) + } + } + } + // Used to add methods to editor and doc instances, wrapping them in + // operations. + function methodOp(f) { + return function() { + if (this.curOp) { + return f.apply(this, arguments) + } + startOperation(this) + try { + return f.apply(this, arguments) + } finally { + endOperation(this) + } + } + } + function docMethodOp(f) { + return function() { + var cm = this.cm + if (!cm || cm.curOp) { + return f.apply(this, arguments) + } + startOperation(cm) + try { + return f.apply(this, arguments) + } finally { + endOperation(cm) + } + } + } + + // HIGHLIGHT WORKER + + function startWorker(cm, time) { + if (cm.doc.highlightFrontier < cm.display.viewTo) { + cm.state.highlight.set(time, bind(highlightWorker, cm)) + } + } + + function highlightWorker(cm) { + var doc = cm.doc + if (doc.highlightFrontier >= cm.display.viewTo) { + return + } + var end = +new Date() + cm.options.workTime + var context = getContextBefore(cm, doc.highlightFrontier) + var changedLines = [] + + doc.iter(context.line, Math.min(doc.first + doc.size, cm.display.viewTo + 500), function( + line + ) { + if (context.line >= cm.display.viewFrom) { + // Visible + var oldStyles = line.styles + var resetState = + line.text.length > cm.options.maxHighlightLength + ? copyState(doc.mode, context.state) + : null + var highlighted = highlightLine(cm, line, context, true) + if (resetState) { + context.state = resetState + } + line.styles = highlighted.styles + var oldCls = line.styleClasses, + newCls = highlighted.classes + if (newCls) { + line.styleClasses = newCls + } else if (oldCls) { + line.styleClasses = null + } + var ischange = + !oldStyles || + oldStyles.length != line.styles.length || + (oldCls != newCls && + (!oldCls || + !newCls || + oldCls.bgClass != newCls.bgClass || + oldCls.textClass != newCls.textClass)) + for (var i = 0; !ischange && i < oldStyles.length; ++i) { + ischange = oldStyles[i] != line.styles[i] + } + if (ischange) { + changedLines.push(context.line) + } + line.stateAfter = context.save() + context.nextLine() + } else { + if (line.text.length <= cm.options.maxHighlightLength) { + processLine(cm, line.text, context) + } + line.stateAfter = context.line % 5 == 0 ? context.save() : null + context.nextLine() + } + if (+new Date() > end) { + startWorker(cm, cm.options.workDelay) + return true + } + }) + doc.highlightFrontier = context.line + doc.modeFrontier = Math.max(doc.modeFrontier, context.line) + if (changedLines.length) { + runInOp(cm, function() { + for (var i = 0; i < changedLines.length; i++) { + regLineChange(cm, changedLines[i], "text") + } + }) + } + } + + // DISPLAY DRAWING + + var DisplayUpdate = function(cm, viewport, force) { + var display = cm.display + + this.viewport = viewport + // Store some values that we'll need later (but don't want to force a relayout for) + this.visible = visibleLines(display, cm.doc, viewport) + this.editorIsHidden = !display.wrapper.offsetWidth + this.wrapperHeight = display.wrapper.clientHeight + this.wrapperWidth = display.wrapper.clientWidth + this.oldDisplayWidth = displayWidth(cm) + this.force = force + this.dims = getDimensions(cm) + this.events = [] + } + + DisplayUpdate.prototype.signal = function(emitter, type) { + if (hasHandler(emitter, type)) { + this.events.push(arguments) + } + } + DisplayUpdate.prototype.finish = function() { + for (var i = 0; i < this.events.length; i++) { + signal.apply(null, this.events[i]) + } + } + + function maybeClipScrollbars(cm) { + var display = cm.display + if (!display.scrollbarsClipped && display.scroller.offsetWidth) { + display.nativeBarWidth = display.scroller.offsetWidth - display.scroller.clientWidth + display.heightForcer.style.height = scrollGap(cm) + "px" + display.sizer.style.marginBottom = -display.nativeBarWidth + "px" + display.sizer.style.borderRightWidth = scrollGap(cm) + "px" + display.scrollbarsClipped = true + } + } + + function selectionSnapshot(cm) { + if (cm.hasFocus()) { + return null + } + var active = activeElt() + if (!active || !contains(cm.display.lineDiv, active)) { + return null + } + var result = { activeElt: active } + if (window.getSelection) { + var sel = window.getSelection() + if (sel.anchorNode && sel.extend && contains(cm.display.lineDiv, sel.anchorNode)) { + result.anchorNode = sel.anchorNode + result.anchorOffset = sel.anchorOffset + result.focusNode = sel.focusNode + result.focusOffset = sel.focusOffset + } + } + return result + } + + function restoreSelection(snapshot) { + if (!snapshot || !snapshot.activeElt || snapshot.activeElt == activeElt()) { + return + } + snapshot.activeElt.focus() + if ( + snapshot.anchorNode && + contains(document.body, snapshot.anchorNode) && + contains(document.body, snapshot.focusNode) + ) { + var sel = window.getSelection(), + range = document.createRange() + range.setEnd(snapshot.anchorNode, snapshot.anchorOffset) + range.collapse(false) + sel.removeAllRanges() + sel.addRange(range) + sel.extend(snapshot.focusNode, snapshot.focusOffset) + } + } + + // Does the actual updating of the line display. Bails out + // (returning false) when there is nothing to be done and forced is + // false. + function updateDisplayIfNeeded(cm, update) { + var display = cm.display, + doc = cm.doc + + if (update.editorIsHidden) { + resetView(cm) + return false + } + + // Bail out if the visible area is already rendered and nothing changed. + if ( + !update.force && + update.visible.from >= display.viewFrom && + update.visible.to <= display.viewTo && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) && + display.renderedView == display.view && + countDirtyView(cm) == 0 + ) { + return false + } + + if (maybeUpdateLineNumberWidth(cm)) { + resetView(cm) + update.dims = getDimensions(cm) + } + + // Compute a suitable new viewport (from & to) + var end = doc.first + doc.size + var from = Math.max(update.visible.from - cm.options.viewportMargin, doc.first) + var to = Math.min(end, update.visible.to + cm.options.viewportMargin) + if (display.viewFrom < from && from - display.viewFrom < 20) { + from = Math.max(doc.first, display.viewFrom) + } + if (display.viewTo > to && display.viewTo - to < 20) { + to = Math.min(end, display.viewTo) + } + if (sawCollapsedSpans) { + from = visualLineNo(cm.doc, from) + to = visualLineEndNo(cm.doc, to) + } + + var different = + from != display.viewFrom || + to != display.viewTo || + display.lastWrapHeight != update.wrapperHeight || + display.lastWrapWidth != update.wrapperWidth + adjustView(cm, from, to) + + display.viewOffset = heightAtLine(getLine(cm.doc, display.viewFrom)) + // Position the mover div to align with the current scroll position + cm.display.mover.style.top = display.viewOffset + "px" + + var toUpdate = countDirtyView(cm) + if ( + !different && + toUpdate == 0 && + !update.force && + display.renderedView == display.view && + (display.updateLineNumbers == null || display.updateLineNumbers >= display.viewTo) + ) { + return false + } + + // For big changes, we hide the enclosing element during the + // update, since that speeds up the operations on most browsers. + var selSnapshot = selectionSnapshot(cm) + if (toUpdate > 4) { + display.lineDiv.style.display = "none" + } + patchDisplay(cm, display.updateLineNumbers, update.dims) + if (toUpdate > 4) { + display.lineDiv.style.display = "" + } + display.renderedView = display.view + // There might have been a widget with a focused element that got + // hidden or updated, if so re-focus it. + restoreSelection(selSnapshot) + + // Prevent selection and cursors from interfering with the scroll + // width and height. + removeChildren(display.cursorDiv) + removeChildren(display.selectionDiv) + display.gutters.style.height = display.sizer.style.minHeight = 0 + + if (different) { + display.lastWrapHeight = update.wrapperHeight + display.lastWrapWidth = update.wrapperWidth + startWorker(cm, 400) + } + + display.updateLineNumbers = null + + return true + } + + function postUpdateDisplay(cm, update) { + var viewport = update.viewport + + for (var first = true; ; first = false) { + if (!first || !cm.options.lineWrapping || update.oldDisplayWidth == displayWidth(cm)) { + // Clip forced viewport to actual scrollable area. + if (viewport && viewport.top != null) { + viewport = { + top: Math.min( + cm.doc.height + paddingVert(cm.display) - displayHeight(cm), + viewport.top + ) + } + } + // Updated line heights might result in the drawn area not + // actually covering the viewport. Keep looping until it does. + update.visible = visibleLines(cm.display, cm.doc, viewport) + if ( + update.visible.from >= cm.display.viewFrom && + update.visible.to <= cm.display.viewTo + ) { + break + } + } + if (!updateDisplayIfNeeded(cm, update)) { + break + } + updateHeightsInViewport(cm) + var barMeasure = measureForScrollbars(cm) + updateSelection(cm) + updateScrollbars(cm, barMeasure) + setDocumentHeight(cm, barMeasure) + update.force = false + } + + update.signal(cm, "update", cm) + if ( + cm.display.viewFrom != cm.display.reportedViewFrom || + cm.display.viewTo != cm.display.reportedViewTo + ) { + update.signal(cm, "viewportChange", cm, cm.display.viewFrom, cm.display.viewTo) + cm.display.reportedViewFrom = cm.display.viewFrom + cm.display.reportedViewTo = cm.display.viewTo + } + } + + function updateDisplaySimple(cm, viewport) { + var update = new DisplayUpdate(cm, viewport) + if (updateDisplayIfNeeded(cm, update)) { + updateHeightsInViewport(cm) + postUpdateDisplay(cm, update) + var barMeasure = measureForScrollbars(cm) + updateSelection(cm) + updateScrollbars(cm, barMeasure) + setDocumentHeight(cm, barMeasure) + update.finish() + } + } + + // Sync the actual display DOM structure with display.view, removing + // nodes for lines that are no longer in view, and creating the ones + // that are not there yet, and updating the ones that are out of + // date. + function patchDisplay(cm, updateNumbersFrom, dims) { + var display = cm.display, + lineNumbers = cm.options.lineNumbers + var container = display.lineDiv, + cur = container.firstChild + + function rm(node) { + var next = node.nextSibling + // Works around a throw-scroll bug in OS X Webkit + if (webkit && mac && cm.display.currentWheelTarget == node) { + node.style.display = "none" + } else { + node.parentNode.removeChild(node) + } + return next + } + + var view = display.view, + lineN = display.viewFrom + // Loop over the elements in the view, syncing cur (the DOM nodes + // in display.lineDiv) with the view as we go. + for (var i = 0; i < view.length; i++) { + var lineView = view[i] + if (lineView.hidden); + else if (!lineView.node || lineView.node.parentNode != container) { + // Not drawn yet + var node = buildLineElement(cm, lineView, lineN, dims) + container.insertBefore(node, cur) + } else { + // Already drawn + while (cur != lineView.node) { + cur = rm(cur) + } + var updateNumber = + lineNumbers && + updateNumbersFrom != null && + updateNumbersFrom <= lineN && + lineView.lineNumber + if (lineView.changes) { + if (indexOf(lineView.changes, "gutter") > -1) { + updateNumber = false + } + updateLineForChanges(cm, lineView, lineN, dims) + } + if (updateNumber) { + removeChildren(lineView.lineNumber) + lineView.lineNumber.appendChild( + document.createTextNode(lineNumberFor(cm.options, lineN)) + ) + } + cur = lineView.node.nextSibling + } + lineN += lineView.size + } + while (cur) { + cur = rm(cur) + } + } + + function updateGutterSpace(display) { + var width = display.gutters.offsetWidth + display.sizer.style.marginLeft = width + "px" + } + + function setDocumentHeight(cm, measure) { + cm.display.sizer.style.minHeight = measure.docHeight + "px" + cm.display.heightForcer.style.top = measure.docHeight + "px" + cm.display.gutters.style.height = + measure.docHeight + cm.display.barHeight + scrollGap(cm) + "px" + } + + // Re-align line numbers and gutter marks to compensate for + // horizontal scrolling. + function alignHorizontally(cm) { + var display = cm.display, + view = display.view + if (!display.alignWidgets && (!display.gutters.firstChild || !cm.options.fixedGutter)) { + return + } + var comp = compensateForHScroll(display) - display.scroller.scrollLeft + cm.doc.scrollLeft + var gutterW = display.gutters.offsetWidth, + left = comp + "px" + for (var i = 0; i < view.length; i++) { + if (!view[i].hidden) { + if (cm.options.fixedGutter) { + if (view[i].gutter) { + view[i].gutter.style.left = left + } + if (view[i].gutterBackground) { + view[i].gutterBackground.style.left = left + } + } + var align = view[i].alignable + if (align) { + for (var j = 0; j < align.length; j++) { + align[j].style.left = left + } + } + } + } + if (cm.options.fixedGutter) { + display.gutters.style.left = comp + gutterW + "px" + } + } + + // Used to ensure that the line number gutter is still the right + // size for the current document size. Returns true when an update + // is needed. + function maybeUpdateLineNumberWidth(cm) { + if (!cm.options.lineNumbers) { + return false + } + var doc = cm.doc, + last = lineNumberFor(cm.options, doc.first + doc.size - 1), + display = cm.display + if (last.length != display.lineNumChars) { + var test = display.measure.appendChild( + elt("div", [elt("div", last)], "CodeMirror-linenumber CodeMirror-gutter-elt") + ) + var innerW = test.firstChild.offsetWidth, + padding = test.offsetWidth - innerW + display.lineGutter.style.width = "" + display.lineNumInnerWidth = + Math.max(innerW, display.lineGutter.offsetWidth - padding) + 1 + display.lineNumWidth = display.lineNumInnerWidth + padding + display.lineNumChars = display.lineNumInnerWidth ? last.length : -1 + display.lineGutter.style.width = display.lineNumWidth + "px" + updateGutterSpace(cm.display) + return true + } + return false + } + + function getGutters(gutters, lineNumbers) { + var result = [], + sawLineNumbers = false + for (var i = 0; i < gutters.length; i++) { + var name = gutters[i], + style = null + if (typeof name != "string") { + style = name.style + name = name.className + } + if (name == "CodeMirror-linenumbers") { + if (!lineNumbers) { + continue + } else { + sawLineNumbers = true + } + } + result.push({ className: name, style: style }) + } + if (lineNumbers && !sawLineNumbers) { + result.push({ className: "CodeMirror-linenumbers", style: null }) + } + return result + } + + // Rebuild the gutter elements, ensure the margin to the left of the + // code matches their width. + function renderGutters(display) { + var gutters = display.gutters, + specs = display.gutterSpecs + removeChildren(gutters) + display.lineGutter = null + for (var i = 0; i < specs.length; ++i) { + var ref = specs[i] + var className = ref.className + var style = ref.style + var gElt = gutters.appendChild(elt("div", null, "CodeMirror-gutter " + className)) + if (style) { + gElt.style.cssText = style + } + if (className == "CodeMirror-linenumbers") { + display.lineGutter = gElt + gElt.style.width = (display.lineNumWidth || 1) + "px" + } + } + gutters.style.display = specs.length ? "" : "none" + updateGutterSpace(display) + } + + function updateGutters(cm) { + renderGutters(cm.display) + regChange(cm) + alignHorizontally(cm) + } + + // The display handles the DOM integration, both for input reading + // and content drawing. It holds references to DOM nodes and + // display-related state. + + function Display(place, doc, input, options) { + var d = this + this.input = input + + // Covers bottom-right square when both scrollbars are present. + d.scrollbarFiller = elt("div", null, "CodeMirror-scrollbar-filler") + d.scrollbarFiller.setAttribute("cm-not-content", "true") + // Covers bottom of gutter when coverGutterNextToScrollbar is on + // and h scrollbar is present. + d.gutterFiller = elt("div", null, "CodeMirror-gutter-filler") + d.gutterFiller.setAttribute("cm-not-content", "true") + // Will contain the actual code, positioned to cover the viewport. + d.lineDiv = eltP("div", null, "CodeMirror-code") + // Elements are added to these to represent selection and cursors. + d.selectionDiv = elt("div", null, null, "position: relative; z-index: 1") + d.cursorDiv = elt("div", null, "CodeMirror-cursors") + // A visibility: hidden element used to find the size of things. + d.measure = elt("div", null, "CodeMirror-measure") + // When lines outside of the viewport are measured, they are drawn in this. + d.lineMeasure = elt("div", null, "CodeMirror-measure") + // Wraps everything that needs to exist inside the vertically-padded coordinate system + d.lineSpace = eltP( + "div", + [d.measure, d.lineMeasure, d.selectionDiv, d.cursorDiv, d.lineDiv], + null, + "position: relative; outline: none" + ) + var lines = eltP("div", [d.lineSpace], "CodeMirror-lines") + // Moved around its parent to cover visible view. + d.mover = elt("div", [lines], null, "position: relative") + // Set to the height of the document, allowing scrolling. + d.sizer = elt("div", [d.mover], "CodeMirror-sizer") + d.sizerWidth = null + // Behavior of elts with overflow: auto and padding is + // inconsistent across browsers. This is used to ensure the + // scrollable area is big enough. + d.heightForcer = elt( + "div", + null, + null, + "position: absolute; height: " + scrollerGap + "px; width: 1px;" + ) + // Will contain the gutters, if any. + d.gutters = elt("div", null, "CodeMirror-gutters") + d.lineGutter = null + // Actual scrollable element. + d.scroller = elt("div", [d.sizer, d.heightForcer, d.gutters], "CodeMirror-scroll") + d.scroller.setAttribute("tabIndex", "-1") + // The element in which the editor lives. + d.wrapper = elt("div", [d.scrollbarFiller, d.gutterFiller, d.scroller], "CodeMirror") + + // Work around IE7 z-index bug (not perfect, hence IE7 not really being supported) + if (ie && ie_version < 8) { + d.gutters.style.zIndex = -1 + d.scroller.style.paddingRight = 0 + } + if (!webkit && !(gecko && mobile)) { + d.scroller.draggable = true + } + + if (place) { + if (place.appendChild) { + place.appendChild(d.wrapper) + } else { + place(d.wrapper) + } + } + + // Current rendered range (may be bigger than the view window). + d.viewFrom = d.viewTo = doc.first + d.reportedViewFrom = d.reportedViewTo = doc.first + // Information about the rendered lines. + d.view = [] + d.renderedView = null + // Holds info about a single rendered line when it was rendered + // for measurement, while not in view. + d.externalMeasured = null + // Empty space (in pixels) above the view + d.viewOffset = 0 + d.lastWrapHeight = d.lastWrapWidth = 0 + d.updateLineNumbers = null + + d.nativeBarWidth = d.barHeight = d.barWidth = 0 + d.scrollbarsClipped = false + + // Used to only resize the line number gutter when necessary (when + // the amount of lines crosses a boundary that makes its width change) + d.lineNumWidth = d.lineNumInnerWidth = d.lineNumChars = null + // Set to true when a non-horizontal-scrolling line widget is + // added. As an optimization, line widget aligning is skipped when + // this is false. + d.alignWidgets = false + + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null + + // Tracks the maximum line length so that the horizontal scrollbar + // can be kept static when scrolling. + d.maxLine = null + d.maxLineLength = 0 + d.maxLineChanged = false + + // Used for measuring wheel scrolling granularity + d.wheelDX = d.wheelDY = d.wheelStartX = d.wheelStartY = null + + // True when shift is held down. + d.shift = false + + // Used to track whether anything happened since the context menu + // was opened. + d.selForContextMenu = null + + d.activeTouch = null + + d.gutterSpecs = getGutters(options.gutters, options.lineNumbers) + renderGutters(d) + + input.init(d) + } + + // Since the delta values reported on mouse wheel events are + // unstandardized between browsers and even browser versions, and + // generally horribly unpredictable, this code starts by measuring + // the scroll effect that the first few mouse wheel events have, + // and, from that, detects the way it can convert deltas to pixel + // offsets afterwards. + // + // The reason we want to know the amount a wheel event will scroll + // is that it gives us a chance to update the display before the + // actual scrolling happens, reducing flickering. + + var wheelSamples = 0, + wheelPixelsPerUnit = null + // Fill in a browser-detected starting value on browsers where we + // know one. These don't have to be accurate -- the result of them + // being wrong would just be a slight flicker on the first wheel + // scroll (if it is large enough). + if (ie) { + wheelPixelsPerUnit = -0.53 + } else if (gecko) { + wheelPixelsPerUnit = 15 + } else if (chrome) { + wheelPixelsPerUnit = -0.7 + } else if (safari) { + wheelPixelsPerUnit = -1 / 3 + } + + function wheelEventDelta(e) { + var dx = e.wheelDeltaX, + dy = e.wheelDeltaY + if (dx == null && e.detail && e.axis == e.HORIZONTAL_AXIS) { + dx = e.detail + } + if (dy == null && e.detail && e.axis == e.VERTICAL_AXIS) { + dy = e.detail + } else if (dy == null) { + dy = e.wheelDelta + } + return { x: dx, y: dy } + } + function wheelEventPixels(e) { + var delta = wheelEventDelta(e) + delta.x *= wheelPixelsPerUnit + delta.y *= wheelPixelsPerUnit + return delta + } + + function onScrollWheel(cm, e) { + var delta = wheelEventDelta(e), + dx = delta.x, + dy = delta.y + + var display = cm.display, + scroll = display.scroller + // Quit if there's nothing to scroll here + var canScrollX = scroll.scrollWidth > scroll.clientWidth + var canScrollY = scroll.scrollHeight > scroll.clientHeight + if (!((dx && canScrollX) || (dy && canScrollY))) { + return + } + + // Webkit browsers on OS X abort momentum scrolls when the target + // of the scroll event is removed from the scrollable element. + // This hack (see related code in patchDisplay) makes sure the + // element is kept around. + if (dy && mac && webkit) { + outer: for ( + var cur = e.target, view = display.view; + cur != scroll; + cur = cur.parentNode + ) { + for (var i = 0; i < view.length; i++) { + if (view[i].node == cur) { + cm.display.currentWheelTarget = cur + break outer + } + } + } + } + + // On some browsers, horizontal scrolling will cause redraws to + // happen before the gutter has been realigned, causing it to + // wriggle around in a most unseemly way. When we have an + // estimated pixels/delta value, we just handle horizontal + // scrolling entirely here. It'll be slightly off from native, but + // better than glitching out. + if (dx && !gecko && !presto && wheelPixelsPerUnit != null) { + if (dy && canScrollY) { + updateScrollTop(cm, Math.max(0, scroll.scrollTop + dy * wheelPixelsPerUnit)) + } + setScrollLeft(cm, Math.max(0, scroll.scrollLeft + dx * wheelPixelsPerUnit)) + // Only prevent default scrolling if vertical scrolling is + // actually possible. Otherwise, it causes vertical scroll + // jitter on OSX trackpads when deltaX is small and deltaY + // is large (issue #3579) + if (!dy || (dy && canScrollY)) { + e_preventDefault(e) + } + display.wheelStartX = null // Abort measurement, if in progress + return + } + + // 'Project' the visible viewport to cover the area that is being + // scrolled into view (if we know enough to estimate it). + if (dy && wheelPixelsPerUnit != null) { + var pixels = dy * wheelPixelsPerUnit + var top = cm.doc.scrollTop, + bot = top + display.wrapper.clientHeight + if (pixels < 0) { + top = Math.max(0, top + pixels - 50) + } else { + bot = Math.min(cm.doc.height, bot + pixels + 50) + } + updateDisplaySimple(cm, { top: top, bottom: bot }) + } + + if (wheelSamples < 20) { + if (display.wheelStartX == null) { + display.wheelStartX = scroll.scrollLeft + display.wheelStartY = scroll.scrollTop + display.wheelDX = dx + display.wheelDY = dy + setTimeout(function() { + if (display.wheelStartX == null) { + return + } + var movedX = scroll.scrollLeft - display.wheelStartX + var movedY = scroll.scrollTop - display.wheelStartY + var sample = + (movedY && display.wheelDY && movedY / display.wheelDY) || + (movedX && display.wheelDX && movedX / display.wheelDX) + display.wheelStartX = display.wheelStartY = null + if (!sample) { + return + } + wheelPixelsPerUnit = + (wheelPixelsPerUnit * wheelSamples + sample) / (wheelSamples + 1) + ++wheelSamples + }, 200) + } else { + display.wheelDX += dx + display.wheelDY += dy + } + } + } + + // Selection objects are immutable. A new one is created every time + // the selection changes. A selection is one or more non-overlapping + // (and non-touching) ranges, sorted, and an integer that indicates + // which one is the primary selection (the one that's scrolled into + // view, that getCursor returns, etc). + var Selection = function(ranges, primIndex) { + this.ranges = ranges + this.primIndex = primIndex + } + + Selection.prototype.primary = function() { + return this.ranges[this.primIndex] + } + + Selection.prototype.equals = function(other) { + if (other == this) { + return true + } + if (other.primIndex != this.primIndex || other.ranges.length != this.ranges.length) { + return false + } + for (var i = 0; i < this.ranges.length; i++) { + var here = this.ranges[i], + there = other.ranges[i] + if ( + !equalCursorPos(here.anchor, there.anchor) || + !equalCursorPos(here.head, there.head) + ) { + return false + } + } + return true + } + + Selection.prototype.deepCopy = function() { + var out = [] + for (var i = 0; i < this.ranges.length; i++) { + out[i] = new Range(copyPos(this.ranges[i].anchor), copyPos(this.ranges[i].head)) + } + return new Selection(out, this.primIndex) + } + + Selection.prototype.somethingSelected = function() { + for (var i = 0; i < this.ranges.length; i++) { + if (!this.ranges[i].empty()) { + return true + } + } + return false + } + + Selection.prototype.contains = function(pos, end) { + if (!end) { + end = pos + } + for (var i = 0; i < this.ranges.length; i++) { + var range = this.ranges[i] + if (cmp(end, range.from()) >= 0 && cmp(pos, range.to()) <= 0) { + return i + } + } + return -1 + } + + var Range = function(anchor, head) { + this.anchor = anchor + this.head = head + } + + Range.prototype.from = function() { + return minPos(this.anchor, this.head) + } + Range.prototype.to = function() { + return maxPos(this.anchor, this.head) + } + Range.prototype.empty = function() { + return this.head.line == this.anchor.line && this.head.ch == this.anchor.ch + } + + // Take an unsorted, potentially overlapping set of ranges, and + // build a selection out of it. 'Consumes' ranges array (modifying + // it). + function normalizeSelection(cm, ranges, primIndex) { + var mayTouch = cm && cm.options.selectionsMayTouch + var prim = ranges[primIndex] + ranges.sort(function(a, b) { + return cmp(a.from(), b.from()) + }) + primIndex = indexOf(ranges, prim) + for (var i = 1; i < ranges.length; i++) { + var cur = ranges[i], + prev = ranges[i - 1] + var diff = cmp(prev.to(), cur.from()) + if (mayTouch && !cur.empty() ? diff > 0 : diff >= 0) { + var from = minPos(prev.from(), cur.from()), + to = maxPos(prev.to(), cur.to()) + var inv = prev.empty() ? cur.from() == cur.head : prev.from() == prev.head + if (i <= primIndex) { + --primIndex + } + ranges.splice(--i, 2, new Range(inv ? to : from, inv ? from : to)) + } + } + return new Selection(ranges, primIndex) + } + + function simpleSelection(anchor, head) { + return new Selection([new Range(anchor, head || anchor)], 0) + } + + // Compute the position of the end of a change (its 'to' property + // refers to the pre-change end). + function changeEnd(change) { + if (!change.text) { + return change.to + } + return Pos( + change.from.line + change.text.length - 1, + lst(change.text).length + (change.text.length == 1 ? change.from.ch : 0) + ) + } + + // Adjust a position to refer to the post-change position of the + // same text, or the end of the change if the change covers it. + function adjustForChange(pos, change) { + if (cmp(pos, change.from) < 0) { + return pos + } + if (cmp(pos, change.to) <= 0) { + return changeEnd(change) + } + + var line = pos.line + change.text.length - (change.to.line - change.from.line) - 1, + ch = pos.ch + if (pos.line == change.to.line) { + ch += changeEnd(change).ch - change.to.ch + } + return Pos(line, ch) + } + + function computeSelAfterChange(doc, change) { + var out = [] + for (var i = 0; i < doc.sel.ranges.length; i++) { + var range = doc.sel.ranges[i] + out.push( + new Range( + adjustForChange(range.anchor, change), + adjustForChange(range.head, change) + ) + ) + } + return normalizeSelection(doc.cm, out, doc.sel.primIndex) + } + + function offsetPos(pos, old, nw) { + if (pos.line == old.line) { + return Pos(nw.line, pos.ch - old.ch + nw.ch) + } else { + return Pos(nw.line + (pos.line - old.line), pos.ch) + } + } + + // Used by replaceSelections to allow moving the selection to the + // start or around the replaced test. Hint may be "start" or "around". + function computeReplacedSel(doc, changes, hint) { + var out = [] + var oldPrev = Pos(doc.first, 0), + newPrev = oldPrev + for (var i = 0; i < changes.length; i++) { + var change = changes[i] + var from = offsetPos(change.from, oldPrev, newPrev) + var to = offsetPos(changeEnd(change), oldPrev, newPrev) + oldPrev = change.to + newPrev = to + if (hint == "around") { + var range = doc.sel.ranges[i], + inv = cmp(range.head, range.anchor) < 0 + out[i] = new Range(inv ? to : from, inv ? from : to) + } else { + out[i] = new Range(from, from) + } + } + return new Selection(out, doc.sel.primIndex) + } + + // Used to get the editor into a consistent state again when options change. + + function loadMode(cm) { + cm.doc.mode = getMode(cm.options, cm.doc.modeOption) + resetModeState(cm) + } + + function resetModeState(cm) { + cm.doc.iter(function(line) { + if (line.stateAfter) { + line.stateAfter = null + } + if (line.styles) { + line.styles = null + } + }) + cm.doc.modeFrontier = cm.doc.highlightFrontier = cm.doc.first + startWorker(cm, 100) + cm.state.modeGen++ + if (cm.curOp) { + regChange(cm) + } + } + + // DOCUMENT DATA STRUCTURE + + // By default, updates that start and end at the beginning of a line + // are treated specially, in order to make the association of line + // widgets and marker elements with the text behave more intuitive. + function isWholeLineUpdate(doc, change) { + return ( + change.from.ch == 0 && + change.to.ch == 0 && + lst(change.text) == "" && + (!doc.cm || doc.cm.options.wholeLineUpdateBefore) + ) + } + + // Perform a change on the document data structure. + function updateDoc(doc, change, markedSpans, estimateHeight) { + function spansFor(n) { + return markedSpans ? markedSpans[n] : null + } + function update(line, text, spans) { + updateLine(line, text, spans, estimateHeight) + signalLater(line, "change", line, change) + } + function linesFor(start, end) { + var result = [] + for (var i = start; i < end; ++i) { + result.push(new Line(text[i], spansFor(i), estimateHeight)) + } + return result + } + + var from = change.from, + to = change.to, + text = change.text + var firstLine = getLine(doc, from.line), + lastLine = getLine(doc, to.line) + var lastText = lst(text), + lastSpans = spansFor(text.length - 1), + nlines = to.line - from.line + + // Adjust the line structure + if (change.full) { + doc.insert(0, linesFor(0, text.length)) + doc.remove(text.length, doc.size - text.length) + } else if (isWholeLineUpdate(doc, change)) { + // This is a whole-line replace. Treated specially to make + // sure line objects move the way they are supposed to. + var added = linesFor(0, text.length - 1) + update(lastLine, lastLine.text, lastSpans) + if (nlines) { + doc.remove(from.line, nlines) + } + if (added.length) { + doc.insert(from.line, added) + } + } else if (firstLine == lastLine) { + if (text.length == 1) { + update( + firstLine, + firstLine.text.slice(0, from.ch) + lastText + firstLine.text.slice(to.ch), + lastSpans + ) + } else { + var added$1 = linesFor(1, text.length - 1) + added$1.push( + new Line(lastText + firstLine.text.slice(to.ch), lastSpans, estimateHeight) + ) + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)) + doc.insert(from.line + 1, added$1) + } + } else if (text.length == 1) { + update( + firstLine, + firstLine.text.slice(0, from.ch) + text[0] + lastLine.text.slice(to.ch), + spansFor(0) + ) + doc.remove(from.line + 1, nlines) + } else { + update(firstLine, firstLine.text.slice(0, from.ch) + text[0], spansFor(0)) + update(lastLine, lastText + lastLine.text.slice(to.ch), lastSpans) + var added$2 = linesFor(1, text.length - 1) + if (nlines > 1) { + doc.remove(from.line + 1, nlines - 1) + } + doc.insert(from.line + 1, added$2) + } + + signalLater(doc, "change", doc, change) + } + + // Call f for all linked documents. + function linkedDocs(doc, f, sharedHistOnly) { + function propagate(doc, skip, sharedHist) { + if (doc.linked) { + for (var i = 0; i < doc.linked.length; ++i) { + var rel = doc.linked[i] + if (rel.doc == skip) { + continue + } + var shared = sharedHist && rel.sharedHist + if (sharedHistOnly && !shared) { + continue + } + f(rel.doc, shared) + propagate(rel.doc, doc, shared) + } + } + } + propagate(doc, null, true) + } + + // Attach a document to an editor. + function attachDoc(cm, doc) { + if (doc.cm) { + throw new Error("This document is already in use.") + } + cm.doc = doc + doc.cm = cm + estimateLineHeights(cm) + loadMode(cm) + setDirectionClass(cm) + if (!cm.options.lineWrapping) { + findMaxLine(cm) + } + cm.options.mode = doc.modeOption + regChange(cm) + } + + function setDirectionClass(cm) { + ;(cm.doc.direction == "rtl" ? addClass : rmClass)(cm.display.lineDiv, "CodeMirror-rtl") + } + + function directionChanged(cm) { + runInOp(cm, function() { + setDirectionClass(cm) + regChange(cm) + }) + } + + function History(startGen) { + // Arrays of change events and selections. Doing something adds an + // event to done and clears undo. Undoing moves events from done + // to undone, redoing moves them in the other direction. + this.done = [] + this.undone = [] + this.undoDepth = Infinity + // Used to track when changes can be merged into a single undo + // event + this.lastModTime = this.lastSelTime = 0 + this.lastOp = this.lastSelOp = null + this.lastOrigin = this.lastSelOrigin = null + // Used by the isClean() method + this.generation = this.maxGeneration = startGen || 1 + } + + // Create a history change event from an updateDoc-style change + // object. + function historyChangeFromChange(doc, change) { + var histChange = { + from: copyPos(change.from), + to: changeEnd(change), + text: getBetween(doc, change.from, change.to) + } + attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1) + linkedDocs( + doc, + function(doc) { + return attachLocalSpans(doc, histChange, change.from.line, change.to.line + 1) + }, + true + ) + return histChange + } + + // Pop all selection events off the end of a history array. Stop at + // a change event. + function clearSelectionEvents(array) { + while (array.length) { + var last = lst(array) + if (last.ranges) { + array.pop() + } else { + break + } + } + } + + // Find the top change event in the history. Pop off selection + // events that are in the way. + function lastChangeEvent(hist, force) { + if (force) { + clearSelectionEvents(hist.done) + return lst(hist.done) + } else if (hist.done.length && !lst(hist.done).ranges) { + return lst(hist.done) + } else if (hist.done.length > 1 && !hist.done[hist.done.length - 2].ranges) { + hist.done.pop() + return lst(hist.done) + } + } + + // Register a change in the history. Merges changes that are within + // a single operation, or are close together with an origin that + // allows merging (starting with "+") into a single event. + function addChangeToHistory(doc, change, selAfter, opId) { + var hist = doc.history + hist.undone.length = 0 + var time = +new Date(), + cur + var last + + if ( + (hist.lastOp == opId || + (hist.lastOrigin == change.origin && + change.origin && + ((change.origin.charAt(0) == "+" && + hist.lastModTime > + time - (doc.cm ? doc.cm.options.historyEventDelay : 500)) || + change.origin.charAt(0) == "*"))) && + (cur = lastChangeEvent(hist, hist.lastOp == opId)) + ) { + // Merge this change into the last event + last = lst(cur.changes) + if (cmp(change.from, change.to) == 0 && cmp(change.from, last.to) == 0) { + // Optimized case for simple insertion -- don't want to add + // new changesets for every character typed + last.to = changeEnd(change) + } else { + // Add new sub-event + cur.changes.push(historyChangeFromChange(doc, change)) + } + } else { + // Can not be merged, start a new event. + var before = lst(hist.done) + if (!before || !before.ranges) { + pushSelectionToHistory(doc.sel, hist.done) + } + cur = { changes: [historyChangeFromChange(doc, change)], generation: hist.generation } + hist.done.push(cur) + while (hist.done.length > hist.undoDepth) { + hist.done.shift() + if (!hist.done[0].ranges) { + hist.done.shift() + } + } + } + hist.done.push(selAfter) + hist.generation = ++hist.maxGeneration + hist.lastModTime = hist.lastSelTime = time + hist.lastOp = hist.lastSelOp = opId + hist.lastOrigin = hist.lastSelOrigin = change.origin + + if (!last) { + signal(doc, "historyAdded") + } + } + + function selectionEventCanBeMerged(doc, origin, prev, sel) { + var ch = origin.charAt(0) + return ( + ch == "*" || + (ch == "+" && + prev.ranges.length == sel.ranges.length && + prev.somethingSelected() == sel.somethingSelected() && + new Date() - doc.history.lastSelTime <= + (doc.cm ? doc.cm.options.historyEventDelay : 500)) + ) + } + + // Called whenever the selection changes, sets the new selection as + // the pending selection in the history, and pushes the old pending + // selection into the 'done' array when it was significantly + // different (in number of selected ranges, emptiness, or time). + function addSelectionToHistory(doc, sel, opId, options) { + var hist = doc.history, + origin = options && options.origin + + // A new event is started when the previous origin does not match + // the current, or the origins don't allow matching. Origins + // starting with * are always merged, those starting with + are + // merged when similar and close together in time. + if ( + opId == hist.lastSelOp || + (origin && + hist.lastSelOrigin == origin && + ((hist.lastModTime == hist.lastSelTime && hist.lastOrigin == origin) || + selectionEventCanBeMerged(doc, origin, lst(hist.done), sel))) + ) { + hist.done[hist.done.length - 1] = sel + } else { + pushSelectionToHistory(sel, hist.done) + } + + hist.lastSelTime = +new Date() + hist.lastSelOrigin = origin + hist.lastSelOp = opId + if (options && options.clearRedo !== false) { + clearSelectionEvents(hist.undone) + } + } + + function pushSelectionToHistory(sel, dest) { + var top = lst(dest) + if (!(top && top.ranges && top.equals(sel))) { + dest.push(sel) + } + } + + // Used to store marked span information in the history. + function attachLocalSpans(doc, change, from, to) { + var existing = change["spans_" + doc.id], + n = 0 + doc.iter(Math.max(doc.first, from), Math.min(doc.first + doc.size, to), function(line) { + if (line.markedSpans) { + ;(existing || (existing = change["spans_" + doc.id] = {}))[n] = line.markedSpans + } + ++n + }) + } + + // When un/re-doing restores text containing marked spans, those + // that have been explicitly cleared should not be restored. + function removeClearedSpans(spans) { + if (!spans) { + return null + } + var out + for (var i = 0; i < spans.length; ++i) { + if (spans[i].marker.explicitlyCleared) { + if (!out) { + out = spans.slice(0, i) + } + } else if (out) { + out.push(spans[i]) + } + } + return !out ? spans : out.length ? out : null + } + + // Retrieve and filter the old marked spans stored in a change event. + function getOldSpans(doc, change) { + var found = change["spans_" + doc.id] + if (!found) { + return null + } + var nw = [] + for (var i = 0; i < change.text.length; ++i) { + nw.push(removeClearedSpans(found[i])) + } + return nw + } + + // Used for un/re-doing changes from the history. Combines the + // result of computing the existing spans with the set of spans that + // existed in the history (so that deleting around a span and then + // undoing brings back the span). + function mergeOldSpans(doc, change) { + var old = getOldSpans(doc, change) + var stretched = stretchSpansOverChange(doc, change) + if (!old) { + return stretched + } + if (!stretched) { + return old + } + + for (var i = 0; i < old.length; ++i) { + var oldCur = old[i], + stretchCur = stretched[i] + if (oldCur && stretchCur) { + spans: for (var j = 0; j < stretchCur.length; ++j) { + var span = stretchCur[j] + for (var k = 0; k < oldCur.length; ++k) { + if (oldCur[k].marker == span.marker) { + continue spans + } + } + oldCur.push(span) + } + } else if (stretchCur) { + old[i] = stretchCur + } + } + return old + } + + // Used both to provide a JSON-safe object in .getHistory, and, when + // detaching a document, to split the history in two + function copyHistoryArray(events, newGroup, instantiateSel) { + var copy = [] + for (var i = 0; i < events.length; ++i) { + var event = events[i] + if (event.ranges) { + copy.push(instantiateSel ? Selection.prototype.deepCopy.call(event) : event) + continue + } + var changes = event.changes, + newChanges = [] + copy.push({ changes: newChanges }) + for (var j = 0; j < changes.length; ++j) { + var change = changes[j], + m = void 0 + newChanges.push({ from: change.from, to: change.to, text: change.text }) + if (newGroup) { + for (var prop in change) { + if ((m = prop.match(/^spans_(\d+)$/))) { + if (indexOf(newGroup, Number(m[1])) > -1) { + lst(newChanges)[prop] = change[prop] + delete change[prop] + } + } + } + } + } + } + return copy + } + + // The 'scroll' parameter given to many of these indicated whether + // the new cursor position should be scrolled into view after + // modifying the selection. + + // If shift is held or the extend flag is set, extends a range to + // include a given position (and optionally a second position). + // Otherwise, simply returns the range between the given positions. + // Used for cursor motion and such. + function extendRange(range, head, other, extend) { + if (extend) { + var anchor = range.anchor + if (other) { + var posBefore = cmp(head, anchor) < 0 + if (posBefore != cmp(other, anchor) < 0) { + anchor = head + head = other + } else if (posBefore != cmp(head, other) < 0) { + head = other + } + } + return new Range(anchor, head) + } else { + return new Range(other || head, head) + } + } + + // Extend the primary selection range, discard the rest. + function extendSelection(doc, head, other, options, extend) { + if (extend == null) { + extend = doc.cm && (doc.cm.display.shift || doc.extend) + } + setSelection( + doc, + new Selection([extendRange(doc.sel.primary(), head, other, extend)], 0), + options + ) + } + + // Extend all selections (pos is an array of selections with length + // equal the number of selections) + function extendSelections(doc, heads, options) { + var out = [] + var extend = doc.cm && (doc.cm.display.shift || doc.extend) + for (var i = 0; i < doc.sel.ranges.length; i++) { + out[i] = extendRange(doc.sel.ranges[i], heads[i], null, extend) + } + var newSel = normalizeSelection(doc.cm, out, doc.sel.primIndex) + setSelection(doc, newSel, options) + } + + // Updates a single range in the selection. + function replaceOneSelection(doc, i, range, options) { + var ranges = doc.sel.ranges.slice(0) + ranges[i] = range + setSelection(doc, normalizeSelection(doc.cm, ranges, doc.sel.primIndex), options) + } + + // Reset the selection to a single range. + function setSimpleSelection(doc, anchor, head, options) { + setSelection(doc, simpleSelection(anchor, head), options) + } + + // Give beforeSelectionChange handlers a change to influence a + // selection update. + function filterSelectionChange(doc, sel, options) { + var obj = { + ranges: sel.ranges, + update: function(ranges) { + this.ranges = [] + for (var i = 0; i < ranges.length; i++) { + this.ranges[i] = new Range( + clipPos(doc, ranges[i].anchor), + clipPos(doc, ranges[i].head) + ) + } + }, + origin: options && options.origin + } + signal(doc, "beforeSelectionChange", doc, obj) + if (doc.cm) { + signal(doc.cm, "beforeSelectionChange", doc.cm, obj) + } + if (obj.ranges != sel.ranges) { + return normalizeSelection(doc.cm, obj.ranges, obj.ranges.length - 1) + } else { + return sel + } + } + + function setSelectionReplaceHistory(doc, sel, options) { + var done = doc.history.done, + last = lst(done) + if (last && last.ranges) { + done[done.length - 1] = sel + setSelectionNoUndo(doc, sel, options) + } else { + setSelection(doc, sel, options) + } + } + + // Set a new selection. + function setSelection(doc, sel, options) { + setSelectionNoUndo(doc, sel, options) + addSelectionToHistory(doc, doc.sel, doc.cm ? doc.cm.curOp.id : NaN, options) + } + + function setSelectionNoUndo(doc, sel, options) { + if ( + hasHandler(doc, "beforeSelectionChange") || + (doc.cm && hasHandler(doc.cm, "beforeSelectionChange")) + ) { + sel = filterSelectionChange(doc, sel, options) + } + + var bias = + (options && options.bias) || + (cmp(sel.primary().head, doc.sel.primary().head) < 0 ? -1 : 1) + setSelectionInner(doc, skipAtomicInSelection(doc, sel, bias, true)) + + if (!(options && options.scroll === false) && doc.cm) { + ensureCursorVisible(doc.cm) + } + } + + function setSelectionInner(doc, sel) { + if (sel.equals(doc.sel)) { + return + } + + doc.sel = sel + + if (doc.cm) { + doc.cm.curOp.updateInput = 1 + doc.cm.curOp.selectionChanged = true + signalCursorActivity(doc.cm) + } + signalLater(doc, "cursorActivity", doc) + } + + // Verify that the selection does not partially select any atomic + // marked ranges. + function reCheckSelection(doc) { + setSelectionInner(doc, skipAtomicInSelection(doc, doc.sel, null, false)) + } + + // Return a selection that does not partially select any atomic + // ranges. + function skipAtomicInSelection(doc, sel, bias, mayClear) { + var out + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i] + var old = sel.ranges.length == doc.sel.ranges.length && doc.sel.ranges[i] + var newAnchor = skipAtomic(doc, range.anchor, old && old.anchor, bias, mayClear) + var newHead = skipAtomic(doc, range.head, old && old.head, bias, mayClear) + if (out || newAnchor != range.anchor || newHead != range.head) { + if (!out) { + out = sel.ranges.slice(0, i) + } + out[i] = new Range(newAnchor, newHead) + } + } + return out ? normalizeSelection(doc.cm, out, sel.primIndex) : sel + } + + function skipAtomicInner(doc, pos, oldPos, dir, mayClear) { + var line = getLine(doc, pos.line) + if (line.markedSpans) { + for (var i = 0; i < line.markedSpans.length; ++i) { + var sp = line.markedSpans[i], + m = sp.marker + + // Determine if we should prevent the cursor being placed to the left/right of an atomic marker + // Historically this was determined using the inclusiveLeft/Right option, but the new way to control it + // is with selectLeft/Right + var preventCursorLeft = "selectLeft" in m ? !m.selectLeft : m.inclusiveLeft + var preventCursorRight = "selectRight" in m ? !m.selectRight : m.inclusiveRight + + if ( + (sp.from == null || + (preventCursorLeft ? sp.from <= pos.ch : sp.from < pos.ch)) && + (sp.to == null || (preventCursorRight ? sp.to >= pos.ch : sp.to > pos.ch)) + ) { + if (mayClear) { + signal(m, "beforeCursorEnter") + if (m.explicitlyCleared) { + if (!line.markedSpans) { + break + } else { + --i + continue + } + } + } + if (!m.atomic) { + continue + } + + if (oldPos) { + var near = m.find(dir < 0 ? 1 : -1), + diff = void 0 + if (dir < 0 ? preventCursorRight : preventCursorLeft) { + near = movePos( + doc, + near, + -dir, + near && near.line == pos.line ? line : null + ) + } + if ( + near && + near.line == pos.line && + (diff = cmp(near, oldPos)) && + (dir < 0 ? diff < 0 : diff > 0) + ) { + return skipAtomicInner(doc, near, pos, dir, mayClear) + } + } + + var far = m.find(dir < 0 ? -1 : 1) + if (dir < 0 ? preventCursorLeft : preventCursorRight) { + far = movePos(doc, far, dir, far.line == pos.line ? line : null) + } + return far ? skipAtomicInner(doc, far, pos, dir, mayClear) : null + } + } + } + return pos + } + + // Ensure a given position is not inside an atomic range. + function skipAtomic(doc, pos, oldPos, bias, mayClear) { + var dir = bias || 1 + var found = + skipAtomicInner(doc, pos, oldPos, dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, dir, true)) || + skipAtomicInner(doc, pos, oldPos, -dir, mayClear) || + (!mayClear && skipAtomicInner(doc, pos, oldPos, -dir, true)) + if (!found) { + doc.cantEdit = true + return Pos(doc.first, 0) + } + return found + } + + function movePos(doc, pos, dir, line) { + if (dir < 0 && pos.ch == 0) { + if (pos.line > doc.first) { + return clipPos(doc, Pos(pos.line - 1)) + } else { + return null + } + } else if (dir > 0 && pos.ch == (line || getLine(doc, pos.line)).text.length) { + if (pos.line < doc.first + doc.size - 1) { + return Pos(pos.line + 1, 0) + } else { + return null + } + } else { + return new Pos(pos.line, pos.ch + dir) + } + } + + function selectAll(cm) { + cm.setSelection(Pos(cm.firstLine(), 0), Pos(cm.lastLine()), sel_dontScroll) + } + + // UPDATING + + // Allow "beforeChange" event handlers to influence a change + function filterChange(doc, change, update) { + var obj = { + canceled: false, + from: change.from, + to: change.to, + text: change.text, + origin: change.origin, + cancel: function() { + return (obj.canceled = true) + } + } + if (update) { + obj.update = function(from, to, text, origin) { + if (from) { + obj.from = clipPos(doc, from) + } + if (to) { + obj.to = clipPos(doc, to) + } + if (text) { + obj.text = text + } + if (origin !== undefined) { + obj.origin = origin + } + } + } + signal(doc, "beforeChange", doc, obj) + if (doc.cm) { + signal(doc.cm, "beforeChange", doc.cm, obj) + } + + if (obj.canceled) { + if (doc.cm) { + doc.cm.curOp.updateInput = 2 + } + return null + } + return { from: obj.from, to: obj.to, text: obj.text, origin: obj.origin } + } + + // Apply a change to a document, and add it to the document's + // history, and propagating it to all linked documents. + function makeChange(doc, change, ignoreReadOnly) { + if (doc.cm) { + if (!doc.cm.curOp) { + return operation(doc.cm, makeChange)(doc, change, ignoreReadOnly) + } + if (doc.cm.state.suppressEdits) { + return + } + } + + if (hasHandler(doc, "beforeChange") || (doc.cm && hasHandler(doc.cm, "beforeChange"))) { + change = filterChange(doc, change, true) + if (!change) { + return + } + } + + // Possibly split or suppress the update based on the presence + // of read-only spans in its range. + var split = + sawReadOnlySpans && !ignoreReadOnly && removeReadOnlyRanges(doc, change.from, change.to) + if (split) { + for (var i = split.length - 1; i >= 0; --i) { + makeChangeInner(doc, { + from: split[i].from, + to: split[i].to, + text: i ? [""] : change.text, + origin: change.origin + }) + } + } else { + makeChangeInner(doc, change) + } + } + + function makeChangeInner(doc, change) { + if (change.text.length == 1 && change.text[0] == "" && cmp(change.from, change.to) == 0) { + return + } + var selAfter = computeSelAfterChange(doc, change) + addChangeToHistory(doc, change, selAfter, doc.cm ? doc.cm.curOp.id : NaN) + + makeChangeSingleDoc(doc, change, selAfter, stretchSpansOverChange(doc, change)) + var rebased = [] + + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change) + rebased.push(doc.history) + } + makeChangeSingleDoc(doc, change, null, stretchSpansOverChange(doc, change)) + }) + } + + // Revert a change stored in a document's history. + function makeChangeFromHistory(doc, type, allowSelectionOnly) { + var suppress = doc.cm && doc.cm.state.suppressEdits + if (suppress && !allowSelectionOnly) { + return + } + + var hist = doc.history, + event, + selAfter = doc.sel + var source = type == "undo" ? hist.done : hist.undone, + dest = type == "undo" ? hist.undone : hist.done + + // Verify that there is a useable event (so that ctrl-z won't + // needlessly clear selection events) + var i = 0 + for (; i < source.length; i++) { + event = source[i] + if (allowSelectionOnly ? event.ranges && !event.equals(doc.sel) : !event.ranges) { + break + } + } + if (i == source.length) { + return + } + hist.lastOrigin = hist.lastSelOrigin = null + + for (;;) { + event = source.pop() + if (event.ranges) { + pushSelectionToHistory(event, dest) + if (allowSelectionOnly && !event.equals(doc.sel)) { + setSelection(doc, event, { clearRedo: false }) + return + } + selAfter = event + } else if (suppress) { + source.push(event) + return + } else { + break + } + } + + // Build up a reverse change object to add to the opposite history + // stack (redo when undoing, and vice versa). + var antiChanges = [] + pushSelectionToHistory(selAfter, dest) + dest.push({ changes: antiChanges, generation: hist.generation }) + hist.generation = event.generation || ++hist.maxGeneration + + var filter = + hasHandler(doc, "beforeChange") || (doc.cm && hasHandler(doc.cm, "beforeChange")) + + var loop = function(i) { + var change = event.changes[i] + change.origin = type + if (filter && !filterChange(doc, change, false)) { + source.length = 0 + return {} + } + + antiChanges.push(historyChangeFromChange(doc, change)) + + var after = i ? computeSelAfterChange(doc, change) : lst(source) + makeChangeSingleDoc(doc, change, after, mergeOldSpans(doc, change)) + if (!i && doc.cm) { + doc.cm.scrollIntoView({ from: change.from, to: changeEnd(change) }) + } + var rebased = [] + + // Propagate to the linked documents + linkedDocs(doc, function(doc, sharedHist) { + if (!sharedHist && indexOf(rebased, doc.history) == -1) { + rebaseHist(doc.history, change) + rebased.push(doc.history) + } + makeChangeSingleDoc(doc, change, null, mergeOldSpans(doc, change)) + }) + } + + for (var i$1 = event.changes.length - 1; i$1 >= 0; --i$1) { + var returned = loop(i$1) + + if (returned) return returned.v + } + } + + // Sub-views need their line numbers shifted when text is added + // above or below them in the parent document. + function shiftDoc(doc, distance) { + if (distance == 0) { + return + } + doc.first += distance + doc.sel = new Selection( + map(doc.sel.ranges, function(range) { + return new Range( + Pos(range.anchor.line + distance, range.anchor.ch), + Pos(range.head.line + distance, range.head.ch) + ) + }), + doc.sel.primIndex + ) + if (doc.cm) { + regChange(doc.cm, doc.first, doc.first - distance, distance) + for (var d = doc.cm.display, l = d.viewFrom; l < d.viewTo; l++) { + regLineChange(doc.cm, l, "gutter") + } + } + } + + // More lower-level change function, handling only a single document + // (not linked ones). + function makeChangeSingleDoc(doc, change, selAfter, spans) { + if (doc.cm && !doc.cm.curOp) { + return operation(doc.cm, makeChangeSingleDoc)(doc, change, selAfter, spans) + } + + if (change.to.line < doc.first) { + shiftDoc(doc, change.text.length - 1 - (change.to.line - change.from.line)) + return + } + if (change.from.line > doc.lastLine()) { + return + } + + // Clip the change to the size of this doc + if (change.from.line < doc.first) { + var shift = change.text.length - 1 - (doc.first - change.from.line) + shiftDoc(doc, shift) + change = { + from: Pos(doc.first, 0), + to: Pos(change.to.line + shift, change.to.ch), + text: [lst(change.text)], + origin: change.origin + } + } + var last = doc.lastLine() + if (change.to.line > last) { + change = { + from: change.from, + to: Pos(last, getLine(doc, last).text.length), + text: [change.text[0]], + origin: change.origin + } + } + + change.removed = getBetween(doc, change.from, change.to) + + if (!selAfter) { + selAfter = computeSelAfterChange(doc, change) + } + if (doc.cm) { + makeChangeSingleDocInEditor(doc.cm, change, spans) + } else { + updateDoc(doc, change, spans) + } + setSelectionNoUndo(doc, selAfter, sel_dontScroll) + + if (doc.cantEdit && skipAtomic(doc, Pos(doc.firstLine(), 0))) { + doc.cantEdit = false + } + } + + // Handle the interaction of a change to a document with the editor + // that this document is part of. + function makeChangeSingleDocInEditor(cm, change, spans) { + var doc = cm.doc, + display = cm.display, + from = change.from, + to = change.to + + var recomputeMaxLength = false, + checkWidthStart = from.line + if (!cm.options.lineWrapping) { + checkWidthStart = lineNo(visualLine(getLine(doc, from.line))) + doc.iter(checkWidthStart, to.line + 1, function(line) { + if (line == display.maxLine) { + recomputeMaxLength = true + return true + } + }) + } + + if (doc.sel.contains(change.from, change.to) > -1) { + signalCursorActivity(cm) + } + + updateDoc(doc, change, spans, estimateHeight(cm)) + + if (!cm.options.lineWrapping) { + doc.iter(checkWidthStart, from.line + change.text.length, function(line) { + var len = lineLength(line) + if (len > display.maxLineLength) { + display.maxLine = line + display.maxLineLength = len + display.maxLineChanged = true + recomputeMaxLength = false + } + }) + if (recomputeMaxLength) { + cm.curOp.updateMaxLine = true + } + } + + retreatFrontier(doc, from.line) + startWorker(cm, 400) + + var lendiff = change.text.length - (to.line - from.line) - 1 + // Remember that these lines changed, for updating the display + if (change.full) { + regChange(cm) + } else if ( + from.line == to.line && + change.text.length == 1 && + !isWholeLineUpdate(cm.doc, change) + ) { + regLineChange(cm, from.line, "text") + } else { + regChange(cm, from.line, to.line + 1, lendiff) + } + + var changesHandler = hasHandler(cm, "changes"), + changeHandler = hasHandler(cm, "change") + if (changeHandler || changesHandler) { + var obj = { + from: from, + to: to, + text: change.text, + removed: change.removed, + origin: change.origin + } + if (changeHandler) { + signalLater(cm, "change", cm, obj) + } + if (changesHandler) { + ;(cm.curOp.changeObjs || (cm.curOp.changeObjs = [])).push(obj) + } + } + cm.display.selForContextMenu = null + } + + function replaceRange(doc, code, from, to, origin) { + var assign + + if (!to) { + to = from + } + if (cmp(to, from) < 0) { + ;(assign = [to, from]), (from = assign[0]), (to = assign[1]) + } + if (typeof code == "string") { + code = doc.splitLines(code) + } + makeChange(doc, { from: from, to: to, text: code, origin: origin }) + } + + // Rebasing/resetting history to deal with externally-sourced changes + + function rebaseHistSelSingle(pos, from, to, diff) { + if (to < pos.line) { + pos.line += diff + } else if (from < pos.line) { + pos.line = from + pos.ch = 0 + } + } + + // Tries to rebase an array of history events given a change in the + // document. If the change touches the same lines as the event, the + // event, and everything 'behind' it, is discarded. If the change is + // before the event, the event's positions are updated. Uses a + // copy-on-write scheme for the positions, to avoid having to + // reallocate them all on every rebase, but also avoid problems with + // shared position objects being unsafely updated. + function rebaseHistArray(array, from, to, diff) { + for (var i = 0; i < array.length; ++i) { + var sub = array[i], + ok = true + if (sub.ranges) { + if (!sub.copied) { + sub = array[i] = sub.deepCopy() + sub.copied = true + } + for (var j = 0; j < sub.ranges.length; j++) { + rebaseHistSelSingle(sub.ranges[j].anchor, from, to, diff) + rebaseHistSelSingle(sub.ranges[j].head, from, to, diff) + } + continue + } + for (var j$1 = 0; j$1 < sub.changes.length; ++j$1) { + var cur = sub.changes[j$1] + if (to < cur.from.line) { + cur.from = Pos(cur.from.line + diff, cur.from.ch) + cur.to = Pos(cur.to.line + diff, cur.to.ch) + } else if (from <= cur.to.line) { + ok = false + break + } + } + if (!ok) { + array.splice(0, i + 1) + i = 0 + } + } + } + + function rebaseHist(hist, change) { + var from = change.from.line, + to = change.to.line, + diff = change.text.length - (to - from) - 1 + rebaseHistArray(hist.done, from, to, diff) + rebaseHistArray(hist.undone, from, to, diff) + } + + // Utility for applying a change to a line by handle or number, + // returning the number and optionally registering the line as + // changed. + function changeLine(doc, handle, changeType, op) { + var no = handle, + line = handle + if (typeof handle == "number") { + line = getLine(doc, clipLine(doc, handle)) + } else { + no = lineNo(handle) + } + if (no == null) { + return null + } + if (op(line, no) && doc.cm) { + regLineChange(doc.cm, no, changeType) + } + return line + } + + // The document is represented as a BTree consisting of leaves, with + // chunk of lines in them, and branches, with up to ten leaves or + // other branch nodes below them. The top node is always a branch + // node, and is the document object itself (meaning it has + // additional methods and properties). + // + // All nodes have parent links. The tree is used both to go from + // line numbers to line objects, and to go from objects to numbers. + // It also indexes by height, and is used to convert between height + // and line object, and to find the total height of the document. + // + // See also http://marijnhaverbeke.nl/blog/codemirror-line-tree.html + + function LeafChunk(lines) { + this.lines = lines + this.parent = null + var height = 0 + for (var i = 0; i < lines.length; ++i) { + lines[i].parent = this + height += lines[i].height + } + this.height = height + } + + LeafChunk.prototype = { + chunkSize: function() { + return this.lines.length + }, + + // Remove the n lines at offset 'at'. + removeInner: function(at, n) { + for (var i = at, e = at + n; i < e; ++i) { + var line = this.lines[i] + this.height -= line.height + cleanUpLine(line) + signalLater(line, "delete") + } + this.lines.splice(at, n) + }, + + // Helper used to collapse a small branch into a single leaf. + collapse: function(lines) { + lines.push.apply(lines, this.lines) + }, + + // Insert the given array of lines at offset 'at', count them as + // having the given height. + insertInner: function(at, lines, height) { + this.height += height + this.lines = this.lines + .slice(0, at) + .concat(lines) + .concat(this.lines.slice(at)) + for (var i = 0; i < lines.length; ++i) { + lines[i].parent = this + } + }, + + // Used to iterate over a part of the tree. + iterN: function(at, n, op) { + for (var e = at + n; at < e; ++at) { + if (op(this.lines[at])) { + return true + } + } + } + } + + function BranchChunk(children) { + this.children = children + var size = 0, + height = 0 + for (var i = 0; i < children.length; ++i) { + var ch = children[i] + size += ch.chunkSize() + height += ch.height + ch.parent = this + } + this.size = size + this.height = height + this.parent = null + } + + BranchChunk.prototype = { + chunkSize: function() { + return this.size + }, + + removeInner: function(at, n) { + this.size -= n + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], + sz = child.chunkSize() + if (at < sz) { + var rm = Math.min(n, sz - at), + oldHeight = child.height + child.removeInner(at, rm) + this.height -= oldHeight - child.height + if (sz == rm) { + this.children.splice(i--, 1) + child.parent = null + } + if ((n -= rm) == 0) { + break + } + at = 0 + } else { + at -= sz + } + } + // If the result is smaller than 25 lines, ensure that it is a + // single leaf node. + if ( + this.size - n < 25 && + (this.children.length > 1 || !(this.children[0] instanceof LeafChunk)) + ) { + var lines = [] + this.collapse(lines) + this.children = [new LeafChunk(lines)] + this.children[0].parent = this + } + }, + + collapse: function(lines) { + for (var i = 0; i < this.children.length; ++i) { + this.children[i].collapse(lines) + } + }, + + insertInner: function(at, lines, height) { + this.size += lines.length + this.height += height + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], + sz = child.chunkSize() + if (at <= sz) { + child.insertInner(at, lines, height) + if (child.lines && child.lines.length > 50) { + // To avoid memory thrashing when child.lines is huge (e.g. first view of a large file), it's never spliced. + // Instead, small slices are taken. They're taken in order because sequential memory accesses are fastest. + var remaining = (child.lines.length % 25) + 25 + for (var pos = remaining; pos < child.lines.length; ) { + var leaf = new LeafChunk(child.lines.slice(pos, (pos += 25))) + child.height -= leaf.height + this.children.splice(++i, 0, leaf) + leaf.parent = this + } + child.lines = child.lines.slice(0, remaining) + this.maybeSpill() + } + break + } + at -= sz + } + }, + + // When a node has grown, check whether it should be split. + maybeSpill: function() { + if (this.children.length <= 10) { + return + } + var me = this + do { + var spilled = me.children.splice(me.children.length - 5, 5) + var sibling = new BranchChunk(spilled) + if (!me.parent) { + // Become the parent node + var copy = new BranchChunk(me.children) + copy.parent = me + me.children = [copy, sibling] + me = copy + } else { + me.size -= sibling.size + me.height -= sibling.height + var myIndex = indexOf(me.parent.children, me) + me.parent.children.splice(myIndex + 1, 0, sibling) + } + sibling.parent = me.parent + } while (me.children.length > 10) + me.parent.maybeSpill() + }, + + iterN: function(at, n, op) { + for (var i = 0; i < this.children.length; ++i) { + var child = this.children[i], + sz = child.chunkSize() + if (at < sz) { + var used = Math.min(n, sz - at) + if (child.iterN(at, used, op)) { + return true + } + if ((n -= used) == 0) { + break + } + at = 0 + } else { + at -= sz + } + } + } + } + + // Line widgets are block elements displayed above or below a line. + + var LineWidget = function(doc, node, options) { + if (options) { + for (var opt in options) { + if (options.hasOwnProperty(opt)) { + this[opt] = options[opt] + } + } + } + this.doc = doc + this.node = node + } + + LineWidget.prototype.clear = function() { + var cm = this.doc.cm, + ws = this.line.widgets, + line = this.line, + no = lineNo(line) + if (no == null || !ws) { + return + } + for (var i = 0; i < ws.length; ++i) { + if (ws[i] == this) { + ws.splice(i--, 1) + } + } + if (!ws.length) { + line.widgets = null + } + var height = widgetHeight(this) + updateLineHeight(line, Math.max(0, line.height - height)) + if (cm) { + runInOp(cm, function() { + adjustScrollWhenAboveVisible(cm, line, -height) + regLineChange(cm, no, "widget") + }) + signalLater(cm, "lineWidgetCleared", cm, this, no) + } + } + + LineWidget.prototype.changed = function() { + var this$1 = this + + var oldH = this.height, + cm = this.doc.cm, + line = this.line + this.height = null + var diff = widgetHeight(this) - oldH + if (!diff) { + return + } + if (!lineIsHidden(this.doc, line)) { + updateLineHeight(line, line.height + diff) + } + if (cm) { + runInOp(cm, function() { + cm.curOp.forceUpdate = true + adjustScrollWhenAboveVisible(cm, line, diff) + signalLater(cm, "lineWidgetChanged", cm, this$1, lineNo(line)) + }) + } + } + eventMixin(LineWidget) + + function adjustScrollWhenAboveVisible(cm, line, diff) { + if (heightAtLine(line) < ((cm.curOp && cm.curOp.scrollTop) || cm.doc.scrollTop)) { + addToScrollTop(cm, diff) + } + } + + function addLineWidget(doc, handle, node, options) { + var widget = new LineWidget(doc, node, options) + var cm = doc.cm + if (cm && widget.noHScroll) { + cm.display.alignWidgets = true + } + changeLine(doc, handle, "widget", function(line) { + var widgets = line.widgets || (line.widgets = []) + if (widget.insertAt == null) { + widgets.push(widget) + } else { + widgets.splice( + Math.min(widgets.length - 1, Math.max(0, widget.insertAt)), + 0, + widget + ) + } + widget.line = line + if (cm && !lineIsHidden(doc, line)) { + var aboveVisible = heightAtLine(line) < doc.scrollTop + updateLineHeight(line, line.height + widgetHeight(widget)) + if (aboveVisible) { + addToScrollTop(cm, widget.height) + } + cm.curOp.forceUpdate = true + } + return true + }) + if (cm) { + signalLater( + cm, + "lineWidgetAdded", + cm, + widget, + typeof handle == "number" ? handle : lineNo(handle) + ) + } + return widget + } + + // TEXTMARKERS + + // Created with markText and setBookmark methods. A TextMarker is a + // handle that can be used to clear or find a marked position in the + // document. Line objects hold arrays (markedSpans) containing + // {from, to, marker} object pointing to such marker objects, and + // indicating that such a marker is present on that line. Multiple + // lines may point to the same marker when it spans across lines. + // The spans will have null for their from/to properties when the + // marker continues beyond the start/end of the line. Markers have + // links back to the lines they currently touch. + + // Collapsed markers have unique ids, in order to be able to order + // them, which is needed for uniquely determining an outer marker + // when they overlap (they may nest, but not partially overlap). + var nextMarkerId = 0 + + var TextMarker = function(doc, type) { + this.lines = [] + this.type = type + this.doc = doc + this.id = ++nextMarkerId + } + + // Clear the marker. + TextMarker.prototype.clear = function() { + if (this.explicitlyCleared) { + return + } + var cm = this.doc.cm, + withOp = cm && !cm.curOp + if (withOp) { + startOperation(cm) + } + if (hasHandler(this, "clear")) { + var found = this.find() + if (found) { + signalLater(this, "clear", found.from, found.to) + } + } + var min = null, + max = null + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i] + var span = getMarkedSpanFor(line.markedSpans, this) + if (cm && !this.collapsed) { + regLineChange(cm, lineNo(line), "text") + } else if (cm) { + if (span.to != null) { + max = lineNo(line) + } + if (span.from != null) { + min = lineNo(line) + } + } + line.markedSpans = removeMarkedSpan(line.markedSpans, span) + if (span.from == null && this.collapsed && !lineIsHidden(this.doc, line) && cm) { + updateLineHeight(line, textHeight(cm.display)) + } + } + if (cm && this.collapsed && !cm.options.lineWrapping) { + for (var i$1 = 0; i$1 < this.lines.length; ++i$1) { + var visual = visualLine(this.lines[i$1]), + len = lineLength(visual) + if (len > cm.display.maxLineLength) { + cm.display.maxLine = visual + cm.display.maxLineLength = len + cm.display.maxLineChanged = true + } + } + } + + if (min != null && cm && this.collapsed) { + regChange(cm, min, max + 1) + } + this.lines.length = 0 + this.explicitlyCleared = true + if (this.atomic && this.doc.cantEdit) { + this.doc.cantEdit = false + if (cm) { + reCheckSelection(cm.doc) + } + } + if (cm) { + signalLater(cm, "markerCleared", cm, this, min, max) + } + if (withOp) { + endOperation(cm) + } + if (this.parent) { + this.parent.clear() + } + } + + // Find the position of the marker in the document. Returns a {from, + // to} object by default. Side can be passed to get a specific side + // -- 0 (both), -1 (left), or 1 (right). When lineObj is true, the + // Pos objects returned contain a line object, rather than a line + // number (used to prevent looking up the same line twice). + TextMarker.prototype.find = function(side, lineObj) { + if (side == null && this.type == "bookmark") { + side = 1 + } + var from, to + for (var i = 0; i < this.lines.length; ++i) { + var line = this.lines[i] + var span = getMarkedSpanFor(line.markedSpans, this) + if (span.from != null) { + from = Pos(lineObj ? line : lineNo(line), span.from) + if (side == -1) { + return from + } + } + if (span.to != null) { + to = Pos(lineObj ? line : lineNo(line), span.to) + if (side == 1) { + return to + } + } + } + return from && { from: from, to: to } + } + + // Signals that the marker's widget changed, and surrounding layout + // should be recomputed. + TextMarker.prototype.changed = function() { + var this$1 = this + + var pos = this.find(-1, true), + widget = this, + cm = this.doc.cm + if (!pos || !cm) { + return + } + runInOp(cm, function() { + var line = pos.line, + lineN = lineNo(pos.line) + var view = findViewForLine(cm, lineN) + if (view) { + clearLineMeasurementCacheFor(view) + cm.curOp.selectionChanged = cm.curOp.forceUpdate = true + } + cm.curOp.updateMaxLine = true + if (!lineIsHidden(widget.doc, line) && widget.height != null) { + var oldHeight = widget.height + widget.height = null + var dHeight = widgetHeight(widget) - oldHeight + if (dHeight) { + updateLineHeight(line, line.height + dHeight) + } + } + signalLater(cm, "markerChanged", cm, this$1) + }) + } + + TextMarker.prototype.attachLine = function(line) { + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp + if (!op.maybeHiddenMarkers || indexOf(op.maybeHiddenMarkers, this) == -1) { + ;(op.maybeUnhiddenMarkers || (op.maybeUnhiddenMarkers = [])).push(this) + } + } + this.lines.push(line) + } + + TextMarker.prototype.detachLine = function(line) { + this.lines.splice(indexOf(this.lines, line), 1) + if (!this.lines.length && this.doc.cm) { + var op = this.doc.cm.curOp + ;(op.maybeHiddenMarkers || (op.maybeHiddenMarkers = [])).push(this) + } + } + eventMixin(TextMarker) + + // Create a marker, wire it up to the right lines, and + function markText(doc, from, to, options, type) { + // Shared markers (across linked documents) are handled separately + // (markTextShared will call out to this again, once per + // document). + if (options && options.shared) { + return markTextShared(doc, from, to, options, type) + } + // Ensure we are in an operation. + if (doc.cm && !doc.cm.curOp) { + return operation(doc.cm, markText)(doc, from, to, options, type) + } + + var marker = new TextMarker(doc, type), + diff = cmp(from, to) + if (options) { + copyObj(options, marker, false) + } + // Don't connect empty markers unless clearWhenEmpty is false + if (diff > 0 || (diff == 0 && marker.clearWhenEmpty !== false)) { + return marker + } + if (marker.replacedWith) { + // Showing up as a widget implies collapsed (widget replaces text) + marker.collapsed = true + marker.widgetNode = eltP("span", [marker.replacedWith], "CodeMirror-widget") + if (!options.handleMouseEvents) { + marker.widgetNode.setAttribute("cm-ignore-events", "true") + } + if (options.insertLeft) { + marker.widgetNode.insertLeft = true + } + } + if (marker.collapsed) { + if ( + conflictingCollapsedRange(doc, from.line, from, to, marker) || + (from.line != to.line && conflictingCollapsedRange(doc, to.line, from, to, marker)) + ) { + throw new Error("Inserting collapsed marker partially overlapping an existing one") + } + seeCollapsedSpans() + } + + if (marker.addToHistory) { + addChangeToHistory(doc, { from: from, to: to, origin: "markText" }, doc.sel, NaN) + } + + var curLine = from.line, + cm = doc.cm, + updateMaxLine + doc.iter(curLine, to.line + 1, function(line) { + if ( + cm && + marker.collapsed && + !cm.options.lineWrapping && + visualLine(line) == cm.display.maxLine + ) { + updateMaxLine = true + } + if (marker.collapsed && curLine != from.line) { + updateLineHeight(line, 0) + } + addMarkedSpan( + line, + new MarkedSpan( + marker, + curLine == from.line ? from.ch : null, + curLine == to.line ? to.ch : null + ) + ) + ++curLine + }) + // lineIsHidden depends on the presence of the spans, so needs a second pass + if (marker.collapsed) { + doc.iter(from.line, to.line + 1, function(line) { + if (lineIsHidden(doc, line)) { + updateLineHeight(line, 0) + } + }) + } + + if (marker.clearOnEnter) { + on(marker, "beforeCursorEnter", function() { + return marker.clear() + }) + } + + if (marker.readOnly) { + seeReadOnlySpans() + if (doc.history.done.length || doc.history.undone.length) { + doc.clearHistory() + } + } + if (marker.collapsed) { + marker.id = ++nextMarkerId + marker.atomic = true + } + if (cm) { + // Sync editor state + if (updateMaxLine) { + cm.curOp.updateMaxLine = true + } + if (marker.collapsed) { + regChange(cm, from.line, to.line + 1) + } else if ( + marker.className || + marker.startStyle || + marker.endStyle || + marker.css || + marker.attributes || + marker.title + ) { + for (var i = from.line; i <= to.line; i++) { + regLineChange(cm, i, "text") + } + } + if (marker.atomic) { + reCheckSelection(cm.doc) + } + signalLater(cm, "markerAdded", cm, marker) + } + return marker + } + + // SHARED TEXTMARKERS + + // A shared marker spans multiple linked documents. It is + // implemented as a meta-marker-object controlling multiple normal + // markers. + var SharedTextMarker = function(markers, primary) { + this.markers = markers + this.primary = primary + for (var i = 0; i < markers.length; ++i) { + markers[i].parent = this + } + } + + SharedTextMarker.prototype.clear = function() { + if (this.explicitlyCleared) { + return + } + this.explicitlyCleared = true + for (var i = 0; i < this.markers.length; ++i) { + this.markers[i].clear() + } + signalLater(this, "clear") + } + + SharedTextMarker.prototype.find = function(side, lineObj) { + return this.primary.find(side, lineObj) + } + eventMixin(SharedTextMarker) + + function markTextShared(doc, from, to, options, type) { + options = copyObj(options) + options.shared = false + var markers = [markText(doc, from, to, options, type)], + primary = markers[0] + var widget = options.widgetNode + linkedDocs(doc, function(doc) { + if (widget) { + options.widgetNode = widget.cloneNode(true) + } + markers.push(markText(doc, clipPos(doc, from), clipPos(doc, to), options, type)) + for (var i = 0; i < doc.linked.length; ++i) { + if (doc.linked[i].isParent) { + return + } + } + primary = lst(markers) + }) + return new SharedTextMarker(markers, primary) + } + + function findSharedMarkers(doc) { + return doc.findMarks(Pos(doc.first, 0), doc.clipPos(Pos(doc.lastLine())), function(m) { + return m.parent + }) + } + + function copySharedMarkers(doc, markers) { + for (var i = 0; i < markers.length; i++) { + var marker = markers[i], + pos = marker.find() + var mFrom = doc.clipPos(pos.from), + mTo = doc.clipPos(pos.to) + if (cmp(mFrom, mTo)) { + var subMark = markText(doc, mFrom, mTo, marker.primary, marker.primary.type) + marker.markers.push(subMark) + subMark.parent = marker + } + } + } + + function detachSharedMarkers(markers) { + var loop = function(i) { + var marker = markers[i], + linked = [marker.primary.doc] + linkedDocs(marker.primary.doc, function(d) { + return linked.push(d) + }) + for (var j = 0; j < marker.markers.length; j++) { + var subMarker = marker.markers[j] + if (indexOf(linked, subMarker.doc) == -1) { + subMarker.parent = null + marker.markers.splice(j--, 1) + } + } + } + + for (var i = 0; i < markers.length; i++) loop(i) + } + + var nextDocId = 0 + var Doc = function(text, mode, firstLine, lineSep, direction) { + if (!(this instanceof Doc)) { + return new Doc(text, mode, firstLine, lineSep, direction) + } + if (firstLine == null) { + firstLine = 0 + } + + BranchChunk.call(this, [new LeafChunk([new Line("", null)])]) + this.first = firstLine + this.scrollTop = this.scrollLeft = 0 + this.cantEdit = false + this.cleanGeneration = 1 + this.modeFrontier = this.highlightFrontier = firstLine + var start = Pos(firstLine, 0) + this.sel = simpleSelection(start) + this.history = new History(null) + this.id = ++nextDocId + this.modeOption = mode + this.lineSep = lineSep + this.direction = direction == "rtl" ? "rtl" : "ltr" + this.extend = false + + if (typeof text == "string") { + text = this.splitLines(text) + } + updateDoc(this, { from: start, to: start, text: text }) + setSelection(this, simpleSelection(start), sel_dontScroll) + } + + Doc.prototype = createObj(BranchChunk.prototype, { + constructor: Doc, + // Iterate over the document. Supports two forms -- with only one + // argument, it calls that for each line in the document. With + // three, it iterates over the range given by the first two (with + // the second being non-inclusive). + iter: function(from, to, op) { + if (op) { + this.iterN(from - this.first, to - from, op) + } else { + this.iterN(this.first, this.first + this.size, from) + } + }, + + // Non-public interface for adding and removing lines. + insert: function(at, lines) { + var height = 0 + for (var i = 0; i < lines.length; ++i) { + height += lines[i].height + } + this.insertInner(at - this.first, lines, height) + }, + remove: function(at, n) { + this.removeInner(at - this.first, n) + }, + + // From here, the methods are part of the public interface. Most + // are also available from CodeMirror (editor) instances. + + getValue: function(lineSep) { + var lines = getLines(this, this.first, this.first + this.size) + if (lineSep === false) { + return lines + } + return lines.join(lineSep || this.lineSeparator()) + }, + setValue: docMethodOp(function(code) { + var top = Pos(this.first, 0), + last = this.first + this.size - 1 + makeChange( + this, + { + from: top, + to: Pos(last, getLine(this, last).text.length), + text: this.splitLines(code), + origin: "setValue", + full: true + }, + true + ) + if (this.cm) { + scrollToCoords(this.cm, 0, 0) + } + setSelection(this, simpleSelection(top), sel_dontScroll) + }), + replaceRange: function(code, from, to, origin) { + from = clipPos(this, from) + to = to ? clipPos(this, to) : from + replaceRange(this, code, from, to, origin) + }, + getRange: function(from, to, lineSep) { + var lines = getBetween(this, clipPos(this, from), clipPos(this, to)) + if (lineSep === false) { + return lines + } + return lines.join(lineSep || this.lineSeparator()) + }, + + getLine: function(line) { + var l = this.getLineHandle(line) + return l && l.text + }, + + getLineHandle: function(line) { + if (isLine(this, line)) { + return getLine(this, line) + } + }, + getLineNumber: function(line) { + return lineNo(line) + }, + + getLineHandleVisualStart: function(line) { + if (typeof line == "number") { + line = getLine(this, line) + } + return visualLine(line) + }, + + lineCount: function() { + return this.size + }, + firstLine: function() { + return this.first + }, + lastLine: function() { + return this.first + this.size - 1 + }, + + clipPos: function(pos) { + return clipPos(this, pos) + }, + + getCursor: function(start) { + var range = this.sel.primary(), + pos + if (start == null || start == "head") { + pos = range.head + } else if (start == "anchor") { + pos = range.anchor + } else if (start == "end" || start == "to" || start === false) { + pos = range.to() + } else { + pos = range.from() + } + return pos + }, + listSelections: function() { + return this.sel.ranges + }, + somethingSelected: function() { + return this.sel.somethingSelected() + }, + + setCursor: docMethodOp(function(line, ch, options) { + setSimpleSelection( + this, + clipPos(this, typeof line == "number" ? Pos(line, ch || 0) : line), + null, + options + ) + }), + setSelection: docMethodOp(function(anchor, head, options) { + setSimpleSelection(this, clipPos(this, anchor), clipPos(this, head || anchor), options) + }), + extendSelection: docMethodOp(function(head, other, options) { + extendSelection(this, clipPos(this, head), other && clipPos(this, other), options) + }), + extendSelections: docMethodOp(function(heads, options) { + extendSelections(this, clipPosArray(this, heads), options) + }), + extendSelectionsBy: docMethodOp(function(f, options) { + var heads = map(this.sel.ranges, f) + extendSelections(this, clipPosArray(this, heads), options) + }), + setSelections: docMethodOp(function(ranges, primary, options) { + if (!ranges.length) { + return + } + var out = [] + for (var i = 0; i < ranges.length; i++) { + out[i] = new Range(clipPos(this, ranges[i].anchor), clipPos(this, ranges[i].head)) + } + if (primary == null) { + primary = Math.min(ranges.length - 1, this.sel.primIndex) + } + setSelection(this, normalizeSelection(this.cm, out, primary), options) + }), + addSelection: docMethodOp(function(anchor, head, options) { + var ranges = this.sel.ranges.slice(0) + ranges.push(new Range(clipPos(this, anchor), clipPos(this, head || anchor))) + setSelection(this, normalizeSelection(this.cm, ranges, ranges.length - 1), options) + }), + + getSelection: function(lineSep) { + var ranges = this.sel.ranges, + lines + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()) + lines = lines ? lines.concat(sel) : sel + } + if (lineSep === false) { + return lines + } else { + return lines.join(lineSep || this.lineSeparator()) + } + }, + getSelections: function(lineSep) { + var parts = [], + ranges = this.sel.ranges + for (var i = 0; i < ranges.length; i++) { + var sel = getBetween(this, ranges[i].from(), ranges[i].to()) + if (lineSep !== false) { + sel = sel.join(lineSep || this.lineSeparator()) + } + parts[i] = sel + } + return parts + }, + replaceSelection: function(code, collapse, origin) { + var dup = [] + for (var i = 0; i < this.sel.ranges.length; i++) { + dup[i] = code + } + this.replaceSelections(dup, collapse, origin || "+input") + }, + replaceSelections: docMethodOp(function(code, collapse, origin) { + var changes = [], + sel = this.sel + for (var i = 0; i < sel.ranges.length; i++) { + var range = sel.ranges[i] + changes[i] = { + from: range.from(), + to: range.to(), + text: this.splitLines(code[i]), + origin: origin + } + } + var newSel = + collapse && collapse != "end" && computeReplacedSel(this, changes, collapse) + for (var i$1 = changes.length - 1; i$1 >= 0; i$1--) { + makeChange(this, changes[i$1]) + } + if (newSel) { + setSelectionReplaceHistory(this, newSel) + } else if (this.cm) { + ensureCursorVisible(this.cm) + } + }), + undo: docMethodOp(function() { + makeChangeFromHistory(this, "undo") + }), + redo: docMethodOp(function() { + makeChangeFromHistory(this, "redo") + }), + undoSelection: docMethodOp(function() { + makeChangeFromHistory(this, "undo", true) + }), + redoSelection: docMethodOp(function() { + makeChangeFromHistory(this, "redo", true) + }), + + setExtending: function(val) { + this.extend = val + }, + getExtending: function() { + return this.extend + }, + + historySize: function() { + var hist = this.history, + done = 0, + undone = 0 + for (var i = 0; i < hist.done.length; i++) { + if (!hist.done[i].ranges) { + ++done + } + } + for (var i$1 = 0; i$1 < hist.undone.length; i$1++) { + if (!hist.undone[i$1].ranges) { + ++undone + } + } + return { undo: done, redo: undone } + }, + clearHistory: function() { + var this$1 = this + + this.history = new History(this.history.maxGeneration) + linkedDocs( + this, + function(doc) { + return (doc.history = this$1.history) + }, + true + ) + }, + + markClean: function() { + this.cleanGeneration = this.changeGeneration(true) + }, + changeGeneration: function(forceSplit) { + if (forceSplit) { + this.history.lastOp = this.history.lastSelOp = this.history.lastOrigin = null + } + return this.history.generation + }, + isClean: function(gen) { + return this.history.generation == (gen || this.cleanGeneration) + }, + + getHistory: function() { + return { + done: copyHistoryArray(this.history.done), + undone: copyHistoryArray(this.history.undone) + } + }, + setHistory: function(histData) { + var hist = (this.history = new History(this.history.maxGeneration)) + hist.done = copyHistoryArray(histData.done.slice(0), null, true) + hist.undone = copyHistoryArray(histData.undone.slice(0), null, true) + }, + + setGutterMarker: docMethodOp(function(line, gutterID, value) { + return changeLine(this, line, "gutter", function(line) { + var markers = line.gutterMarkers || (line.gutterMarkers = {}) + markers[gutterID] = value + if (!value && isEmpty(markers)) { + line.gutterMarkers = null + } + return true + }) + }), + + clearGutter: docMethodOp(function(gutterID) { + var this$1 = this + + this.iter(function(line) { + if (line.gutterMarkers && line.gutterMarkers[gutterID]) { + changeLine(this$1, line, "gutter", function() { + line.gutterMarkers[gutterID] = null + if (isEmpty(line.gutterMarkers)) { + line.gutterMarkers = null + } + return true + }) + } + }) + }), + + lineInfo: function(line) { + var n + if (typeof line == "number") { + if (!isLine(this, line)) { + return null + } + n = line + line = getLine(this, line) + if (!line) { + return null + } + } else { + n = lineNo(line) + if (n == null) { + return null + } + } + return { + line: n, + handle: line, + text: line.text, + gutterMarkers: line.gutterMarkers, + textClass: line.textClass, + bgClass: line.bgClass, + wrapClass: line.wrapClass, + widgets: line.widgets + } + }, + + addLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { + var prop = + where == "text" + ? "textClass" + : where == "background" + ? "bgClass" + : where == "gutter" + ? "gutterClass" + : "wrapClass" + if (!line[prop]) { + line[prop] = cls + } else if (classTest(cls).test(line[prop])) { + return false + } else { + line[prop] += " " + cls + } + return true + }) + }), + removeLineClass: docMethodOp(function(handle, where, cls) { + return changeLine(this, handle, where == "gutter" ? "gutter" : "class", function(line) { + var prop = + where == "text" + ? "textClass" + : where == "background" + ? "bgClass" + : where == "gutter" + ? "gutterClass" + : "wrapClass" + var cur = line[prop] + if (!cur) { + return false + } else if (cls == null) { + line[prop] = null + } else { + var found = cur.match(classTest(cls)) + if (!found) { + return false + } + var end = found.index + found[0].length + line[prop] = + cur.slice(0, found.index) + + (!found.index || end == cur.length ? "" : " ") + + cur.slice(end) || null + } + return true + }) + }), + + addLineWidget: docMethodOp(function(handle, node, options) { + return addLineWidget(this, handle, node, options) + }), + removeLineWidget: function(widget) { + widget.clear() + }, + + markText: function(from, to, options) { + return markText( + this, + clipPos(this, from), + clipPos(this, to), + options, + (options && options.type) || "range" + ) + }, + setBookmark: function(pos, options) { + var realOpts = { + replacedWith: options && (options.nodeType == null ? options.widget : options), + insertLeft: options && options.insertLeft, + clearWhenEmpty: false, + shared: options && options.shared, + handleMouseEvents: options && options.handleMouseEvents + } + pos = clipPos(this, pos) + return markText(this, pos, pos, realOpts, "bookmark") + }, + findMarksAt: function(pos) { + pos = clipPos(this, pos) + var markers = [], + spans = getLine(this, pos.line).markedSpans + if (spans) { + for (var i = 0; i < spans.length; ++i) { + var span = spans[i] + if ( + (span.from == null || span.from <= pos.ch) && + (span.to == null || span.to >= pos.ch) + ) { + markers.push(span.marker.parent || span.marker) + } + } + } + return markers + }, + findMarks: function(from, to, filter) { + from = clipPos(this, from) + to = clipPos(this, to) + var found = [], + lineNo = from.line + this.iter(from.line, to.line + 1, function(line) { + var spans = line.markedSpans + if (spans) { + for (var i = 0; i < spans.length; i++) { + var span = spans[i] + if ( + !( + (span.to != null && lineNo == from.line && from.ch >= span.to) || + (span.from == null && lineNo != from.line) || + (span.from != null && lineNo == to.line && span.from >= to.ch) + ) && + (!filter || filter(span.marker)) + ) { + found.push(span.marker.parent || span.marker) + } + } + } + ++lineNo + }) + return found + }, + getAllMarks: function() { + var markers = [] + this.iter(function(line) { + var sps = line.markedSpans + if (sps) { + for (var i = 0; i < sps.length; ++i) { + if (sps[i].from != null) { + markers.push(sps[i].marker) + } + } + } + }) + return markers + }, + + posFromIndex: function(off) { + var ch, + lineNo = this.first, + sepSize = this.lineSeparator().length + this.iter(function(line) { + var sz = line.text.length + sepSize + if (sz > off) { + ch = off + return true + } + off -= sz + ++lineNo + }) + return clipPos(this, Pos(lineNo, ch)) + }, + indexFromPos: function(coords) { + coords = clipPos(this, coords) + var index = coords.ch + if (coords.line < this.first || coords.ch < 0) { + return 0 + } + var sepSize = this.lineSeparator().length + this.iter(this.first, coords.line, function(line) { + // iter aborts when callback returns a truthy value + index += line.text.length + sepSize + }) + return index + }, + + copy: function(copyHistory) { + var doc = new Doc( + getLines(this, this.first, this.first + this.size), + this.modeOption, + this.first, + this.lineSep, + this.direction + ) + doc.scrollTop = this.scrollTop + doc.scrollLeft = this.scrollLeft + doc.sel = this.sel + doc.extend = false + if (copyHistory) { + doc.history.undoDepth = this.history.undoDepth + doc.setHistory(this.getHistory()) + } + return doc + }, + + linkedDoc: function(options) { + if (!options) { + options = {} + } + var from = this.first, + to = this.first + this.size + if (options.from != null && options.from > from) { + from = options.from + } + if (options.to != null && options.to < to) { + to = options.to + } + var copy = new Doc( + getLines(this, from, to), + options.mode || this.modeOption, + from, + this.lineSep, + this.direction + ) + if (options.sharedHist) { + copy.history = this.history + } + ;(this.linked || (this.linked = [])).push({ doc: copy, sharedHist: options.sharedHist }) + copy.linked = [{ doc: this, isParent: true, sharedHist: options.sharedHist }] + copySharedMarkers(copy, findSharedMarkers(this)) + return copy + }, + unlinkDoc: function(other) { + if (other instanceof CodeMirror) { + other = other.doc + } + if (this.linked) { + for (var i = 0; i < this.linked.length; ++i) { + var link = this.linked[i] + if (link.doc != other) { + continue + } + this.linked.splice(i, 1) + other.unlinkDoc(this) + detachSharedMarkers(findSharedMarkers(this)) + break + } + } + // If the histories were shared, split them again + if (other.history == this.history) { + var splitIds = [other.id] + linkedDocs( + other, + function(doc) { + return splitIds.push(doc.id) + }, + true + ) + other.history = new History(null) + other.history.done = copyHistoryArray(this.history.done, splitIds) + other.history.undone = copyHistoryArray(this.history.undone, splitIds) + } + }, + iterLinkedDocs: function(f) { + linkedDocs(this, f) + }, + + getMode: function() { + return this.mode + }, + getEditor: function() { + return this.cm + }, + + splitLines: function(str) { + if (this.lineSep) { + return str.split(this.lineSep) + } + return splitLinesAuto(str) + }, + lineSeparator: function() { + return this.lineSep || "\n" + }, + + setDirection: docMethodOp(function(dir) { + if (dir != "rtl") { + dir = "ltr" + } + if (dir == this.direction) { + return + } + this.direction = dir + this.iter(function(line) { + return (line.order = null) + }) + if (this.cm) { + directionChanged(this.cm) + } + }) + }) + + // Public alias. + Doc.prototype.eachLine = Doc.prototype.iter + + // Kludge to work around strange IE behavior where it'll sometimes + // re-fire a series of drag-related events right after the drop (#1551) + var lastDrop = 0 + + function onDrop(e) { + var cm = this + clearDragCursor(cm) + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { + return + } + e_preventDefault(e) + if (ie) { + lastDrop = +new Date() + } + var pos = posFromMouse(cm, e, true), + files = e.dataTransfer.files + if (!pos || cm.isReadOnly()) { + return + } + // Might be a file drop, in which case we simply extract the text + // and insert it. + if (files && files.length && window.FileReader && window.File) { + var n = files.length, + text = Array(n), + read = 0 + var markAsReadAndPasteIfAllFilesAreRead = function() { + if (++read == n) { + operation(cm, function() { + pos = clipPos(cm.doc, pos) + var change = { + from: pos, + to: pos, + text: cm.doc.splitLines( + text + .filter(function(t) { + return t != null + }) + .join(cm.doc.lineSeparator()) + ), + origin: "paste" + } + makeChange(cm.doc, change) + setSelectionReplaceHistory( + cm.doc, + simpleSelection( + clipPos(cm.doc, pos), + clipPos(cm.doc, changeEnd(change)) + ) + ) + })() + } + } + var readTextFromFile = function(file, i) { + if ( + cm.options.allowDropFileTypes && + indexOf(cm.options.allowDropFileTypes, file.type) == -1 + ) { + markAsReadAndPasteIfAllFilesAreRead() + return + } + var reader = new FileReader() + reader.onerror = function() { + return markAsReadAndPasteIfAllFilesAreRead() + } + reader.onload = function() { + var content = reader.result + if (/[\x00-\x08\x0e-\x1f]{2}/.test(content)) { + markAsReadAndPasteIfAllFilesAreRead() + return + } + text[i] = content + markAsReadAndPasteIfAllFilesAreRead() + } + reader.readAsText(file) + } + for (var i = 0; i < files.length; i++) { + readTextFromFile(files[i], i) + } + } else { + // Normal drop + // Don't do a replace if the drop happened inside of the selected text. + if (cm.state.draggingText && cm.doc.sel.contains(pos) > -1) { + cm.state.draggingText(e) + // Ensure the editor is re-focused + setTimeout(function() { + return cm.display.input.focus() + }, 20) + return + } + try { + var text$1 = e.dataTransfer.getData("Text") + if (text$1) { + var selected + if (cm.state.draggingText && !cm.state.draggingText.copy) { + selected = cm.listSelections() + } + setSelectionNoUndo(cm.doc, simpleSelection(pos, pos)) + if (selected) { + for (var i$1 = 0; i$1 < selected.length; ++i$1) { + replaceRange( + cm.doc, + "", + selected[i$1].anchor, + selected[i$1].head, + "drag" + ) + } + } + cm.replaceSelection(text$1, "around", "paste") + cm.display.input.focus() + } + } catch (e) {} + } + } + + function onDragStart(cm, e) { + if (ie && (!cm.state.draggingText || +new Date() - lastDrop < 100)) { + e_stop(e) + return + } + if (signalDOMEvent(cm, e) || eventInWidget(cm.display, e)) { + return + } + + e.dataTransfer.setData("Text", cm.getSelection()) + e.dataTransfer.effectAllowed = "copyMove" + + // Use dummy image instead of default browsers image. + // Recent Safari (~6.0.2) have a tendency to segfault when this happens, so we don't do it there. + if (e.dataTransfer.setDragImage && !safari) { + var img = elt("img", null, null, "position: fixed; left: 0; top: 0;") + img.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==" + if (presto) { + img.width = img.height = 1 + cm.display.wrapper.appendChild(img) + // Force a relayout, or Opera won't use our image for some obscure reason + img._top = img.offsetTop + } + e.dataTransfer.setDragImage(img, 0, 0) + if (presto) { + img.parentNode.removeChild(img) + } + } + } + + function onDragOver(cm, e) { + var pos = posFromMouse(cm, e) + if (!pos) { + return + } + var frag = document.createDocumentFragment() + drawSelectionCursor(cm, pos, frag) + if (!cm.display.dragCursor) { + cm.display.dragCursor = elt("div", null, "CodeMirror-cursors CodeMirror-dragcursors") + cm.display.lineSpace.insertBefore(cm.display.dragCursor, cm.display.cursorDiv) + } + removeChildrenAndAdd(cm.display.dragCursor, frag) + } + + function clearDragCursor(cm) { + if (cm.display.dragCursor) { + cm.display.lineSpace.removeChild(cm.display.dragCursor) + cm.display.dragCursor = null + } + } + + // These must be handled carefully, because naively registering a + // handler for each editor will cause the editors to never be + // garbage collected. + + function forEachCodeMirror(f) { + if (!document.getElementsByClassName) { + return + } + var byClass = document.getElementsByClassName("CodeMirror"), + editors = [] + for (var i = 0; i < byClass.length; i++) { + var cm = byClass[i].CodeMirror + if (cm) { + editors.push(cm) + } + } + if (editors.length) { + editors[0].operation(function() { + for (var i = 0; i < editors.length; i++) { + f(editors[i]) + } + }) + } + } + + var globalsRegistered = false + function ensureGlobalHandlers() { + if (globalsRegistered) { + return + } + registerGlobalHandlers() + globalsRegistered = true + } + function registerGlobalHandlers() { + // When the window resizes, we need to refresh active editors. + var resizeTimer + on(window, "resize", function() { + if (resizeTimer == null) { + resizeTimer = setTimeout(function() { + resizeTimer = null + forEachCodeMirror(onResize) + }, 100) + } + }) + // When the window loses focus, we want to show the editor as blurred + on(window, "blur", function() { + return forEachCodeMirror(onBlur) + }) + } + // Called when the window resizes + function onResize(cm) { + var d = cm.display + // Might be a text scaling operation, clear size caches. + d.cachedCharWidth = d.cachedTextHeight = d.cachedPaddingH = null + d.scrollbarsClipped = false + cm.setSize() + } + + var keyNames = { + 3: "Pause", + 8: "Backspace", + 9: "Tab", + 13: "Enter", + 16: "Shift", + 17: "Ctrl", + 18: "Alt", + 19: "Pause", + 20: "CapsLock", + 27: "Esc", + 32: "Space", + 33: "PageUp", + 34: "PageDown", + 35: "End", + 36: "Home", + 37: "Left", + 38: "Up", + 39: "Right", + 40: "Down", + 44: "PrintScrn", + 45: "Insert", + 46: "Delete", + 59: ";", + 61: "=", + 91: "Mod", + 92: "Mod", + 93: "Mod", + 106: "*", + 107: "=", + 109: "-", + 110: ".", + 111: "/", + 145: "ScrollLock", + 173: "-", + 186: ";", + 187: "=", + 188: ",", + 189: "-", + 190: ".", + 191: "/", + 192: "`", + 219: "[", + 220: "\\", + 221: "]", + 222: "'", + 63232: "Up", + 63233: "Down", + 63234: "Left", + 63235: "Right", + 63272: "Delete", + 63273: "Home", + 63275: "End", + 63276: "PageUp", + 63277: "PageDown", + 63302: "Insert" + } + + // Number keys + for (var i = 0; i < 10; i++) { + keyNames[i + 48] = keyNames[i + 96] = String(i) + } + // Alphabetic keys + for (var i$1 = 65; i$1 <= 90; i$1++) { + keyNames[i$1] = String.fromCharCode(i$1) + } + // Function keys + for (var i$2 = 1; i$2 <= 12; i$2++) { + keyNames[i$2 + 111] = keyNames[i$2 + 63235] = "F" + i$2 + } + + var keyMap = {} + + keyMap.basic = { + Left: "goCharLeft", + Right: "goCharRight", + Up: "goLineUp", + Down: "goLineDown", + End: "goLineEnd", + Home: "goLineStartSmart", + PageUp: "goPageUp", + PageDown: "goPageDown", + Delete: "delCharAfter", + Backspace: "delCharBefore", + "Shift-Backspace": "delCharBefore", + Tab: "defaultTab", + "Shift-Tab": "indentAuto", + Enter: "newlineAndIndent", + Insert: "toggleOverwrite", + Esc: "singleSelection" + } + // Note that the save and find-related commands aren't defined by + // default. User code or addons can define them. Unknown commands + // are simply ignored. + keyMap.pcDefault = { + "Ctrl-A": "selectAll", + "Ctrl-D": "deleteLine", + "Ctrl-Z": "undo", + "Shift-Ctrl-Z": "redo", + "Ctrl-Y": "redo", + "Ctrl-Home": "goDocStart", + "Ctrl-End": "goDocEnd", + "Ctrl-Up": "goLineUp", + "Ctrl-Down": "goLineDown", + "Ctrl-Left": "goGroupLeft", + "Ctrl-Right": "goGroupRight", + "Alt-Left": "goLineStart", + "Alt-Right": "goLineEnd", + "Ctrl-Backspace": "delGroupBefore", + "Ctrl-Delete": "delGroupAfter", + "Ctrl-S": "save", + "Ctrl-F": "find", + "Ctrl-G": "findNext", + "Shift-Ctrl-G": "findPrev", + "Shift-Ctrl-F": "replace", + "Shift-Ctrl-R": "replaceAll", + "Ctrl-[": "indentLess", + "Ctrl-]": "indentMore", + "Ctrl-U": "undoSelection", + "Shift-Ctrl-U": "redoSelection", + "Alt-U": "redoSelection", + fallthrough: "basic" + } + // Very basic readline/emacs-style bindings, which are standard on Mac. + keyMap.emacsy = { + "Ctrl-F": "goCharRight", + "Ctrl-B": "goCharLeft", + "Ctrl-P": "goLineUp", + "Ctrl-N": "goLineDown", + "Alt-F": "goWordRight", + "Alt-B": "goWordLeft", + "Ctrl-A": "goLineStart", + "Ctrl-E": "goLineEnd", + "Ctrl-V": "goPageDown", + "Shift-Ctrl-V": "goPageUp", + "Ctrl-D": "delCharAfter", + "Ctrl-H": "delCharBefore", + "Alt-D": "delWordAfter", + "Alt-Backspace": "delWordBefore", + "Ctrl-K": "killLine", + "Ctrl-T": "transposeChars", + "Ctrl-O": "openLine" + } + keyMap.macDefault = { + "Cmd-A": "selectAll", + "Cmd-D": "deleteLine", + "Cmd-Z": "undo", + "Shift-Cmd-Z": "redo", + "Cmd-Y": "redo", + "Cmd-Home": "goDocStart", + "Cmd-Up": "goDocStart", + "Cmd-End": "goDocEnd", + "Cmd-Down": "goDocEnd", + "Alt-Left": "goGroupLeft", + "Alt-Right": "goGroupRight", + "Cmd-Left": "goLineLeft", + "Cmd-Right": "goLineRight", + "Alt-Backspace": "delGroupBefore", + "Ctrl-Alt-Backspace": "delGroupAfter", + "Alt-Delete": "delGroupAfter", + "Cmd-S": "save", + "Cmd-F": "find", + "Cmd-G": "findNext", + "Shift-Cmd-G": "findPrev", + "Cmd-Alt-F": "replace", + "Shift-Cmd-Alt-F": "replaceAll", + "Cmd-[": "indentLess", + "Cmd-]": "indentMore", + "Cmd-Backspace": "delWrappedLineLeft", + "Cmd-Delete": "delWrappedLineRight", + "Cmd-U": "undoSelection", + "Shift-Cmd-U": "redoSelection", + "Ctrl-Up": "goDocStart", + "Ctrl-Down": "goDocEnd", + fallthrough: ["basic", "emacsy"] + } + keyMap["default"] = mac ? keyMap.macDefault : keyMap.pcDefault + + // KEYMAP DISPATCH + + function normalizeKeyName(name) { + var parts = name.split(/-(?!$)/) + name = parts[parts.length - 1] + var alt, ctrl, shift, cmd + for (var i = 0; i < parts.length - 1; i++) { + var mod = parts[i] + if (/^(cmd|meta|m)$/i.test(mod)) { + cmd = true + } else if (/^a(lt)?$/i.test(mod)) { + alt = true + } else if (/^(c|ctrl|control)$/i.test(mod)) { + ctrl = true + } else if (/^s(hift)?$/i.test(mod)) { + shift = true + } else { + throw new Error("Unrecognized modifier name: " + mod) + } + } + if (alt) { + name = "Alt-" + name + } + if (ctrl) { + name = "Ctrl-" + name + } + if (cmd) { + name = "Cmd-" + name + } + if (shift) { + name = "Shift-" + name + } + return name + } + + // This is a kludge to keep keymaps mostly working as raw objects + // (backwards compatibility) while at the same time support features + // like normalization and multi-stroke key bindings. It compiles a + // new normalized keymap, and then updates the old object to reflect + // this. + function normalizeKeyMap(keymap) { + var copy = {} + for (var keyname in keymap) { + if (keymap.hasOwnProperty(keyname)) { + var value = keymap[keyname] + if (/^(name|fallthrough|(de|at)tach)$/.test(keyname)) { + continue + } + if (value == "...") { + delete keymap[keyname] + continue + } + + var keys = map(keyname.split(" "), normalizeKeyName) + for (var i = 0; i < keys.length; i++) { + var val = void 0, + name = void 0 + if (i == keys.length - 1) { + name = keys.join(" ") + val = value + } else { + name = keys.slice(0, i + 1).join(" ") + val = "..." + } + var prev = copy[name] + if (!prev) { + copy[name] = val + } else if (prev != val) { + throw new Error("Inconsistent bindings for " + name) + } + } + delete keymap[keyname] + } + } + for (var prop in copy) { + keymap[prop] = copy[prop] + } + return keymap + } + + function lookupKey(key, map, handle, context) { + map = getKeyMap(map) + var found = map.call ? map.call(key, context) : map[key] + if (found === false) { + return "nothing" + } + if (found === "...") { + return "multi" + } + if (found != null && handle(found)) { + return "handled" + } + + if (map.fallthrough) { + if (Object.prototype.toString.call(map.fallthrough) != "[object Array]") { + return lookupKey(key, map.fallthrough, handle, context) + } + for (var i = 0; i < map.fallthrough.length; i++) { + var result = lookupKey(key, map.fallthrough[i], handle, context) + if (result) { + return result + } + } + } + } + + // Modifier key presses don't count as 'real' key presses for the + // purpose of keymap fallthrough. + function isModifierKey(value) { + var name = typeof value == "string" ? value : keyNames[value.keyCode] + return name == "Ctrl" || name == "Alt" || name == "Shift" || name == "Mod" + } + + function addModifierNames(name, event, noShift) { + var base = name + if (event.altKey && base != "Alt") { + name = "Alt-" + name + } + if ((flipCtrlCmd ? event.metaKey : event.ctrlKey) && base != "Ctrl") { + name = "Ctrl-" + name + } + if ((flipCtrlCmd ? event.ctrlKey : event.metaKey) && base != "Cmd") { + name = "Cmd-" + name + } + if (!noShift && event.shiftKey && base != "Shift") { + name = "Shift-" + name + } + return name + } + + // Look up the name of a key as indicated by an event object. + function keyName(event, noShift) { + if (presto && event.keyCode == 34 && event["char"]) { + return false + } + var name = keyNames[event.keyCode] + if (name == null || event.altGraphKey) { + return false + } + // Ctrl-ScrollLock has keyCode 3, same as Ctrl-Pause, + // so we'll use event.code when available (Chrome 48+, FF 38+, Safari 10.1+) + if (event.keyCode == 3 && event.code) { + name = event.code + } + return addModifierNames(name, event, noShift) + } + + function getKeyMap(val) { + return typeof val == "string" ? keyMap[val] : val + } + + // Helper for deleting text near the selection(s), used to implement + // backspace, delete, and similar functionality. + function deleteNearSelection(cm, compute) { + var ranges = cm.doc.sel.ranges, + kill = [] + // Build up a set of ranges to kill first, merging overlapping + // ranges. + for (var i = 0; i < ranges.length; i++) { + var toKill = compute(ranges[i]) + while (kill.length && cmp(toKill.from, lst(kill).to) <= 0) { + var replaced = kill.pop() + if (cmp(replaced.from, toKill.from) < 0) { + toKill.from = replaced.from + break + } + } + kill.push(toKill) + } + // Next, remove those actual ranges. + runInOp(cm, function() { + for (var i = kill.length - 1; i >= 0; i--) { + replaceRange(cm.doc, "", kill[i].from, kill[i].to, "+delete") + } + ensureCursorVisible(cm) + }) + } + + function moveCharLogically(line, ch, dir) { + var target = skipExtendingChars(line.text, ch + dir, dir) + return target < 0 || target > line.text.length ? null : target + } + + function moveLogically(line, start, dir) { + var ch = moveCharLogically(line, start.ch, dir) + return ch == null ? null : new Pos(start.line, ch, dir < 0 ? "after" : "before") + } + + function endOfLine(visually, cm, lineObj, lineNo, dir) { + if (visually) { + if (cm.doc.direction == "rtl") { + dir = -dir + } + var order = getOrder(lineObj, cm.doc.direction) + if (order) { + var part = dir < 0 ? lst(order) : order[0] + var moveInStorageOrder = dir < 0 == (part.level == 1) + var sticky = moveInStorageOrder ? "after" : "before" + var ch + // With a wrapped rtl chunk (possibly spanning multiple bidi parts), + // it could be that the last bidi part is not on the last visual line, + // since visual lines contain content order-consecutive chunks. + // Thus, in rtl, we are looking for the first (content-order) character + // in the rtl chunk that is on the last line (that is, the same line + // as the last (content-order) character). + if (part.level > 0 || cm.doc.direction == "rtl") { + var prep = prepareMeasureForLine(cm, lineObj) + ch = dir < 0 ? lineObj.text.length - 1 : 0 + var targetTop = measureCharPrepared(cm, prep, ch).top + ch = findFirst( + function(ch) { + return measureCharPrepared(cm, prep, ch).top == targetTop + }, + dir < 0 == (part.level == 1) ? part.from : part.to - 1, + ch + ) + if (sticky == "before") { + ch = moveCharLogically(lineObj, ch, 1) + } + } else { + ch = dir < 0 ? part.to : part.from + } + return new Pos(lineNo, ch, sticky) + } + } + return new Pos(lineNo, dir < 0 ? lineObj.text.length : 0, dir < 0 ? "before" : "after") + } + + function moveVisually(cm, line, start, dir) { + var bidi = getOrder(line, cm.doc.direction) + if (!bidi) { + return moveLogically(line, start, dir) + } + if (start.ch >= line.text.length) { + start.ch = line.text.length + start.sticky = "before" + } else if (start.ch <= 0) { + start.ch = 0 + start.sticky = "after" + } + var partPos = getBidiPartAt(bidi, start.ch, start.sticky), + part = bidi[partPos] + if ( + cm.doc.direction == "ltr" && + part.level % 2 == 0 && + (dir > 0 ? part.to > start.ch : part.from < start.ch) + ) { + // Case 1: We move within an ltr part in an ltr editor. Even with wrapped lines, + // nothing interesting happens. + return moveLogically(line, start, dir) + } + + var mv = function(pos, dir) { + return moveCharLogically(line, pos instanceof Pos ? pos.ch : pos, dir) + } + var prep + var getWrappedLineExtent = function(ch) { + if (!cm.options.lineWrapping) { + return { begin: 0, end: line.text.length } + } + prep = prep || prepareMeasureForLine(cm, line) + return wrappedLineExtentChar(cm, line, prep, ch) + } + var wrappedLineExtent = getWrappedLineExtent( + start.sticky == "before" ? mv(start, -1) : start.ch + ) + + if (cm.doc.direction == "rtl" || part.level == 1) { + var moveInStorageOrder = (part.level == 1) == dir < 0 + var ch = mv(start, moveInStorageOrder ? 1 : -1) + if ( + ch != null && + (!moveInStorageOrder + ? ch >= part.from && ch >= wrappedLineExtent.begin + : ch <= part.to && ch <= wrappedLineExtent.end) + ) { + // Case 2: We move within an rtl part or in an rtl editor on the same visual line + var sticky = moveInStorageOrder ? "before" : "after" + return new Pos(start.line, ch, sticky) + } + } + + // Case 3: Could not move within this bidi part in this visual line, so leave + // the current bidi part + + var searchInVisualLine = function(partPos, dir, wrappedLineExtent) { + var getRes = function(ch, moveInStorageOrder) { + return moveInStorageOrder + ? new Pos(start.line, mv(ch, 1), "before") + : new Pos(start.line, ch, "after") + } + + for (; partPos >= 0 && partPos < bidi.length; partPos += dir) { + var part = bidi[partPos] + var moveInStorageOrder = dir > 0 == (part.level != 1) + var ch = moveInStorageOrder + ? wrappedLineExtent.begin + : mv(wrappedLineExtent.end, -1) + if (part.from <= ch && ch < part.to) { + return getRes(ch, moveInStorageOrder) + } + ch = moveInStorageOrder ? part.from : mv(part.to, -1) + if (wrappedLineExtent.begin <= ch && ch < wrappedLineExtent.end) { + return getRes(ch, moveInStorageOrder) + } + } + } + + // Case 3a: Look for other bidi parts on the same visual line + var res = searchInVisualLine(partPos + dir, dir, wrappedLineExtent) + if (res) { + return res + } + + // Case 3b: Look for other bidi parts on the next visual line + var nextCh = dir > 0 ? wrappedLineExtent.end : mv(wrappedLineExtent.begin, -1) + if (nextCh != null && !(dir > 0 && nextCh == line.text.length)) { + res = searchInVisualLine( + dir > 0 ? 0 : bidi.length - 1, + dir, + getWrappedLineExtent(nextCh) + ) + if (res) { + return res + } + } + + // Case 4: Nowhere to move + return null + } + + // Commands are parameter-less actions that can be performed on an + // editor, mostly used for keybindings. + var commands = { + selectAll: selectAll, + singleSelection: function(cm) { + return cm.setSelection(cm.getCursor("anchor"), cm.getCursor("head"), sel_dontScroll) + }, + killLine: function(cm) { + return deleteNearSelection(cm, function(range) { + if (range.empty()) { + var len = getLine(cm.doc, range.head.line).text.length + if (range.head.ch == len && range.head.line < cm.lastLine()) { + return { from: range.head, to: Pos(range.head.line + 1, 0) } + } else { + return { from: range.head, to: Pos(range.head.line, len) } + } + } else { + return { from: range.from(), to: range.to() } + } + }) + }, + deleteLine: function(cm) { + return deleteNearSelection(cm, function(range) { + return { + from: Pos(range.from().line, 0), + to: clipPos(cm.doc, Pos(range.to().line + 1, 0)) + } + }) + }, + delLineLeft: function(cm) { + return deleteNearSelection(cm, function(range) { + return { + from: Pos(range.from().line, 0), + to: range.from() + } + }) + }, + delWrappedLineLeft: function(cm) { + return deleteNearSelection(cm, function(range) { + var top = cm.charCoords(range.head, "div").top + 5 + var leftPos = cm.coordsChar({ left: 0, top: top }, "div") + return { from: leftPos, to: range.from() } + }) + }, + delWrappedLineRight: function(cm) { + return deleteNearSelection(cm, function(range) { + var top = cm.charCoords(range.head, "div").top + 5 + var rightPos = cm.coordsChar( + { left: cm.display.lineDiv.offsetWidth + 100, top: top }, + "div" + ) + return { from: range.from(), to: rightPos } + }) + }, + undo: function(cm) { + return cm.undo() + }, + redo: function(cm) { + return cm.redo() + }, + undoSelection: function(cm) { + return cm.undoSelection() + }, + redoSelection: function(cm) { + return cm.redoSelection() + }, + goDocStart: function(cm) { + return cm.extendSelection(Pos(cm.firstLine(), 0)) + }, + goDocEnd: function(cm) { + return cm.extendSelection(Pos(cm.lastLine())) + }, + goLineStart: function(cm) { + return cm.extendSelectionsBy( + function(range) { + return lineStart(cm, range.head.line) + }, + { origin: "+move", bias: 1 } + ) + }, + goLineStartSmart: function(cm) { + return cm.extendSelectionsBy( + function(range) { + return lineStartSmart(cm, range.head) + }, + { origin: "+move", bias: 1 } + ) + }, + goLineEnd: function(cm) { + return cm.extendSelectionsBy( + function(range) { + return lineEnd(cm, range.head.line) + }, + { origin: "+move", bias: -1 } + ) + }, + goLineRight: function(cm) { + return cm.extendSelectionsBy(function(range) { + var top = cm.cursorCoords(range.head, "div").top + 5 + return cm.coordsChar( + { left: cm.display.lineDiv.offsetWidth + 100, top: top }, + "div" + ) + }, sel_move) + }, + goLineLeft: function(cm) { + return cm.extendSelectionsBy(function(range) { + var top = cm.cursorCoords(range.head, "div").top + 5 + return cm.coordsChar({ left: 0, top: top }, "div") + }, sel_move) + }, + goLineLeftSmart: function(cm) { + return cm.extendSelectionsBy(function(range) { + var top = cm.cursorCoords(range.head, "div").top + 5 + var pos = cm.coordsChar({ left: 0, top: top }, "div") + if (pos.ch < cm.getLine(pos.line).search(/\S/)) { + return lineStartSmart(cm, range.head) + } + return pos + }, sel_move) + }, + goLineUp: function(cm) { + return cm.moveV(-1, "line") + }, + goLineDown: function(cm) { + return cm.moveV(1, "line") + }, + goPageUp: function(cm) { + return cm.moveV(-1, "page") + }, + goPageDown: function(cm) { + return cm.moveV(1, "page") + }, + goCharLeft: function(cm) { + return cm.moveH(-1, "char") + }, + goCharRight: function(cm) { + return cm.moveH(1, "char") + }, + goColumnLeft: function(cm) { + return cm.moveH(-1, "column") + }, + goColumnRight: function(cm) { + return cm.moveH(1, "column") + }, + goWordLeft: function(cm) { + return cm.moveH(-1, "word") + }, + goGroupRight: function(cm) { + return cm.moveH(1, "group") + }, + goGroupLeft: function(cm) { + return cm.moveH(-1, "group") + }, + goWordRight: function(cm) { + return cm.moveH(1, "word") + }, + delCharBefore: function(cm) { + return cm.deleteH(-1, "char") + }, + delCharAfter: function(cm) { + return cm.deleteH(1, "char") + }, + delWordBefore: function(cm) { + return cm.deleteH(-1, "word") + }, + delWordAfter: function(cm) { + return cm.deleteH(1, "word") + }, + delGroupBefore: function(cm) { + return cm.deleteH(-1, "group") + }, + delGroupAfter: function(cm) { + return cm.deleteH(1, "group") + }, + indentAuto: function(cm) { + return cm.indentSelection("smart") + }, + indentMore: function(cm) { + return cm.indentSelection("add") + }, + indentLess: function(cm) { + return cm.indentSelection("subtract") + }, + insertTab: function(cm) { + return cm.replaceSelection("\t") + }, + insertSoftTab: function(cm) { + var spaces = [], + ranges = cm.listSelections(), + tabSize = cm.options.tabSize + for (var i = 0; i < ranges.length; i++) { + var pos = ranges[i].from() + var col = countColumn(cm.getLine(pos.line), pos.ch, tabSize) + spaces.push(spaceStr(tabSize - (col % tabSize))) + } + cm.replaceSelections(spaces) + }, + defaultTab: function(cm) { + if (cm.somethingSelected()) { + cm.indentSelection("add") + } else { + cm.execCommand("insertTab") + } + }, + // Swap the two chars left and right of each selection's head. + // Move cursor behind the two swapped characters afterwards. + // + // Doesn't consider line feeds a character. + // Doesn't scan more than one line above to find a character. + // Doesn't do anything on an empty line. + // Doesn't do anything with non-empty selections. + transposeChars: function(cm) { + return runInOp(cm, function() { + var ranges = cm.listSelections(), + newSel = [] + for (var i = 0; i < ranges.length; i++) { + if (!ranges[i].empty()) { + continue + } + var cur = ranges[i].head, + line = getLine(cm.doc, cur.line).text + if (line) { + if (cur.ch == line.length) { + cur = new Pos(cur.line, cur.ch - 1) + } + if (cur.ch > 0) { + cur = new Pos(cur.line, cur.ch + 1) + cm.replaceRange( + line.charAt(cur.ch - 1) + line.charAt(cur.ch - 2), + Pos(cur.line, cur.ch - 2), + cur, + "+transpose" + ) + } else if (cur.line > cm.doc.first) { + var prev = getLine(cm.doc, cur.line - 1).text + if (prev) { + cur = new Pos(cur.line, 1) + cm.replaceRange( + line.charAt(0) + + cm.doc.lineSeparator() + + prev.charAt(prev.length - 1), + Pos(cur.line - 1, prev.length - 1), + cur, + "+transpose" + ) + } + } + } + newSel.push(new Range(cur, cur)) + } + cm.setSelections(newSel) + }) + }, + newlineAndIndent: function(cm) { + return runInOp(cm, function() { + var sels = cm.listSelections() + for (var i = sels.length - 1; i >= 0; i--) { + cm.replaceRange(cm.doc.lineSeparator(), sels[i].anchor, sels[i].head, "+input") + } + sels = cm.listSelections() + for (var i$1 = 0; i$1 < sels.length; i$1++) { + cm.indentLine(sels[i$1].from().line, null, true) + } + ensureCursorVisible(cm) + }) + }, + openLine: function(cm) { + return cm.replaceSelection("\n", "start") + }, + toggleOverwrite: function(cm) { + return cm.toggleOverwrite() + } + } + + function lineStart(cm, lineN) { + var line = getLine(cm.doc, lineN) + var visual = visualLine(line) + if (visual != line) { + lineN = lineNo(visual) + } + return endOfLine(true, cm, visual, lineN, 1) + } + function lineEnd(cm, lineN) { + var line = getLine(cm.doc, lineN) + var visual = visualLineEnd(line) + if (visual != line) { + lineN = lineNo(visual) + } + return endOfLine(true, cm, line, lineN, -1) + } + function lineStartSmart(cm, pos) { + var start = lineStart(cm, pos.line) + var line = getLine(cm.doc, start.line) + var order = getOrder(line, cm.doc.direction) + if (!order || order[0].level == 0) { + var firstNonWS = Math.max(start.ch, line.text.search(/\S/)) + var inWS = pos.line == start.line && pos.ch <= firstNonWS && pos.ch + return Pos(start.line, inWS ? 0 : firstNonWS, start.sticky) + } + return start + } + + // Run a handler that was bound to a key. + function doHandleBinding(cm, bound, dropShift) { + if (typeof bound == "string") { + bound = commands[bound] + if (!bound) { + return false + } + } + // Ensure previous input has been read, so that the handler sees a + // consistent view of the document + cm.display.input.ensurePolled() + var prevShift = cm.display.shift, + done = false + try { + if (cm.isReadOnly()) { + cm.state.suppressEdits = true + } + if (dropShift) { + cm.display.shift = false + } + done = bound(cm) != Pass + } finally { + cm.display.shift = prevShift + cm.state.suppressEdits = false + } + return done + } + + function lookupKeyForEditor(cm, name, handle) { + for (var i = 0; i < cm.state.keyMaps.length; i++) { + var result = lookupKey(name, cm.state.keyMaps[i], handle, cm) + if (result) { + return result + } + } + return ( + (cm.options.extraKeys && lookupKey(name, cm.options.extraKeys, handle, cm)) || + lookupKey(name, cm.options.keyMap, handle, cm) + ) + } + + // Note that, despite the name, this function is also used to check + // for bound mouse clicks. + + var stopSeq = new Delayed() + + function dispatchKey(cm, name, e, handle) { + var seq = cm.state.keySeq + if (seq) { + if (isModifierKey(name)) { + return "handled" + } + if (/\'$/.test(name)) { + cm.state.keySeq = null + } else { + stopSeq.set(50, function() { + if (cm.state.keySeq == seq) { + cm.state.keySeq = null + cm.display.input.reset() + } + }) + } + if (dispatchKeyInner(cm, seq + " " + name, e, handle)) { + return true + } + } + return dispatchKeyInner(cm, name, e, handle) + } + + function dispatchKeyInner(cm, name, e, handle) { + var result = lookupKeyForEditor(cm, name, handle) + + if (result == "multi") { + cm.state.keySeq = name + } + if (result == "handled") { + signalLater(cm, "keyHandled", cm, name, e) + } + + if (result == "handled" || result == "multi") { + e_preventDefault(e) + restartBlink(cm) + } + + return !!result + } + + // Handle a key from the keydown event. + function handleKeyBinding(cm, e) { + var name = keyName(e, true) + if (!name) { + return false + } + + if (e.shiftKey && !cm.state.keySeq) { + // First try to resolve full name (including 'Shift-'). Failing + // that, see if there is a cursor-motion command (starting with + // 'go') bound to the keyname without 'Shift-'. + return ( + dispatchKey(cm, "Shift-" + name, e, function(b) { + return doHandleBinding(cm, b, true) + }) || + dispatchKey(cm, name, e, function(b) { + if (typeof b == "string" ? /^go[A-Z]/.test(b) : b.motion) { + return doHandleBinding(cm, b) + } + }) + ) + } else { + return dispatchKey(cm, name, e, function(b) { + return doHandleBinding(cm, b) + }) + } + } + + // Handle a key from the keypress event + function handleCharBinding(cm, e, ch) { + return dispatchKey(cm, "'" + ch + "'", e, function(b) { + return doHandleBinding(cm, b, true) + }) + } + + var lastStoppedKey = null + function onKeyDown(e) { + var cm = this + cm.curOp.focus = activeElt() + if (signalDOMEvent(cm, e)) { + return + } + // IE does strange things with escape. + if (ie && ie_version < 11 && e.keyCode == 27) { + e.returnValue = false + } + var code = e.keyCode + cm.display.shift = code == 16 || e.shiftKey + var handled = handleKeyBinding(cm, e) + if (presto) { + lastStoppedKey = handled ? code : null + // Opera has no cut event... we try to at least catch the key combo + if (!handled && code == 88 && !hasCopyEvent && (mac ? e.metaKey : e.ctrlKey)) { + cm.replaceSelection("", null, "cut") + } + } + if ( + gecko && + !mac && + !handled && + code == 46 && + e.shiftKey && + !e.ctrlKey && + document.execCommand + ) { + document.execCommand("cut") + } + + // Turn mouse into crosshair when Alt is held on Mac. + if (code == 18 && !/\bCodeMirror-crosshair\b/.test(cm.display.lineDiv.className)) { + showCrossHair(cm) + } + } + + function showCrossHair(cm) { + var lineDiv = cm.display.lineDiv + addClass(lineDiv, "CodeMirror-crosshair") + + function up(e) { + if (e.keyCode == 18 || !e.altKey) { + rmClass(lineDiv, "CodeMirror-crosshair") + off(document, "keyup", up) + off(document, "mouseover", up) + } + } + on(document, "keyup", up) + on(document, "mouseover", up) + } + + function onKeyUp(e) { + if (e.keyCode == 16) { + this.doc.sel.shift = false + } + signalDOMEvent(this, e) + } + + function onKeyPress(e) { + var cm = this + if ( + eventInWidget(cm.display, e) || + signalDOMEvent(cm, e) || + (e.ctrlKey && !e.altKey) || + (mac && e.metaKey) + ) { + return + } + var keyCode = e.keyCode, + charCode = e.charCode + if (presto && keyCode == lastStoppedKey) { + lastStoppedKey = null + e_preventDefault(e) + return + } + if (presto && (!e.which || e.which < 10) && handleKeyBinding(cm, e)) { + return + } + var ch = String.fromCharCode(charCode == null ? keyCode : charCode) + // Some browsers fire keypress events for backspace + if (ch == "\x08") { + return + } + if (handleCharBinding(cm, e, ch)) { + return + } + cm.display.input.onKeyPress(e) + } + + var DOUBLECLICK_DELAY = 400 + + var PastClick = function(time, pos, button) { + this.time = time + this.pos = pos + this.button = button + } + + PastClick.prototype.compare = function(time, pos, button) { + return ( + this.time + DOUBLECLICK_DELAY > time && cmp(pos, this.pos) == 0 && button == this.button + ) + } + + var lastClick, lastDoubleClick + function clickRepeat(pos, button) { + var now = +new Date() + if (lastDoubleClick && lastDoubleClick.compare(now, pos, button)) { + lastClick = lastDoubleClick = null + return "triple" + } else if (lastClick && lastClick.compare(now, pos, button)) { + lastDoubleClick = new PastClick(now, pos, button) + lastClick = null + return "double" + } else { + lastClick = new PastClick(now, pos, button) + lastDoubleClick = null + return "single" + } + } + + // A mouse down can be a single click, double click, triple click, + // start of selection drag, start of text drag, new cursor + // (ctrl-click), rectangle drag (alt-drag), or xwin + // middle-click-paste. Or it might be a click on something we should + // not interfere with, such as a scrollbar or widget. + function onMouseDown(e) { + var cm = this, + display = cm.display + if (signalDOMEvent(cm, e) || (display.activeTouch && display.input.supportsTouch())) { + return + } + display.input.ensurePolled() + display.shift = e.shiftKey + + if (eventInWidget(display, e)) { + if (!webkit) { + // Briefly turn off draggability, to allow widgets to do + // normal dragging things. + display.scroller.draggable = false + setTimeout(function() { + return (display.scroller.draggable = true) + }, 100) + } + return + } + if (clickInGutter(cm, e)) { + return + } + var pos = posFromMouse(cm, e), + button = e_button(e), + repeat = pos ? clickRepeat(pos, button) : "single" + window.focus() + + // #3261: make sure, that we're not starting a second selection + if (button == 1 && cm.state.selectingText) { + cm.state.selectingText(e) + } + + if (pos && handleMappedButton(cm, button, pos, repeat, e)) { + return + } + + if (button == 1) { + if (pos) { + leftButtonDown(cm, pos, repeat, e) + } else if (e_target(e) == display.scroller) { + e_preventDefault(e) + } + } else if (button == 2) { + if (pos) { + extendSelection(cm.doc, pos) + } + setTimeout(function() { + return display.input.focus() + }, 20) + } else if (button == 3) { + if (captureRightClick) { + cm.display.input.onContextMenu(e) + } else { + delayBlurEvent(cm) + } + } + } + + function handleMappedButton(cm, button, pos, repeat, event) { + var name = "Click" + if (repeat == "double") { + name = "Double" + name + } else if (repeat == "triple") { + name = "Triple" + name + } + name = (button == 1 ? "Left" : button == 2 ? "Middle" : "Right") + name + + return dispatchKey(cm, addModifierNames(name, event), event, function(bound) { + if (typeof bound == "string") { + bound = commands[bound] + } + if (!bound) { + return false + } + var done = false + try { + if (cm.isReadOnly()) { + cm.state.suppressEdits = true + } + done = bound(cm, pos) != Pass + } finally { + cm.state.suppressEdits = false + } + return done + }) + } + + function configureMouse(cm, repeat, event) { + var option = cm.getOption("configureMouse") + var value = option ? option(cm, repeat, event) : {} + if (value.unit == null) { + var rect = chromeOS ? event.shiftKey && event.metaKey : event.altKey + value.unit = rect + ? "rectangle" + : repeat == "single" + ? "char" + : repeat == "double" + ? "word" + : "line" + } + if (value.extend == null || cm.doc.extend) { + value.extend = cm.doc.extend || event.shiftKey + } + if (value.addNew == null) { + value.addNew = mac ? event.metaKey : event.ctrlKey + } + if (value.moveOnDrag == null) { + value.moveOnDrag = !(mac ? event.altKey : event.ctrlKey) + } + return value + } + + function leftButtonDown(cm, pos, repeat, event) { + if (ie) { + setTimeout(bind(ensureFocus, cm), 0) + } else { + cm.curOp.focus = activeElt() + } + + var behavior = configureMouse(cm, repeat, event) + + var sel = cm.doc.sel, + contained + if ( + cm.options.dragDrop && + dragAndDrop && + !cm.isReadOnly() && + repeat == "single" && + (contained = sel.contains(pos)) > -1 && + (cmp((contained = sel.ranges[contained]).from(), pos) < 0 || pos.xRel > 0) && + (cmp(contained.to(), pos) > 0 || pos.xRel < 0) + ) { + leftButtonStartDrag(cm, event, pos, behavior) + } else { + leftButtonSelect(cm, event, pos, behavior) + } + } + + // Start a text drag. When it ends, see if any dragging actually + // happen, and treat as a click if it didn't. + function leftButtonStartDrag(cm, event, pos, behavior) { + var display = cm.display, + moved = false + var dragEnd = operation(cm, function(e) { + if (webkit) { + display.scroller.draggable = false + } + cm.state.draggingText = false + off(display.wrapper.ownerDocument, "mouseup", dragEnd) + off(display.wrapper.ownerDocument, "mousemove", mouseMove) + off(display.scroller, "dragstart", dragStart) + off(display.scroller, "drop", dragEnd) + if (!moved) { + e_preventDefault(e) + if (!behavior.addNew) { + extendSelection(cm.doc, pos, null, null, behavior.extend) + } + // Work around unexplainable focus problem in IE9 (#2127) and Chrome (#3081) + if (webkit || (ie && ie_version == 9)) { + setTimeout(function() { + display.wrapper.ownerDocument.body.focus() + display.input.focus() + }, 20) + } else { + display.input.focus() + } + } + }) + var mouseMove = function(e2) { + moved = + moved || + Math.abs(event.clientX - e2.clientX) + Math.abs(event.clientY - e2.clientY) >= 10 + } + var dragStart = function() { + return (moved = true) + } + // Let the drag handler handle this. + if (webkit) { + display.scroller.draggable = true + } + cm.state.draggingText = dragEnd + dragEnd.copy = !behavior.moveOnDrag + // IE's approach to draggable + if (display.scroller.dragDrop) { + display.scroller.dragDrop() + } + on(display.wrapper.ownerDocument, "mouseup", dragEnd) + on(display.wrapper.ownerDocument, "mousemove", mouseMove) + on(display.scroller, "dragstart", dragStart) + on(display.scroller, "drop", dragEnd) + + delayBlurEvent(cm) + setTimeout(function() { + return display.input.focus() + }, 20) + } + + function rangeForUnit(cm, pos, unit) { + if (unit == "char") { + return new Range(pos, pos) + } + if (unit == "word") { + return cm.findWordAt(pos) + } + if (unit == "line") { + return new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) + } + var result = unit(cm, pos) + return new Range(result.from, result.to) + } + + // Normal selection, as opposed to text dragging. + function leftButtonSelect(cm, event, start, behavior) { + var display = cm.display, + doc = cm.doc + e_preventDefault(event) + + var ourRange, + ourIndex, + startSel = doc.sel, + ranges = startSel.ranges + if (behavior.addNew && !behavior.extend) { + ourIndex = doc.sel.contains(start) + if (ourIndex > -1) { + ourRange = ranges[ourIndex] + } else { + ourRange = new Range(start, start) + } + } else { + ourRange = doc.sel.primary() + ourIndex = doc.sel.primIndex + } + + if (behavior.unit == "rectangle") { + if (!behavior.addNew) { + ourRange = new Range(start, start) + } + start = posFromMouse(cm, event, true, true) + ourIndex = -1 + } else { + var range = rangeForUnit(cm, start, behavior.unit) + if (behavior.extend) { + ourRange = extendRange(ourRange, range.anchor, range.head, behavior.extend) + } else { + ourRange = range + } + } + + if (!behavior.addNew) { + ourIndex = 0 + setSelection(doc, new Selection([ourRange], 0), sel_mouse) + startSel = doc.sel + } else if (ourIndex == -1) { + ourIndex = ranges.length + setSelection(doc, normalizeSelection(cm, ranges.concat([ourRange]), ourIndex), { + scroll: false, + origin: "*mouse" + }) + } else if ( + ranges.length > 1 && + ranges[ourIndex].empty() && + behavior.unit == "char" && + !behavior.extend + ) { + setSelection( + doc, + normalizeSelection( + cm, + ranges.slice(0, ourIndex).concat(ranges.slice(ourIndex + 1)), + 0 + ), + { scroll: false, origin: "*mouse" } + ) + startSel = doc.sel + } else { + replaceOneSelection(doc, ourIndex, ourRange, sel_mouse) + } + + var lastPos = start + function extendTo(pos) { + if (cmp(lastPos, pos) == 0) { + return + } + lastPos = pos + + if (behavior.unit == "rectangle") { + var ranges = [], + tabSize = cm.options.tabSize + var startCol = countColumn(getLine(doc, start.line).text, start.ch, tabSize) + var posCol = countColumn(getLine(doc, pos.line).text, pos.ch, tabSize) + var left = Math.min(startCol, posCol), + right = Math.max(startCol, posCol) + for ( + var line = Math.min(start.line, pos.line), + end = Math.min(cm.lastLine(), Math.max(start.line, pos.line)); + line <= end; + line++ + ) { + var text = getLine(doc, line).text, + leftPos = findColumn(text, left, tabSize) + if (left == right) { + ranges.push(new Range(Pos(line, leftPos), Pos(line, leftPos))) + } else if (text.length > leftPos) { + ranges.push( + new Range( + Pos(line, leftPos), + Pos(line, findColumn(text, right, tabSize)) + ) + ) + } + } + if (!ranges.length) { + ranges.push(new Range(start, start)) + } + setSelection( + doc, + normalizeSelection( + cm, + startSel.ranges.slice(0, ourIndex).concat(ranges), + ourIndex + ), + { origin: "*mouse", scroll: false } + ) + cm.scrollIntoView(pos) + } else { + var oldRange = ourRange + var range = rangeForUnit(cm, pos, behavior.unit) + var anchor = oldRange.anchor, + head + if (cmp(range.anchor, anchor) > 0) { + head = range.head + anchor = minPos(oldRange.from(), range.anchor) + } else { + head = range.anchor + anchor = maxPos(oldRange.to(), range.head) + } + var ranges$1 = startSel.ranges.slice(0) + ranges$1[ourIndex] = bidiSimplify(cm, new Range(clipPos(doc, anchor), head)) + setSelection(doc, normalizeSelection(cm, ranges$1, ourIndex), sel_mouse) + } + } + + var editorSize = display.wrapper.getBoundingClientRect() + // Used to ensure timeout re-tries don't fire when another extend + // happened in the meantime (clearTimeout isn't reliable -- at + // least on Chrome, the timeouts still happen even when cleared, + // if the clear happens after their scheduled firing time). + var counter = 0 + + function extend(e) { + var curCount = ++counter + var cur = posFromMouse(cm, e, true, behavior.unit == "rectangle") + if (!cur) { + return + } + if (cmp(cur, lastPos) != 0) { + cm.curOp.focus = activeElt() + extendTo(cur) + var visible = visibleLines(display, doc) + if (cur.line >= visible.to || cur.line < visible.from) { + setTimeout( + operation(cm, function() { + if (counter == curCount) { + extend(e) + } + }), + 150 + ) + } + } else { + var outside = + e.clientY < editorSize.top ? -20 : e.clientY > editorSize.bottom ? 20 : 0 + if (outside) { + setTimeout( + operation(cm, function() { + if (counter != curCount) { + return + } + display.scroller.scrollTop += outside + extend(e) + }), + 50 + ) + } + } + } + + function done(e) { + cm.state.selectingText = false + counter = Infinity + // If e is null or undefined we interpret this as someone trying + // to explicitly cancel the selection rather than the user + // letting go of the mouse button. + if (e) { + e_preventDefault(e) + display.input.focus() + } + off(display.wrapper.ownerDocument, "mousemove", move) + off(display.wrapper.ownerDocument, "mouseup", up) + doc.history.lastSelOrigin = null + } + + var move = operation(cm, function(e) { + if (e.buttons === 0 || !e_button(e)) { + done(e) + } else { + extend(e) + } + }) + var up = operation(cm, done) + cm.state.selectingText = up + on(display.wrapper.ownerDocument, "mousemove", move) + on(display.wrapper.ownerDocument, "mouseup", up) + } + + // Used when mouse-selecting to adjust the anchor to the proper side + // of a bidi jump depending on the visual position of the head. + function bidiSimplify(cm, range) { + var anchor = range.anchor + var head = range.head + var anchorLine = getLine(cm.doc, anchor.line) + if (cmp(anchor, head) == 0 && anchor.sticky == head.sticky) { + return range + } + var order = getOrder(anchorLine) + if (!order) { + return range + } + var index = getBidiPartAt(order, anchor.ch, anchor.sticky), + part = order[index] + if (part.from != anchor.ch && part.to != anchor.ch) { + return range + } + var boundary = index + ((part.from == anchor.ch) == (part.level != 1) ? 0 : 1) + if (boundary == 0 || boundary == order.length) { + return range + } + + // Compute the relative visual position of the head compared to the + // anchor (<0 is to the left, >0 to the right) + var leftSide + if (head.line != anchor.line) { + leftSide = (head.line - anchor.line) * (cm.doc.direction == "ltr" ? 1 : -1) > 0 + } else { + var headIndex = getBidiPartAt(order, head.ch, head.sticky) + var dir = headIndex - index || (head.ch - anchor.ch) * (part.level == 1 ? -1 : 1) + if (headIndex == boundary - 1 || headIndex == boundary) { + leftSide = dir < 0 + } else { + leftSide = dir > 0 + } + } + + var usePart = order[boundary + (leftSide ? -1 : 0)] + var from = leftSide == (usePart.level == 1) + var ch = from ? usePart.from : usePart.to, + sticky = from ? "after" : "before" + return anchor.ch == ch && anchor.sticky == sticky + ? range + : new Range(new Pos(anchor.line, ch, sticky), head) + } + + // Determines whether an event happened in the gutter, and fires the + // handlers for the corresponding event. + function gutterEvent(cm, e, type, prevent) { + var mX, mY + if (e.touches) { + mX = e.touches[0].clientX + mY = e.touches[0].clientY + } else { + try { + mX = e.clientX + mY = e.clientY + } catch (e) { + return false + } + } + if (mX >= Math.floor(cm.display.gutters.getBoundingClientRect().right)) { + return false + } + if (prevent) { + e_preventDefault(e) + } + + var display = cm.display + var lineBox = display.lineDiv.getBoundingClientRect() + + if (mY > lineBox.bottom || !hasHandler(cm, type)) { + return e_defaultPrevented(e) + } + mY -= lineBox.top - display.viewOffset + + for (var i = 0; i < cm.display.gutterSpecs.length; ++i) { + var g = display.gutters.childNodes[i] + if (g && g.getBoundingClientRect().right >= mX) { + var line = lineAtHeight(cm.doc, mY) + var gutter = cm.display.gutterSpecs[i] + signal(cm, type, cm, line, gutter.className, e) + return e_defaultPrevented(e) + } + } + } + + function clickInGutter(cm, e) { + return gutterEvent(cm, e, "gutterClick", true) + } + + // CONTEXT MENU HANDLING + + // To make the context menu work, we need to briefly unhide the + // textarea (making it as unobtrusive as possible) to let the + // right-click take effect on it. + function onContextMenu(cm, e) { + if (eventInWidget(cm.display, e) || contextMenuInGutter(cm, e)) { + return + } + if (signalDOMEvent(cm, e, "contextmenu")) { + return + } + if (!captureRightClick) { + cm.display.input.onContextMenu(e) + } + } + + function contextMenuInGutter(cm, e) { + if (!hasHandler(cm, "gutterContextMenu")) { + return false + } + return gutterEvent(cm, e, "gutterContextMenu", false) + } + + function themeChanged(cm) { + cm.display.wrapper.className = + cm.display.wrapper.className.replace(/\s*cm-s-\S+/g, "") + + cm.options.theme.replace(/(^|\s)\s*/g, " cm-s-") + clearCaches(cm) + } + + var Init = { + toString: function() { + return "CodeMirror.Init" + } + } + + var defaults = {} + var optionHandlers = {} + + function defineOptions(CodeMirror) { + var optionHandlers = CodeMirror.optionHandlers + + function option(name, deflt, handle, notOnInit) { + CodeMirror.defaults[name] = deflt + if (handle) { + optionHandlers[name] = notOnInit + ? function(cm, val, old) { + if (old != Init) { + handle(cm, val, old) + } + } + : handle + } + } + + CodeMirror.defineOption = option + + // Passed to option handlers when there is no old value. + CodeMirror.Init = Init + + // These two are, on init, called from the constructor because they + // have to be initialized before the editor can start at all. + option( + "value", + "", + function(cm, val) { + return cm.setValue(val) + }, + true + ) + option( + "mode", + null, + function(cm, val) { + cm.doc.modeOption = val + loadMode(cm) + }, + true + ) + + option("indentUnit", 2, loadMode, true) + option("indentWithTabs", false) + option("smartIndent", true) + option( + "tabSize", + 4, + function(cm) { + resetModeState(cm) + clearCaches(cm) + regChange(cm) + }, + true + ) + + option("lineSeparator", null, function(cm, val) { + cm.doc.lineSep = val + if (!val) { + return + } + var newBreaks = [], + lineNo = cm.doc.first + cm.doc.iter(function(line) { + for (var pos = 0; ; ) { + var found = line.text.indexOf(val, pos) + if (found == -1) { + break + } + pos = found + val.length + newBreaks.push(Pos(lineNo, found)) + } + lineNo++ + }) + for (var i = newBreaks.length - 1; i >= 0; i--) { + replaceRange( + cm.doc, + val, + newBreaks[i], + Pos(newBreaks[i].line, newBreaks[i].ch + val.length) + ) + } + }) + option( + "specialChars", + /[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g, + function(cm, val, old) { + cm.state.specialChars = new RegExp(val.source + (val.test("\t") ? "" : "|\t"), "g") + if (old != Init) { + cm.refresh() + } + } + ) + option( + "specialCharPlaceholder", + defaultSpecialCharPlaceholder, + function(cm) { + return cm.refresh() + }, + true + ) + option("electricChars", true) + option( + "inputStyle", + mobile ? "contenteditable" : "textarea", + function() { + throw new Error("inputStyle can not (yet) be changed in a running editor") // FIXME + }, + true + ) + option( + "spellcheck", + false, + function(cm, val) { + return (cm.getInputField().spellcheck = val) + }, + true + ) + option( + "autocorrect", + false, + function(cm, val) { + return (cm.getInputField().autocorrect = val) + }, + true + ) + option( + "autocapitalize", + false, + function(cm, val) { + return (cm.getInputField().autocapitalize = val) + }, + true + ) + option("rtlMoveVisually", !windows) + option("wholeLineUpdateBefore", true) + + option( + "theme", + "default", + function(cm) { + themeChanged(cm) + updateGutters(cm) + }, + true + ) + option("keyMap", "default", function(cm, val, old) { + var next = getKeyMap(val) + var prev = old != Init && getKeyMap(old) + if (prev && prev.detach) { + prev.detach(cm, next) + } + if (next.attach) { + next.attach(cm, prev || null) + } + }) + option("extraKeys", null) + option("configureMouse", null) + + option("lineWrapping", false, wrappingChanged, true) + option( + "gutters", + [], + function(cm, val) { + cm.display.gutterSpecs = getGutters(val, cm.options.lineNumbers) + updateGutters(cm) + }, + true + ) + option( + "fixedGutter", + true, + function(cm, val) { + cm.display.gutters.style.left = val ? compensateForHScroll(cm.display) + "px" : "0" + cm.refresh() + }, + true + ) + option( + "coverGutterNextToScrollbar", + false, + function(cm) { + return updateScrollbars(cm) + }, + true + ) + option( + "scrollbarStyle", + "native", + function(cm) { + initScrollbars(cm) + updateScrollbars(cm) + cm.display.scrollbars.setScrollTop(cm.doc.scrollTop) + cm.display.scrollbars.setScrollLeft(cm.doc.scrollLeft) + }, + true + ) + option( + "lineNumbers", + false, + function(cm, val) { + cm.display.gutterSpecs = getGutters(cm.options.gutters, val) + updateGutters(cm) + }, + true + ) + option("firstLineNumber", 1, updateGutters, true) + option( + "lineNumberFormatter", + function(integer) { + return integer + }, + updateGutters, + true + ) + option("showCursorWhenSelecting", false, updateSelection, true) + + option("resetSelectionOnContextMenu", true) + option("lineWiseCopyCut", true) + option("pasteLinesPerSelection", true) + option("selectionsMayTouch", false) + + option("readOnly", false, function(cm, val) { + if (val == "nocursor") { + onBlur(cm) + cm.display.input.blur() + } + cm.display.input.readOnlyChanged(val) + }) + option( + "disableInput", + false, + function(cm, val) { + if (!val) { + cm.display.input.reset() + } + }, + true + ) + option("dragDrop", true, dragDropChanged) + option("allowDropFileTypes", null) + + option("cursorBlinkRate", 530) + option("cursorScrollMargin", 0) + option("cursorHeight", 1, updateSelection, true) + option("singleCursorHeightPerLine", true, updateSelection, true) + option("workTime", 100) + option("workDelay", 100) + option("flattenSpans", true, resetModeState, true) + option("addModeClass", false, resetModeState, true) + option("pollInterval", 100) + option("undoDepth", 200, function(cm, val) { + return (cm.doc.history.undoDepth = val) + }) + option("historyEventDelay", 1250) + option( + "viewportMargin", + 10, + function(cm) { + return cm.refresh() + }, + true + ) + option("maxHighlightLength", 10000, resetModeState, true) + option("moveInputWithCursor", true, function(cm, val) { + if (!val) { + cm.display.input.resetPosition() + } + }) + + option("tabindex", null, function(cm, val) { + return (cm.display.input.getField().tabIndex = val || "") + }) + option("autofocus", null) + option( + "direction", + "ltr", + function(cm, val) { + return cm.doc.setDirection(val) + }, + true + ) + option("phrases", null) + } + + function dragDropChanged(cm, value, old) { + var wasOn = old && old != Init + if (!value != !wasOn) { + var funcs = cm.display.dragFunctions + var toggle = value ? on : off + toggle(cm.display.scroller, "dragstart", funcs.start) + toggle(cm.display.scroller, "dragenter", funcs.enter) + toggle(cm.display.scroller, "dragover", funcs.over) + toggle(cm.display.scroller, "dragleave", funcs.leave) + toggle(cm.display.scroller, "drop", funcs.drop) + } + } + + function wrappingChanged(cm) { + if (cm.options.lineWrapping) { + addClass(cm.display.wrapper, "CodeMirror-wrap") + cm.display.sizer.style.minWidth = "" + cm.display.sizerWidth = null + } else { + rmClass(cm.display.wrapper, "CodeMirror-wrap") + findMaxLine(cm) + } + estimateLineHeights(cm) + regChange(cm) + clearCaches(cm) + setTimeout(function() { + return updateScrollbars(cm) + }, 100) + } + + // A CodeMirror instance represents an editor. This is the object + // that user code is usually dealing with. + + function CodeMirror(place, options) { + var this$1 = this + + if (!(this instanceof CodeMirror)) { + return new CodeMirror(place, options) + } + + this.options = options = options ? copyObj(options) : {} + // Determine effective options based on given values and defaults. + copyObj(defaults, options, false) + + var doc = options.value + if (typeof doc == "string") { + doc = new Doc(doc, options.mode, null, options.lineSeparator, options.direction) + } else if (options.mode) { + doc.modeOption = options.mode + } + this.doc = doc + + var input = new CodeMirror.inputStyles[options.inputStyle](this) + var display = (this.display = new Display(place, doc, input, options)) + display.wrapper.CodeMirror = this + themeChanged(this) + if (options.lineWrapping) { + this.display.wrapper.className += " CodeMirror-wrap" + } + initScrollbars(this) + + this.state = { + keyMaps: [], // stores maps added by addKeyMap + overlays: [], // highlighting overlays, as added by addOverlay + modeGen: 0, // bumped when mode/overlay changes, used to invalidate highlighting info + overwrite: false, + delayingBlurEvent: false, + focused: false, + suppressEdits: false, // used to disable editing during key handlers when in readOnly mode + pasteIncoming: -1, + cutIncoming: -1, // help recognize paste/cut edits in input.poll + selectingText: false, + draggingText: false, + highlight: new Delayed(), // stores highlight worker timeout + keySeq: null, // Unfinished key sequence + specialChars: null + } + + if (options.autofocus && !mobile) { + display.input.focus() + } + + // Override magic textarea content restore that IE sometimes does + // on our hidden textarea on reload + if (ie && ie_version < 11) { + setTimeout(function() { + return this$1.display.input.reset(true) + }, 20) + } + + registerEventHandlers(this) + ensureGlobalHandlers() + + startOperation(this) + this.curOp.forceUpdate = true + attachDoc(this, doc) + + if ((options.autofocus && !mobile) || this.hasFocus()) { + setTimeout(bind(onFocus, this), 20) + } else { + onBlur(this) + } + + for (var opt in optionHandlers) { + if (optionHandlers.hasOwnProperty(opt)) { + optionHandlers[opt](this, options[opt], Init) + } + } + maybeUpdateLineNumberWidth(this) + if (options.finishInit) { + options.finishInit(this) + } + for (var i = 0; i < initHooks.length; ++i) { + initHooks[i](this) + } + endOperation(this) + // Suppress optimizelegibility in Webkit, since it breaks text + // measuring on line wrapping boundaries. + if ( + webkit && + options.lineWrapping && + getComputedStyle(display.lineDiv).textRendering == "optimizelegibility" + ) { + display.lineDiv.style.textRendering = "auto" + } + } + + // The default configuration options. + CodeMirror.defaults = defaults + // Functions to run when options are changed. + CodeMirror.optionHandlers = optionHandlers + + // Attach the necessary event handlers when initializing the editor + function registerEventHandlers(cm) { + var d = cm.display + on(d.scroller, "mousedown", operation(cm, onMouseDown)) + // Older IE's will not fire a second mousedown for a double click + if (ie && ie_version < 11) { + on( + d.scroller, + "dblclick", + operation(cm, function(e) { + if (signalDOMEvent(cm, e)) { + return + } + var pos = posFromMouse(cm, e) + if (!pos || clickInGutter(cm, e) || eventInWidget(cm.display, e)) { + return + } + e_preventDefault(e) + var word = cm.findWordAt(pos) + extendSelection(cm.doc, word.anchor, word.head) + }) + ) + } else { + on(d.scroller, "dblclick", function(e) { + return signalDOMEvent(cm, e) || e_preventDefault(e) + }) + } + // Some browsers fire contextmenu *after* opening the menu, at + // which point we can't mess with it anymore. Context menu is + // handled in onMouseDown for these browsers. + on(d.scroller, "contextmenu", function(e) { + return onContextMenu(cm, e) + }) + on(d.input.getField(), "contextmenu", function(e) { + if (!d.scroller.contains(e.target)) { + onContextMenu(cm, e) + } + }) + + // Used to suppress mouse event handling when a touch happens + var touchFinished, + prevTouch = { end: 0 } + function finishTouch() { + if (d.activeTouch) { + touchFinished = setTimeout(function() { + return (d.activeTouch = null) + }, 1000) + prevTouch = d.activeTouch + prevTouch.end = +new Date() + } + } + function isMouseLikeTouchEvent(e) { + if (e.touches.length != 1) { + return false + } + var touch = e.touches[0] + return touch.radiusX <= 1 && touch.radiusY <= 1 + } + function farAway(touch, other) { + if (other.left == null) { + return true + } + var dx = other.left - touch.left, + dy = other.top - touch.top + return dx * dx + dy * dy > 20 * 20 + } + on(d.scroller, "touchstart", function(e) { + if (!signalDOMEvent(cm, e) && !isMouseLikeTouchEvent(e) && !clickInGutter(cm, e)) { + d.input.ensurePolled() + clearTimeout(touchFinished) + var now = +new Date() + d.activeTouch = { + start: now, + moved: false, + prev: now - prevTouch.end <= 300 ? prevTouch : null + } + if (e.touches.length == 1) { + d.activeTouch.left = e.touches[0].pageX + d.activeTouch.top = e.touches[0].pageY + } + } + }) + on(d.scroller, "touchmove", function() { + if (d.activeTouch) { + d.activeTouch.moved = true + } + }) + on(d.scroller, "touchend", function(e) { + var touch = d.activeTouch + if ( + touch && + !eventInWidget(d, e) && + touch.left != null && + !touch.moved && + new Date() - touch.start < 300 + ) { + var pos = cm.coordsChar(d.activeTouch, "page"), + range + if (!touch.prev || farAway(touch, touch.prev)) { + // Single tap + range = new Range(pos, pos) + } else if (!touch.prev.prev || farAway(touch, touch.prev.prev)) { + // Double tap + range = cm.findWordAt(pos) + } // Triple tap + else { + range = new Range(Pos(pos.line, 0), clipPos(cm.doc, Pos(pos.line + 1, 0))) + } + cm.setSelection(range.anchor, range.head) + cm.focus() + e_preventDefault(e) + } + finishTouch() + }) + on(d.scroller, "touchcancel", finishTouch) + + // Sync scrolling between fake scrollbars and real scrollable + // area, ensure viewport is updated when scrolling. + on(d.scroller, "scroll", function() { + if (d.scroller.clientHeight) { + updateScrollTop(cm, d.scroller.scrollTop) + setScrollLeft(cm, d.scroller.scrollLeft, true) + signal(cm, "scroll", cm) + } + }) + + // Listen to wheel events in order to try and update the viewport on time. + on(d.scroller, "mousewheel", function(e) { + return onScrollWheel(cm, e) + }) + on(d.scroller, "DOMMouseScroll", function(e) { + return onScrollWheel(cm, e) + }) + + // Prevent wrapper from ever scrolling + on(d.wrapper, "scroll", function() { + return (d.wrapper.scrollTop = d.wrapper.scrollLeft = 0) + }) + + d.dragFunctions = { + enter: function(e) { + if (!signalDOMEvent(cm, e)) { + e_stop(e) + } + }, + over: function(e) { + if (!signalDOMEvent(cm, e)) { + onDragOver(cm, e) + e_stop(e) + } + }, + start: function(e) { + return onDragStart(cm, e) + }, + drop: operation(cm, onDrop), + leave: function(e) { + if (!signalDOMEvent(cm, e)) { + clearDragCursor(cm) + } + } + } + + var inp = d.input.getField() + on(inp, "keyup", function(e) { + return onKeyUp.call(cm, e) + }) + on(inp, "keydown", operation(cm, onKeyDown)) + on(inp, "keypress", operation(cm, onKeyPress)) + on(inp, "focus", function(e) { + return onFocus(cm, e) + }) + on(inp, "blur", function(e) { + return onBlur(cm, e) + }) + } + + var initHooks = [] + CodeMirror.defineInitHook = function(f) { + return initHooks.push(f) + } + + // Indent the given line. The how parameter can be "smart", + // "add"/null, "subtract", or "prev". When aggressive is false + // (typically set to true for forced single-line indents), empty + // lines are not indented, and places where the mode returns Pass + // are left alone. + function indentLine(cm, n, how, aggressive) { + var doc = cm.doc, + state + if (how == null) { + how = "add" + } + if (how == "smart") { + // Fall back to "prev" when the mode doesn't have an indentation + // method. + if (!doc.mode.indent) { + how = "prev" + } else { + state = getContextBefore(cm, n).state + } + } + + var tabSize = cm.options.tabSize + var line = getLine(doc, n), + curSpace = countColumn(line.text, null, tabSize) + if (line.stateAfter) { + line.stateAfter = null + } + var curSpaceString = line.text.match(/^\s*/)[0], + indentation + if (!aggressive && !/\S/.test(line.text)) { + indentation = 0 + how = "not" + } else if (how == "smart") { + indentation = doc.mode.indent(state, line.text.slice(curSpaceString.length), line.text) + if (indentation == Pass || indentation > 150) { + if (!aggressive) { + return + } + how = "prev" + } + } + if (how == "prev") { + if (n > doc.first) { + indentation = countColumn(getLine(doc, n - 1).text, null, tabSize) + } else { + indentation = 0 + } + } else if (how == "add") { + indentation = curSpace + cm.options.indentUnit + } else if (how == "subtract") { + indentation = curSpace - cm.options.indentUnit + } else if (typeof how == "number") { + indentation = curSpace + how + } + indentation = Math.max(0, indentation) + + var indentString = "", + pos = 0 + if (cm.options.indentWithTabs) { + for (var i = Math.floor(indentation / tabSize); i; --i) { + pos += tabSize + indentString += "\t" + } + } + if (pos < indentation) { + indentString += spaceStr(indentation - pos) + } + + if (indentString != curSpaceString) { + replaceRange(doc, indentString, Pos(n, 0), Pos(n, curSpaceString.length), "+input") + line.stateAfter = null + return true + } else { + // Ensure that, if the cursor was in the whitespace at the start + // of the line, it is moved to the end of that space. + for (var i$1 = 0; i$1 < doc.sel.ranges.length; i$1++) { + var range = doc.sel.ranges[i$1] + if (range.head.line == n && range.head.ch < curSpaceString.length) { + var pos$1 = Pos(n, curSpaceString.length) + replaceOneSelection(doc, i$1, new Range(pos$1, pos$1)) + break + } + } + } + } + + // This will be set to a {lineWise: bool, text: [string]} object, so + // that, when pasting, we know what kind of selections the copied + // text was made out of. + var lastCopied = null + + function setLastCopied(newLastCopied) { + lastCopied = newLastCopied + } + + function applyTextInput(cm, inserted, deleted, sel, origin) { + var doc = cm.doc + cm.display.shift = false + if (!sel) { + sel = doc.sel + } + + var recent = +new Date() - 200 + var paste = origin == "paste" || cm.state.pasteIncoming > recent + var textLines = splitLinesAuto(inserted), + multiPaste = null + // When pasting N lines into N selections, insert one line per selection + if (paste && sel.ranges.length > 1) { + if (lastCopied && lastCopied.text.join("\n") == inserted) { + if (sel.ranges.length % lastCopied.text.length == 0) { + multiPaste = [] + for (var i = 0; i < lastCopied.text.length; i++) { + multiPaste.push(doc.splitLines(lastCopied.text[i])) + } + } + } else if (textLines.length == sel.ranges.length && cm.options.pasteLinesPerSelection) { + multiPaste = map(textLines, function(l) { + return [l] + }) + } + } + + var updateInput = cm.curOp.updateInput + // Normal behavior is to insert the new text into every selection + for (var i$1 = sel.ranges.length - 1; i$1 >= 0; i$1--) { + var range = sel.ranges[i$1] + var from = range.from(), + to = range.to() + if (range.empty()) { + if (deleted && deleted > 0) { + // Handle deletion + from = Pos(from.line, from.ch - deleted) + } else if (cm.state.overwrite && !paste) { + // Handle overwrite + to = Pos( + to.line, + Math.min(getLine(doc, to.line).text.length, to.ch + lst(textLines).length) + ) + } else if ( + paste && + lastCopied && + lastCopied.lineWise && + lastCopied.text.join("\n") == inserted + ) { + from = to = Pos(from.line, 0) + } + } + var changeEvent = { + from: from, + to: to, + text: multiPaste ? multiPaste[i$1 % multiPaste.length] : textLines, + origin: + origin || (paste ? "paste" : cm.state.cutIncoming > recent ? "cut" : "+input") + } + makeChange(cm.doc, changeEvent) + signalLater(cm, "inputRead", cm, changeEvent) + } + if (inserted && !paste) { + triggerElectric(cm, inserted) + } + + ensureCursorVisible(cm) + if (cm.curOp.updateInput < 2) { + cm.curOp.updateInput = updateInput + } + cm.curOp.typing = true + cm.state.pasteIncoming = cm.state.cutIncoming = -1 + } + + function handlePaste(e, cm) { + var pasted = e.clipboardData && e.clipboardData.getData("Text") + if (pasted) { + e.preventDefault() + if (!cm.isReadOnly() && !cm.options.disableInput) { + runInOp(cm, function() { + return applyTextInput(cm, pasted, 0, null, "paste") + }) + } + return true + } + } + + function triggerElectric(cm, inserted) { + // When an 'electric' character is inserted, immediately trigger a reindent + if (!cm.options.electricChars || !cm.options.smartIndent) { + return + } + var sel = cm.doc.sel + + for (var i = sel.ranges.length - 1; i >= 0; i--) { + var range = sel.ranges[i] + if (range.head.ch > 100 || (i && sel.ranges[i - 1].head.line == range.head.line)) { + continue + } + var mode = cm.getModeAt(range.head) + var indented = false + if (mode.electricChars) { + for (var j = 0; j < mode.electricChars.length; j++) { + if (inserted.indexOf(mode.electricChars.charAt(j)) > -1) { + indented = indentLine(cm, range.head.line, "smart") + break + } + } + } else if (mode.electricInput) { + if ( + mode.electricInput.test( + getLine(cm.doc, range.head.line).text.slice(0, range.head.ch) + ) + ) { + indented = indentLine(cm, range.head.line, "smart") + } + } + if (indented) { + signalLater(cm, "electricInput", cm, range.head.line) + } + } + } + + function copyableRanges(cm) { + var text = [], + ranges = [] + for (var i = 0; i < cm.doc.sel.ranges.length; i++) { + var line = cm.doc.sel.ranges[i].head.line + var lineRange = { anchor: Pos(line, 0), head: Pos(line + 1, 0) } + ranges.push(lineRange) + text.push(cm.getRange(lineRange.anchor, lineRange.head)) + } + return { text: text, ranges: ranges } + } + + function disableBrowserMagic(field, spellcheck, autocorrect, autocapitalize) { + field.setAttribute("autocorrect", autocorrect ? "" : "off") + field.setAttribute("autocapitalize", autocapitalize ? "" : "off") + field.setAttribute("spellcheck", !!spellcheck) + } + + function hiddenTextarea() { + var te = elt( + "textarea", + null, + null, + "position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none" + ) + var div = elt( + "div", + [te], + null, + "overflow: hidden; position: relative; width: 3px; height: 0px;" + ) + // The textarea is kept positioned near the cursor to prevent the + // fact that it'll be scrolled into view on input from scrolling + // our fake cursor out of view. On webkit, when wrap=off, paste is + // very slow. So make the area wide instead. + if (webkit) { + te.style.width = "1000px" + } else { + te.setAttribute("wrap", "off") + } + // If border: 0; -- iOS fails to open keyboard (issue #1287) + if (ios) { + te.style.border = "1px solid black" + } + disableBrowserMagic(te) + return div + } + + // The publicly visible API. Note that methodOp(f) means + // 'wrap f in an operation, performed on its `this` parameter'. + + // This is not the complete set of editor methods. Most of the + // methods defined on the Doc type are also injected into + // CodeMirror.prototype, for backwards compatibility and + // convenience. + + function addEditorMethods(CodeMirror) { + var optionHandlers = CodeMirror.optionHandlers + + var helpers = (CodeMirror.helpers = {}) + + CodeMirror.prototype = { + constructor: CodeMirror, + focus: function() { + window.focus() + this.display.input.focus() + }, + + setOption: function(option, value) { + var options = this.options, + old = options[option] + if (options[option] == value && option != "mode") { + return + } + options[option] = value + if (optionHandlers.hasOwnProperty(option)) { + operation(this, optionHandlers[option])(this, value, old) + } + signal(this, "optionChange", this, option) + }, + + getOption: function(option) { + return this.options[option] + }, + getDoc: function() { + return this.doc + }, + + addKeyMap: function(map, bottom) { + this.state.keyMaps[bottom ? "push" : "unshift"](getKeyMap(map)) + }, + removeKeyMap: function(map) { + var maps = this.state.keyMaps + for (var i = 0; i < maps.length; ++i) { + if (maps[i] == map || maps[i].name == map) { + maps.splice(i, 1) + return true + } + } + }, + + addOverlay: methodOp(function(spec, options) { + var mode = spec.token ? spec : CodeMirror.getMode(this.options, spec) + if (mode.startState) { + throw new Error("Overlays may not be stateful.") + } + insertSorted( + this.state.overlays, + { + mode: mode, + modeSpec: spec, + opaque: options && options.opaque, + priority: (options && options.priority) || 0 + }, + function(overlay) { + return overlay.priority + } + ) + this.state.modeGen++ + regChange(this) + }), + removeOverlay: methodOp(function(spec) { + var overlays = this.state.overlays + for (var i = 0; i < overlays.length; ++i) { + var cur = overlays[i].modeSpec + if (cur == spec || (typeof spec == "string" && cur.name == spec)) { + overlays.splice(i, 1) + this.state.modeGen++ + regChange(this) + return + } + } + }), + + indentLine: methodOp(function(n, dir, aggressive) { + if (typeof dir != "string" && typeof dir != "number") { + if (dir == null) { + dir = this.options.smartIndent ? "smart" : "prev" + } else { + dir = dir ? "add" : "subtract" + } + } + if (isLine(this.doc, n)) { + indentLine(this, n, dir, aggressive) + } + }), + indentSelection: methodOp(function(how) { + var ranges = this.doc.sel.ranges, + end = -1 + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i] + if (!range.empty()) { + var from = range.from(), + to = range.to() + var start = Math.max(end, from.line) + end = Math.min(this.lastLine(), to.line - (to.ch ? 0 : 1)) + 1 + for (var j = start; j < end; ++j) { + indentLine(this, j, how) + } + var newRanges = this.doc.sel.ranges + if ( + from.ch == 0 && + ranges.length == newRanges.length && + newRanges[i].from().ch > 0 + ) { + replaceOneSelection( + this.doc, + i, + new Range(from, newRanges[i].to()), + sel_dontScroll + ) + } + } else if (range.head.line > end) { + indentLine(this, range.head.line, how, true) + end = range.head.line + if (i == this.doc.sel.primIndex) { + ensureCursorVisible(this) + } + } + } + }), + + // Fetch the parser token for a given character. Useful for hacks + // that want to inspect the mode state (say, for completion). + getTokenAt: function(pos, precise) { + return takeToken(this, pos, precise) + }, + + getLineTokens: function(line, precise) { + return takeToken(this, Pos(line), precise, true) + }, + + getTokenTypeAt: function(pos) { + pos = clipPos(this.doc, pos) + var styles = getLineStyles(this, getLine(this.doc, pos.line)) + var before = 0, + after = (styles.length - 1) / 2, + ch = pos.ch + var type + if (ch == 0) { + type = styles[2] + } else { + for (;;) { + var mid = (before + after) >> 1 + if ((mid ? styles[mid * 2 - 1] : 0) >= ch) { + after = mid + } else if (styles[mid * 2 + 1] < ch) { + before = mid + 1 + } else { + type = styles[mid * 2 + 2] + break + } + } + } + var cut = type ? type.indexOf("overlay ") : -1 + return cut < 0 ? type : cut == 0 ? null : type.slice(0, cut - 1) + }, + + getModeAt: function(pos) { + var mode = this.doc.mode + if (!mode.innerMode) { + return mode + } + return CodeMirror.innerMode(mode, this.getTokenAt(pos).state).mode + }, + + getHelper: function(pos, type) { + return this.getHelpers(pos, type)[0] + }, + + getHelpers: function(pos, type) { + var found = [] + if (!helpers.hasOwnProperty(type)) { + return found + } + var help = helpers[type], + mode = this.getModeAt(pos) + if (typeof mode[type] == "string") { + if (help[mode[type]]) { + found.push(help[mode[type]]) + } + } else if (mode[type]) { + for (var i = 0; i < mode[type].length; i++) { + var val = help[mode[type][i]] + if (val) { + found.push(val) + } + } + } else if (mode.helperType && help[mode.helperType]) { + found.push(help[mode.helperType]) + } else if (help[mode.name]) { + found.push(help[mode.name]) + } + for (var i$1 = 0; i$1 < help._global.length; i$1++) { + var cur = help._global[i$1] + if (cur.pred(mode, this) && indexOf(found, cur.val) == -1) { + found.push(cur.val) + } + } + return found + }, + + getStateAfter: function(line, precise) { + var doc = this.doc + line = clipLine(doc, line == null ? doc.first + doc.size - 1 : line) + return getContextBefore(this, line + 1, precise).state + }, + + cursorCoords: function(start, mode) { + var pos, + range = this.doc.sel.primary() + if (start == null) { + pos = range.head + } else if (typeof start == "object") { + pos = clipPos(this.doc, start) + } else { + pos = start ? range.from() : range.to() + } + return cursorCoords(this, pos, mode || "page") + }, + + charCoords: function(pos, mode) { + return charCoords(this, clipPos(this.doc, pos), mode || "page") + }, + + coordsChar: function(coords, mode) { + coords = fromCoordSystem(this, coords, mode || "page") + return coordsChar(this, coords.left, coords.top) + }, + + lineAtHeight: function(height, mode) { + height = fromCoordSystem(this, { top: height, left: 0 }, mode || "page").top + return lineAtHeight(this.doc, height + this.display.viewOffset) + }, + heightAtLine: function(line, mode, includeWidgets) { + var end = false, + lineObj + if (typeof line == "number") { + var last = this.doc.first + this.doc.size - 1 + if (line < this.doc.first) { + line = this.doc.first + } else if (line > last) { + line = last + end = true + } + lineObj = getLine(this.doc, line) + } else { + lineObj = line + } + return ( + intoCoordSystem( + this, + lineObj, + { top: 0, left: 0 }, + mode || "page", + includeWidgets || end + ).top + (end ? this.doc.height - heightAtLine(lineObj) : 0) + ) + }, + + defaultTextHeight: function() { + return textHeight(this.display) + }, + defaultCharWidth: function() { + return charWidth(this.display) + }, + + getViewport: function() { + return { from: this.display.viewFrom, to: this.display.viewTo } + }, + + addWidget: function(pos, node, scroll, vert, horiz) { + var display = this.display + pos = cursorCoords(this, clipPos(this.doc, pos)) + var top = pos.bottom, + left = pos.left + node.style.position = "absolute" + node.setAttribute("cm-ignore-events", "true") + this.display.input.setUneditable(node) + display.sizer.appendChild(node) + if (vert == "over") { + top = pos.top + } else if (vert == "above" || vert == "near") { + var vspace = Math.max(display.wrapper.clientHeight, this.doc.height), + hspace = Math.max(display.sizer.clientWidth, display.lineSpace.clientWidth) + // Default to positioning above (if specified and possible); otherwise default to positioning below + if ( + (vert == "above" || pos.bottom + node.offsetHeight > vspace) && + pos.top > node.offsetHeight + ) { + top = pos.top - node.offsetHeight + } else if (pos.bottom + node.offsetHeight <= vspace) { + top = pos.bottom + } + if (left + node.offsetWidth > hspace) { + left = hspace - node.offsetWidth + } + } + node.style.top = top + "px" + node.style.left = node.style.right = "" + if (horiz == "right") { + left = display.sizer.clientWidth - node.offsetWidth + node.style.right = "0px" + } else { + if (horiz == "left") { + left = 0 + } else if (horiz == "middle") { + left = (display.sizer.clientWidth - node.offsetWidth) / 2 + } + node.style.left = left + "px" + } + if (scroll) { + scrollIntoView(this, { + left: left, + top: top, + right: left + node.offsetWidth, + bottom: top + node.offsetHeight + }) + } + }, + + triggerOnKeyDown: methodOp(onKeyDown), + triggerOnKeyPress: methodOp(onKeyPress), + triggerOnKeyUp: onKeyUp, + triggerOnMouseDown: methodOp(onMouseDown), + + execCommand: function(cmd) { + if (commands.hasOwnProperty(cmd)) { + return commands[cmd].call(null, this) + } + }, + + triggerElectric: methodOp(function(text) { + triggerElectric(this, text) + }), + + findPosH: function(from, amount, unit, visually) { + var dir = 1 + if (amount < 0) { + dir = -1 + amount = -amount + } + var cur = clipPos(this.doc, from) + for (var i = 0; i < amount; ++i) { + cur = findPosH(this.doc, cur, dir, unit, visually) + if (cur.hitSide) { + break + } + } + return cur + }, + + moveH: methodOp(function(dir, unit) { + var this$1 = this + + this.extendSelectionsBy(function(range) { + if (this$1.display.shift || this$1.doc.extend || range.empty()) { + return findPosH( + this$1.doc, + range.head, + dir, + unit, + this$1.options.rtlMoveVisually + ) + } else { + return dir < 0 ? range.from() : range.to() + } + }, sel_move) + }), + + deleteH: methodOp(function(dir, unit) { + var sel = this.doc.sel, + doc = this.doc + if (sel.somethingSelected()) { + doc.replaceSelection("", null, "+delete") + } else { + deleteNearSelection(this, function(range) { + var other = findPosH(doc, range.head, dir, unit, false) + return dir < 0 + ? { from: other, to: range.head } + : { from: range.head, to: other } + }) + } + }), + + findPosV: function(from, amount, unit, goalColumn) { + var dir = 1, + x = goalColumn + if (amount < 0) { + dir = -1 + amount = -amount + } + var cur = clipPos(this.doc, from) + for (var i = 0; i < amount; ++i) { + var coords = cursorCoords(this, cur, "div") + if (x == null) { + x = coords.left + } else { + coords.left = x + } + cur = findPosV(this, coords, dir, unit) + if (cur.hitSide) { + break + } + } + return cur + }, + + moveV: methodOp(function(dir, unit) { + var this$1 = this + + var doc = this.doc, + goals = [] + var collapse = !this.display.shift && !doc.extend && doc.sel.somethingSelected() + doc.extendSelectionsBy(function(range) { + if (collapse) { + return dir < 0 ? range.from() : range.to() + } + var headPos = cursorCoords(this$1, range.head, "div") + if (range.goalColumn != null) { + headPos.left = range.goalColumn + } + goals.push(headPos.left) + var pos = findPosV(this$1, headPos, dir, unit) + if (unit == "page" && range == doc.sel.primary()) { + addToScrollTop(this$1, charCoords(this$1, pos, "div").top - headPos.top) + } + return pos + }, sel_move) + if (goals.length) { + for (var i = 0; i < doc.sel.ranges.length; i++) { + doc.sel.ranges[i].goalColumn = goals[i] + } + } + }), + + // Find the word at the given position (as returned by coordsChar). + findWordAt: function(pos) { + var doc = this.doc, + line = getLine(doc, pos.line).text + var start = pos.ch, + end = pos.ch + if (line) { + var helper = this.getHelper(pos, "wordChars") + if ((pos.sticky == "before" || end == line.length) && start) { + --start + } else { + ++end + } + var startChar = line.charAt(start) + var check = isWordChar(startChar, helper) + ? function(ch) { + return isWordChar(ch, helper) + } + : /\s/.test(startChar) + ? function(ch) { + return /\s/.test(ch) + } + : function(ch) { + return !/\s/.test(ch) && !isWordChar(ch) + } + while (start > 0 && check(line.charAt(start - 1))) { + --start + } + while (end < line.length && check(line.charAt(end))) { + ++end + } + } + return new Range(Pos(pos.line, start), Pos(pos.line, end)) + }, + + toggleOverwrite: function(value) { + if (value != null && value == this.state.overwrite) { + return + } + if ((this.state.overwrite = !this.state.overwrite)) { + addClass(this.display.cursorDiv, "CodeMirror-overwrite") + } else { + rmClass(this.display.cursorDiv, "CodeMirror-overwrite") + } + + signal(this, "overwriteToggle", this, this.state.overwrite) + }, + hasFocus: function() { + return this.display.input.getField() == activeElt() + }, + isReadOnly: function() { + return !!(this.options.readOnly || this.doc.cantEdit) + }, + + scrollTo: methodOp(function(x, y) { + scrollToCoords(this, x, y) + }), + getScrollInfo: function() { + var scroller = this.display.scroller + return { + left: scroller.scrollLeft, + top: scroller.scrollTop, + height: scroller.scrollHeight - scrollGap(this) - this.display.barHeight, + width: scroller.scrollWidth - scrollGap(this) - this.display.barWidth, + clientHeight: displayHeight(this), + clientWidth: displayWidth(this) + } + }, + + scrollIntoView: methodOp(function(range, margin) { + if (range == null) { + range = { from: this.doc.sel.primary().head, to: null } + if (margin == null) { + margin = this.options.cursorScrollMargin + } + } else if (typeof range == "number") { + range = { from: Pos(range, 0), to: null } + } else if (range.from == null) { + range = { from: range, to: null } + } + if (!range.to) { + range.to = range.from + } + range.margin = margin || 0 + + if (range.from.line != null) { + scrollToRange(this, range) + } else { + scrollToCoordsRange(this, range.from, range.to, range.margin) + } + }), + + setSize: methodOp(function(width, height) { + var this$1 = this + + var interpret = function(val) { + return typeof val == "number" || /^\d+$/.test(String(val)) ? val + "px" : val + } + if (width != null) { + this.display.wrapper.style.width = interpret(width) + } + if (height != null) { + this.display.wrapper.style.height = interpret(height) + } + if (this.options.lineWrapping) { + clearLineMeasurementCache(this) + } + var lineNo = this.display.viewFrom + this.doc.iter(lineNo, this.display.viewTo, function(line) { + if (line.widgets) { + for (var i = 0; i < line.widgets.length; i++) { + if (line.widgets[i].noHScroll) { + regLineChange(this$1, lineNo, "widget") + break + } + } + } + ++lineNo + }) + this.curOp.forceUpdate = true + signal(this, "refresh", this) + }), + + operation: function(f) { + return runInOp(this, f) + }, + startOperation: function() { + return startOperation(this) + }, + endOperation: function() { + return endOperation(this) + }, + + refresh: methodOp(function() { + var oldHeight = this.display.cachedTextHeight + regChange(this) + this.curOp.forceUpdate = true + clearCaches(this) + scrollToCoords(this, this.doc.scrollLeft, this.doc.scrollTop) + updateGutterSpace(this.display) + if (oldHeight == null || Math.abs(oldHeight - textHeight(this.display)) > 0.5) { + estimateLineHeights(this) + } + signal(this, "refresh", this) + }), + + swapDoc: methodOp(function(doc) { + var old = this.doc + old.cm = null + // Cancel the current text selection if any (#5821) + if (this.state.selectingText) { + this.state.selectingText() + } + attachDoc(this, doc) + clearCaches(this) + this.display.input.reset() + scrollToCoords(this, doc.scrollLeft, doc.scrollTop) + this.curOp.forceScroll = true + signalLater(this, "swapDoc", this, old) + return old + }), + + phrase: function(phraseText) { + var phrases = this.options.phrases + return phrases && Object.prototype.hasOwnProperty.call(phrases, phraseText) + ? phrases[phraseText] + : phraseText + }, + + getInputField: function() { + return this.display.input.getField() + }, + getWrapperElement: function() { + return this.display.wrapper + }, + getScrollerElement: function() { + return this.display.scroller + }, + getGutterElement: function() { + return this.display.gutters + } + } + eventMixin(CodeMirror) + + CodeMirror.registerHelper = function(type, name, value) { + if (!helpers.hasOwnProperty(type)) { + helpers[type] = CodeMirror[type] = { _global: [] } + } + helpers[type][name] = value + } + CodeMirror.registerGlobalHelper = function(type, name, predicate, value) { + CodeMirror.registerHelper(type, name, value) + helpers[type]._global.push({ pred: predicate, val: value }) + } + } + + // Used for horizontal relative motion. Dir is -1 or 1 (left or + // right), unit can be "char", "column" (like char, but doesn't + // cross line boundaries), "word" (across next word), or "group" (to + // the start of next group of word or non-word-non-whitespace + // chars). The visually param controls whether, in right-to-left + // text, direction 1 means to move towards the next index in the + // string, or towards the character to the right of the current + // position. The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosH(doc, pos, dir, unit, visually) { + var oldPos = pos + var origDir = dir + var lineObj = getLine(doc, pos.line) + var lineDir = visually && doc.direction == "rtl" ? -dir : dir + function findNextLine() { + var l = pos.line + lineDir + if (l < doc.first || l >= doc.first + doc.size) { + return false + } + pos = new Pos(l, pos.ch, pos.sticky) + return (lineObj = getLine(doc, l)) + } + function moveOnce(boundToLine) { + var next + if (visually) { + next = moveVisually(doc.cm, lineObj, pos, dir) + } else { + next = moveLogically(lineObj, pos, dir) + } + if (next == null) { + if (!boundToLine && findNextLine()) { + pos = endOfLine(visually, doc.cm, lineObj, pos.line, lineDir) + } else { + return false + } + } else { + pos = next + } + return true + } + + if (unit == "char") { + moveOnce() + } else if (unit == "column") { + moveOnce(true) + } else if (unit == "word" || unit == "group") { + var sawType = null, + group = unit == "group" + var helper = doc.cm && doc.cm.getHelper(pos, "wordChars") + for (var first = true; ; first = false) { + if (dir < 0 && !moveOnce(!first)) { + break + } + var cur = lineObj.text.charAt(pos.ch) || "\n" + var type = isWordChar(cur, helper) + ? "w" + : group && cur == "\n" + ? "n" + : !group || /\s/.test(cur) + ? null + : "p" + if (group && !first && !type) { + type = "s" + } + if (sawType && sawType != type) { + if (dir < 0) { + dir = 1 + moveOnce() + pos.sticky = "after" + } + break + } + + if (type) { + sawType = type + } + if (dir > 0 && !moveOnce(!first)) { + break + } + } + } + var result = skipAtomic(doc, pos, oldPos, origDir, true) + if (equalCursorPos(oldPos, result)) { + result.hitSide = true + } + return result + } + + // For relative vertical movement. Dir may be -1 or 1. Unit can be + // "page" or "line". The resulting position will have a hitSide=true + // property if it reached the end of the document. + function findPosV(cm, pos, dir, unit) { + var doc = cm.doc, + x = pos.left, + y + if (unit == "page") { + var pageSize = Math.min( + cm.display.wrapper.clientHeight, + window.innerHeight || document.documentElement.clientHeight + ) + var moveAmount = Math.max(pageSize - 0.5 * textHeight(cm.display), 3) + y = (dir > 0 ? pos.bottom : pos.top) + dir * moveAmount + } else if (unit == "line") { + y = dir > 0 ? pos.bottom + 3 : pos.top - 3 + } + var target + for (;;) { + target = coordsChar(cm, x, y) + if (!target.outside) { + break + } + if (dir < 0 ? y <= 0 : y >= doc.height) { + target.hitSide = true + break + } + y += dir * 5 + } + return target + } + + // CONTENTEDITABLE INPUT STYLE + + var ContentEditableInput = function(cm) { + this.cm = cm + this.lastAnchorNode = this.lastAnchorOffset = this.lastFocusNode = this.lastFocusOffset = null + this.polling = new Delayed() + this.composing = null + this.gracePeriod = false + this.readDOMTimeout = null + } + + ContentEditableInput.prototype.init = function(display) { + var this$1 = this + + var input = this, + cm = input.cm + var div = (input.div = display.lineDiv) + disableBrowserMagic( + div, + cm.options.spellcheck, + cm.options.autocorrect, + cm.options.autocapitalize + ) + + on(div, "paste", function(e) { + if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { + return + } + // IE doesn't fire input events, so we schedule a read for the pasted content in this way + if (ie_version <= 11) { + setTimeout( + operation(cm, function() { + return this$1.updateFromDOM() + }), + 20 + ) + } + }) + + on(div, "compositionstart", function(e) { + this$1.composing = { data: e.data, done: false } + }) + on(div, "compositionupdate", function(e) { + if (!this$1.composing) { + this$1.composing = { data: e.data, done: false } + } + }) + on(div, "compositionend", function(e) { + if (this$1.composing) { + if (e.data != this$1.composing.data) { + this$1.readFromDOMSoon() + } + this$1.composing.done = true + } + }) + + on(div, "touchstart", function() { + return input.forceCompositionEnd() + }) + + on(div, "input", function() { + if (!this$1.composing) { + this$1.readFromDOMSoon() + } + }) + + function onCopyCut(e) { + if (signalDOMEvent(cm, e)) { + return + } + if (cm.somethingSelected()) { + setLastCopied({ lineWise: false, text: cm.getSelections() }) + if (e.type == "cut") { + cm.replaceSelection("", null, "cut") + } + } else if (!cm.options.lineWiseCopyCut) { + return + } else { + var ranges = copyableRanges(cm) + setLastCopied({ lineWise: true, text: ranges.text }) + if (e.type == "cut") { + cm.operation(function() { + cm.setSelections(ranges.ranges, 0, sel_dontScroll) + cm.replaceSelection("", null, "cut") + }) + } + } + if (e.clipboardData) { + e.clipboardData.clearData() + var content = lastCopied.text.join("\n") + // iOS exposes the clipboard API, but seems to discard content inserted into it + e.clipboardData.setData("Text", content) + if (e.clipboardData.getData("Text") == content) { + e.preventDefault() + return + } + } + // Old-fashioned briefly-focus-a-textarea hack + var kludge = hiddenTextarea(), + te = kludge.firstChild + cm.display.lineSpace.insertBefore(kludge, cm.display.lineSpace.firstChild) + te.value = lastCopied.text.join("\n") + var hadFocus = document.activeElement + selectInput(te) + setTimeout(function() { + cm.display.lineSpace.removeChild(kludge) + hadFocus.focus() + if (hadFocus == div) { + input.showPrimarySelection() + } + }, 50) + } + on(div, "copy", onCopyCut) + on(div, "cut", onCopyCut) + } + + ContentEditableInput.prototype.prepareSelection = function() { + var result = prepareSelection(this.cm, false) + result.focus = this.cm.state.focused + return result + } + + ContentEditableInput.prototype.showSelection = function(info, takeFocus) { + if (!info || !this.cm.display.view.length) { + return + } + if (info.focus || takeFocus) { + this.showPrimarySelection() + } + this.showMultipleSelections(info) + } + + ContentEditableInput.prototype.getSelection = function() { + return this.cm.display.wrapper.ownerDocument.getSelection() + } + + ContentEditableInput.prototype.showPrimarySelection = function() { + var sel = this.getSelection(), + cm = this.cm, + prim = cm.doc.sel.primary() + var from = prim.from(), + to = prim.to() + + if ( + cm.display.viewTo == cm.display.viewFrom || + from.line >= cm.display.viewTo || + to.line < cm.display.viewFrom + ) { + sel.removeAllRanges() + return + } + + var curAnchor = domToPos(cm, sel.anchorNode, sel.anchorOffset) + var curFocus = domToPos(cm, sel.focusNode, sel.focusOffset) + if ( + curAnchor && + !curAnchor.bad && + curFocus && + !curFocus.bad && + cmp(minPos(curAnchor, curFocus), from) == 0 && + cmp(maxPos(curAnchor, curFocus), to) == 0 + ) { + return + } + + var view = cm.display.view + var start = (from.line >= cm.display.viewFrom && posToDOM(cm, from)) || { + node: view[0].measure.map[2], + offset: 0 + } + var end = to.line < cm.display.viewTo && posToDOM(cm, to) + if (!end) { + var measure = view[view.length - 1].measure + var map = measure.maps ? measure.maps[measure.maps.length - 1] : measure.map + end = { node: map[map.length - 1], offset: map[map.length - 2] - map[map.length - 3] } + } + + if (!start || !end) { + sel.removeAllRanges() + return + } + + var old = sel.rangeCount && sel.getRangeAt(0), + rng + try { + rng = range(start.node, start.offset, end.offset, end.node) + } catch (e) {} // Our model of the DOM might be outdated, in which case the range we try to set can be impossible + if (rng) { + if (!gecko && cm.state.focused) { + sel.collapse(start.node, start.offset) + if (!rng.collapsed) { + sel.removeAllRanges() + sel.addRange(rng) + } + } else { + sel.removeAllRanges() + sel.addRange(rng) + } + if (old && sel.anchorNode == null) { + sel.addRange(old) + } else if (gecko) { + this.startGracePeriod() + } + } + this.rememberSelection() + } + + ContentEditableInput.prototype.startGracePeriod = function() { + var this$1 = this + + clearTimeout(this.gracePeriod) + this.gracePeriod = setTimeout(function() { + this$1.gracePeriod = false + if (this$1.selectionChanged()) { + this$1.cm.operation(function() { + return (this$1.cm.curOp.selectionChanged = true) + }) + } + }, 20) + } + + ContentEditableInput.prototype.showMultipleSelections = function(info) { + removeChildrenAndAdd(this.cm.display.cursorDiv, info.cursors) + removeChildrenAndAdd(this.cm.display.selectionDiv, info.selection) + } + + ContentEditableInput.prototype.rememberSelection = function() { + var sel = this.getSelection() + this.lastAnchorNode = sel.anchorNode + this.lastAnchorOffset = sel.anchorOffset + this.lastFocusNode = sel.focusNode + this.lastFocusOffset = sel.focusOffset + } + + ContentEditableInput.prototype.selectionInEditor = function() { + var sel = this.getSelection() + if (!sel.rangeCount) { + return false + } + var node = sel.getRangeAt(0).commonAncestorContainer + return contains(this.div, node) + } + + ContentEditableInput.prototype.focus = function() { + if (this.cm.options.readOnly != "nocursor") { + if (!this.selectionInEditor()) { + this.showSelection(this.prepareSelection(), true) + } + this.div.focus() + } + } + ContentEditableInput.prototype.blur = function() { + this.div.blur() + } + ContentEditableInput.prototype.getField = function() { + return this.div + } + + ContentEditableInput.prototype.supportsTouch = function() { + return true + } + + ContentEditableInput.prototype.receivedFocus = function() { + var input = this + if (this.selectionInEditor()) { + this.pollSelection() + } else { + runInOp(this.cm, function() { + return (input.cm.curOp.selectionChanged = true) + }) + } + + function poll() { + if (input.cm.state.focused) { + input.pollSelection() + input.polling.set(input.cm.options.pollInterval, poll) + } + } + this.polling.set(this.cm.options.pollInterval, poll) + } + + ContentEditableInput.prototype.selectionChanged = function() { + var sel = this.getSelection() + return ( + sel.anchorNode != this.lastAnchorNode || + sel.anchorOffset != this.lastAnchorOffset || + sel.focusNode != this.lastFocusNode || + sel.focusOffset != this.lastFocusOffset + ) + } + + ContentEditableInput.prototype.pollSelection = function() { + if (this.readDOMTimeout != null || this.gracePeriod || !this.selectionChanged()) { + return + } + var sel = this.getSelection(), + cm = this.cm + // On Android Chrome (version 56, at least), backspacing into an + // uneditable block element will put the cursor in that element, + // and then, because it's not editable, hide the virtual keyboard. + // Because Android doesn't allow us to actually detect backspace + // presses in a sane way, this code checks for when that happens + // and simulates a backspace press in this case. + if (android && chrome && this.cm.display.gutterSpecs.length && isInGutter(sel.anchorNode)) { + this.cm.triggerOnKeyDown({ type: "keydown", keyCode: 8, preventDefault: Math.abs }) + this.blur() + this.focus() + return + } + if (this.composing) { + return + } + this.rememberSelection() + var anchor = domToPos(cm, sel.anchorNode, sel.anchorOffset) + var head = domToPos(cm, sel.focusNode, sel.focusOffset) + if (anchor && head) { + runInOp(cm, function() { + setSelection(cm.doc, simpleSelection(anchor, head), sel_dontScroll) + if (anchor.bad || head.bad) { + cm.curOp.selectionChanged = true + } + }) + } + } + + ContentEditableInput.prototype.pollContent = function() { + if (this.readDOMTimeout != null) { + clearTimeout(this.readDOMTimeout) + this.readDOMTimeout = null + } + + var cm = this.cm, + display = cm.display, + sel = cm.doc.sel.primary() + var from = sel.from(), + to = sel.to() + if (from.ch == 0 && from.line > cm.firstLine()) { + from = Pos(from.line - 1, getLine(cm.doc, from.line - 1).length) + } + if (to.ch == getLine(cm.doc, to.line).text.length && to.line < cm.lastLine()) { + to = Pos(to.line + 1, 0) + } + if (from.line < display.viewFrom || to.line > display.viewTo - 1) { + return false + } + + var fromIndex, fromLine, fromNode + if (from.line == display.viewFrom || (fromIndex = findViewIndex(cm, from.line)) == 0) { + fromLine = lineNo(display.view[0].line) + fromNode = display.view[0].node + } else { + fromLine = lineNo(display.view[fromIndex].line) + fromNode = display.view[fromIndex - 1].node.nextSibling + } + var toIndex = findViewIndex(cm, to.line) + var toLine, toNode + if (toIndex == display.view.length - 1) { + toLine = display.viewTo - 1 + toNode = display.lineDiv.lastChild + } else { + toLine = lineNo(display.view[toIndex + 1].line) - 1 + toNode = display.view[toIndex + 1].node.previousSibling + } + + if (!fromNode) { + return false + } + var newText = cm.doc.splitLines(domTextBetween(cm, fromNode, toNode, fromLine, toLine)) + var oldText = getBetween( + cm.doc, + Pos(fromLine, 0), + Pos(toLine, getLine(cm.doc, toLine).text.length) + ) + while (newText.length > 1 && oldText.length > 1) { + if (lst(newText) == lst(oldText)) { + newText.pop() + oldText.pop() + toLine-- + } else if (newText[0] == oldText[0]) { + newText.shift() + oldText.shift() + fromLine++ + } else { + break + } + } + + var cutFront = 0, + cutEnd = 0 + var newTop = newText[0], + oldTop = oldText[0], + maxCutFront = Math.min(newTop.length, oldTop.length) + while ( + cutFront < maxCutFront && + newTop.charCodeAt(cutFront) == oldTop.charCodeAt(cutFront) + ) { + ++cutFront + } + var newBot = lst(newText), + oldBot = lst(oldText) + var maxCutEnd = Math.min( + newBot.length - (newText.length == 1 ? cutFront : 0), + oldBot.length - (oldText.length == 1 ? cutFront : 0) + ) + while ( + cutEnd < maxCutEnd && + newBot.charCodeAt(newBot.length - cutEnd - 1) == + oldBot.charCodeAt(oldBot.length - cutEnd - 1) + ) { + ++cutEnd + } + // Try to move start of change to start of selection if ambiguous + if (newText.length == 1 && oldText.length == 1 && fromLine == from.line) { + while ( + cutFront && + cutFront > from.ch && + newBot.charCodeAt(newBot.length - cutEnd - 1) == + oldBot.charCodeAt(oldBot.length - cutEnd - 1) + ) { + cutFront-- + cutEnd++ + } + } + + newText[newText.length - 1] = newBot + .slice(0, newBot.length - cutEnd) + .replace(/^\u200b+/, "") + newText[0] = newText[0].slice(cutFront).replace(/\u200b+$/, "") + + var chFrom = Pos(fromLine, cutFront) + var chTo = Pos(toLine, oldText.length ? lst(oldText).length - cutEnd : 0) + if (newText.length > 1 || newText[0] || cmp(chFrom, chTo)) { + replaceRange(cm.doc, newText, chFrom, chTo, "+input") + return true + } + } + + ContentEditableInput.prototype.ensurePolled = function() { + this.forceCompositionEnd() + } + ContentEditableInput.prototype.reset = function() { + this.forceCompositionEnd() + } + ContentEditableInput.prototype.forceCompositionEnd = function() { + if (!this.composing) { + return + } + clearTimeout(this.readDOMTimeout) + this.composing = null + this.updateFromDOM() + this.div.blur() + this.div.focus() + } + ContentEditableInput.prototype.readFromDOMSoon = function() { + var this$1 = this + + if (this.readDOMTimeout != null) { + return + } + this.readDOMTimeout = setTimeout(function() { + this$1.readDOMTimeout = null + if (this$1.composing) { + if (this$1.composing.done) { + this$1.composing = null + } else { + return + } + } + this$1.updateFromDOM() + }, 80) + } + + ContentEditableInput.prototype.updateFromDOM = function() { + var this$1 = this + + if (this.cm.isReadOnly() || !this.pollContent()) { + runInOp(this.cm, function() { + return regChange(this$1.cm) + }) + } + } + + ContentEditableInput.prototype.setUneditable = function(node) { + node.contentEditable = "false" + } + + ContentEditableInput.prototype.onKeyPress = function(e) { + if (e.charCode == 0 || this.composing) { + return + } + e.preventDefault() + if (!this.cm.isReadOnly()) { + operation(this.cm, applyTextInput)( + this.cm, + String.fromCharCode(e.charCode == null ? e.keyCode : e.charCode), + 0 + ) + } + } + + ContentEditableInput.prototype.readOnlyChanged = function(val) { + this.div.contentEditable = String(val != "nocursor") + } + + ContentEditableInput.prototype.onContextMenu = function() {} + ContentEditableInput.prototype.resetPosition = function() {} + + ContentEditableInput.prototype.needsContentAttribute = true + + function posToDOM(cm, pos) { + var view = findViewForLine(cm, pos.line) + if (!view || view.hidden) { + return null + } + var line = getLine(cm.doc, pos.line) + var info = mapFromLineView(view, line, pos.line) + + var order = getOrder(line, cm.doc.direction), + side = "left" + if (order) { + var partPos = getBidiPartAt(order, pos.ch) + side = partPos % 2 ? "right" : "left" + } + var result = nodeAndOffsetInLineMap(info.map, pos.ch, side) + result.offset = result.collapse == "right" ? result.end : result.start + return result + } + + function isInGutter(node) { + for (var scan = node; scan; scan = scan.parentNode) { + if (/CodeMirror-gutter-wrapper/.test(scan.className)) { + return true + } + } + return false + } + + function badPos(pos, bad) { + if (bad) { + pos.bad = true + } + return pos + } + + function domTextBetween(cm, from, to, fromLine, toLine) { + var text = "", + closing = false, + lineSep = cm.doc.lineSeparator(), + extraLinebreak = false + function recognizeMarker(id) { + return function(marker) { + return marker.id == id + } + } + function close() { + if (closing) { + text += lineSep + if (extraLinebreak) { + text += lineSep + } + closing = extraLinebreak = false + } + } + function addText(str) { + if (str) { + close() + text += str + } + } + function walk(node) { + if (node.nodeType == 1) { + var cmText = node.getAttribute("cm-text") + if (cmText) { + addText(cmText) + return + } + var markerID = node.getAttribute("cm-marker"), + range + if (markerID) { + var found = cm.findMarks( + Pos(fromLine, 0), + Pos(toLine + 1, 0), + recognizeMarker(+markerID) + ) + if (found.length && (range = found[0].find(0))) { + addText(getBetween(cm.doc, range.from, range.to).join(lineSep)) + } + return + } + if (node.getAttribute("contenteditable") == "false") { + return + } + var isBlock = /^(pre|div|p|li|table|br)$/i.test(node.nodeName) + if (!/^br$/i.test(node.nodeName) && node.textContent.length == 0) { + return + } + + if (isBlock) { + close() + } + for (var i = 0; i < node.childNodes.length; i++) { + walk(node.childNodes[i]) + } + + if (/^(pre|p)$/i.test(node.nodeName)) { + extraLinebreak = true + } + if (isBlock) { + closing = true + } + } else if (node.nodeType == 3) { + addText(node.nodeValue.replace(/\u200b/g, "").replace(/\u00a0/g, " ")) + } + } + for (;;) { + walk(from) + if (from == to) { + break + } + from = from.nextSibling + extraLinebreak = false + } + return text + } + + function domToPos(cm, node, offset) { + var lineNode + if (node == cm.display.lineDiv) { + lineNode = cm.display.lineDiv.childNodes[offset] + if (!lineNode) { + return badPos(cm.clipPos(Pos(cm.display.viewTo - 1)), true) + } + node = null + offset = 0 + } else { + for (lineNode = node; ; lineNode = lineNode.parentNode) { + if (!lineNode || lineNode == cm.display.lineDiv) { + return null + } + if (lineNode.parentNode && lineNode.parentNode == cm.display.lineDiv) { + break + } + } + } + for (var i = 0; i < cm.display.view.length; i++) { + var lineView = cm.display.view[i] + if (lineView.node == lineNode) { + return locateNodeInLineView(lineView, node, offset) + } + } + } + + function locateNodeInLineView(lineView, node, offset) { + var wrapper = lineView.text.firstChild, + bad = false + if (!node || !contains(wrapper, node)) { + return badPos(Pos(lineNo(lineView.line), 0), true) + } + if (node == wrapper) { + bad = true + node = wrapper.childNodes[offset] + offset = 0 + if (!node) { + var line = lineView.rest ? lst(lineView.rest) : lineView.line + return badPos(Pos(lineNo(line), line.text.length), bad) + } + } + + var textNode = node.nodeType == 3 ? node : null, + topNode = node + if (!textNode && node.childNodes.length == 1 && node.firstChild.nodeType == 3) { + textNode = node.firstChild + if (offset) { + offset = textNode.nodeValue.length + } + } + while (topNode.parentNode != wrapper) { + topNode = topNode.parentNode + } + var measure = lineView.measure, + maps = measure.maps + + function find(textNode, topNode, offset) { + for (var i = -1; i < (maps ? maps.length : 0); i++) { + var map = i < 0 ? measure.map : maps[i] + for (var j = 0; j < map.length; j += 3) { + var curNode = map[j + 2] + if (curNode == textNode || curNode == topNode) { + var line = lineNo(i < 0 ? lineView.line : lineView.rest[i]) + var ch = map[j] + offset + if (offset < 0 || curNode != textNode) { + ch = map[j + (offset ? 1 : 0)] + } + return Pos(line, ch) + } + } + } + } + var found = find(textNode, topNode, offset) + if (found) { + return badPos(found, bad) + } + + // FIXME this is all really shaky. might handle the few cases it needs to handle, but likely to cause problems + for ( + var after = topNode.nextSibling, + dist = textNode ? textNode.nodeValue.length - offset : 0; + after; + after = after.nextSibling + ) { + found = find(after, after.firstChild, 0) + if (found) { + return badPos(Pos(found.line, found.ch - dist), bad) + } else { + dist += after.textContent.length + } + } + for ( + var before = topNode.previousSibling, dist$1 = offset; + before; + before = before.previousSibling + ) { + found = find(before, before.firstChild, -1) + if (found) { + return badPos(Pos(found.line, found.ch + dist$1), bad) + } else { + dist$1 += before.textContent.length + } + } + } + + // TEXTAREA INPUT STYLE + + var TextareaInput = function(cm) { + this.cm = cm + // See input.poll and input.reset + this.prevInput = "" + + // Flag that indicates whether we expect input to appear real soon + // now (after some event like 'keypress' or 'input') and are + // polling intensively. + this.pollingFast = false + // Self-resetting timeout for the poller + this.polling = new Delayed() + // Used to work around IE issue with selection being forgotten when focus moves away from textarea + this.hasSelection = false + this.composing = null + } + + TextareaInput.prototype.init = function(display) { + var this$1 = this + + var input = this, + cm = this.cm + this.createField(display) + var te = this.textarea + + display.wrapper.insertBefore(this.wrapper, display.wrapper.firstChild) + + // Needed to hide big blue blinking cursor on Mobile Safari (doesn't seem to work in iOS 8 anymore) + if (ios) { + te.style.width = "0px" + } + + on(te, "input", function() { + if (ie && ie_version >= 9 && this$1.hasSelection) { + this$1.hasSelection = null + } + input.poll() + }) + + on(te, "paste", function(e) { + if (signalDOMEvent(cm, e) || handlePaste(e, cm)) { + return + } + + cm.state.pasteIncoming = +new Date() + input.fastPoll() + }) + + function prepareCopyCut(e) { + if (signalDOMEvent(cm, e)) { + return + } + if (cm.somethingSelected()) { + setLastCopied({ lineWise: false, text: cm.getSelections() }) + } else if (!cm.options.lineWiseCopyCut) { + return + } else { + var ranges = copyableRanges(cm) + setLastCopied({ lineWise: true, text: ranges.text }) + if (e.type == "cut") { + cm.setSelections(ranges.ranges, null, sel_dontScroll) + } else { + input.prevInput = "" + te.value = ranges.text.join("\n") + selectInput(te) + } + } + if (e.type == "cut") { + cm.state.cutIncoming = +new Date() + } + } + on(te, "cut", prepareCopyCut) + on(te, "copy", prepareCopyCut) + + on(display.scroller, "paste", function(e) { + if (eventInWidget(display, e) || signalDOMEvent(cm, e)) { + return + } + if (!te.dispatchEvent) { + cm.state.pasteIncoming = +new Date() + input.focus() + return + } + + // Pass the `paste` event to the textarea so it's handled by its event listener. + var event = new Event("paste") + event.clipboardData = e.clipboardData + te.dispatchEvent(event) + }) + + // Prevent normal selection in the editor (we handle our own) + on(display.lineSpace, "selectstart", function(e) { + if (!eventInWidget(display, e)) { + e_preventDefault(e) + } + }) + + on(te, "compositionstart", function() { + var start = cm.getCursor("from") + if (input.composing) { + input.composing.range.clear() + } + input.composing = { + start: start, + range: cm.markText(start, cm.getCursor("to"), { className: "CodeMirror-composing" }) + } + }) + on(te, "compositionend", function() { + if (input.composing) { + input.poll() + input.composing.range.clear() + input.composing = null + } + }) + } + + TextareaInput.prototype.createField = function(_display) { + // Wraps and hides input textarea + this.wrapper = hiddenTextarea() + // The semihidden textarea that is focused when the editor is + // focused, and receives input. + this.textarea = this.wrapper.firstChild + } + + TextareaInput.prototype.prepareSelection = function() { + // Redraw the selection and/or cursor + var cm = this.cm, + display = cm.display, + doc = cm.doc + var result = prepareSelection(cm) + + // Move the hidden textarea near the cursor to prevent scrolling artifacts + if (cm.options.moveInputWithCursor) { + var headPos = cursorCoords(cm, doc.sel.primary().head, "div") + var wrapOff = display.wrapper.getBoundingClientRect(), + lineOff = display.lineDiv.getBoundingClientRect() + result.teTop = Math.max( + 0, + Math.min(display.wrapper.clientHeight - 10, headPos.top + lineOff.top - wrapOff.top) + ) + result.teLeft = Math.max( + 0, + Math.min( + display.wrapper.clientWidth - 10, + headPos.left + lineOff.left - wrapOff.left + ) + ) + } + + return result + } + + TextareaInput.prototype.showSelection = function(drawn) { + var cm = this.cm, + display = cm.display + removeChildrenAndAdd(display.cursorDiv, drawn.cursors) + removeChildrenAndAdd(display.selectionDiv, drawn.selection) + if (drawn.teTop != null) { + this.wrapper.style.top = drawn.teTop + "px" + this.wrapper.style.left = drawn.teLeft + "px" + } + } + + // Reset the input to correspond to the selection (or to be empty, + // when not typing and nothing is selected) + TextareaInput.prototype.reset = function(typing) { + if (this.contextMenuPending || this.composing) { + return + } + var cm = this.cm + if (cm.somethingSelected()) { + this.prevInput = "" + var content = cm.getSelection() + this.textarea.value = content + if (cm.state.focused) { + selectInput(this.textarea) + } + if (ie && ie_version >= 9) { + this.hasSelection = content + } + } else if (!typing) { + this.prevInput = this.textarea.value = "" + if (ie && ie_version >= 9) { + this.hasSelection = null + } + } + } + + TextareaInput.prototype.getField = function() { + return this.textarea + } + + TextareaInput.prototype.supportsTouch = function() { + return false + } + + TextareaInput.prototype.focus = function() { + if (this.cm.options.readOnly != "nocursor" && (!mobile || activeElt() != this.textarea)) { + try { + this.textarea.focus() + } catch (e) {} // IE8 will throw if the textarea is display: none or not in DOM + } + } + + TextareaInput.prototype.blur = function() { + this.textarea.blur() + } + + TextareaInput.prototype.resetPosition = function() { + this.wrapper.style.top = this.wrapper.style.left = 0 + } + + TextareaInput.prototype.receivedFocus = function() { + this.slowPoll() + } + + // Poll for input changes, using the normal rate of polling. This + // runs as long as the editor is focused. + TextareaInput.prototype.slowPoll = function() { + var this$1 = this + + if (this.pollingFast) { + return + } + this.polling.set(this.cm.options.pollInterval, function() { + this$1.poll() + if (this$1.cm.state.focused) { + this$1.slowPoll() + } + }) + } + + // When an event has just come in that is likely to add or change + // something in the input textarea, we poll faster, to ensure that + // the change appears on the screen quickly. + TextareaInput.prototype.fastPoll = function() { + var missed = false, + input = this + input.pollingFast = true + function p() { + var changed = input.poll() + if (!changed && !missed) { + missed = true + input.polling.set(60, p) + } else { + input.pollingFast = false + input.slowPoll() + } + } + input.polling.set(20, p) + } + + // Read input from the textarea, and update the document to match. + // When something is selected, it is present in the textarea, and + // selected (unless it is huge, in which case a placeholder is + // used). When nothing is selected, the cursor sits after previously + // seen text (can be empty), which is stored in prevInput (we must + // not reset the textarea when typing, because that breaks IME). + TextareaInput.prototype.poll = function() { + var this$1 = this + + var cm = this.cm, + input = this.textarea, + prevInput = this.prevInput + // Since this is called a *lot*, try to bail out as cheaply as + // possible when it is clear that nothing happened. hasSelection + // will be the case when there is a lot of text in the textarea, + // in which case reading its value would be expensive. + if ( + this.contextMenuPending || + !cm.state.focused || + (hasSelection(input) && !prevInput && !this.composing) || + cm.isReadOnly() || + cm.options.disableInput || + cm.state.keySeq + ) { + return false + } + + var text = input.value + // If nothing changed, bail. + if (text == prevInput && !cm.somethingSelected()) { + return false + } + // Work around nonsensical selection resetting in IE9/10, and + // inexplicable appearance of private area unicode characters on + // some key combos in Mac (#2689). + if ( + (ie && ie_version >= 9 && this.hasSelection === text) || + (mac && /[\uf700-\uf7ff]/.test(text)) + ) { + cm.display.input.reset() + return false + } + + if (cm.doc.sel == cm.display.selForContextMenu) { + var first = text.charCodeAt(0) + if (first == 0x200b && !prevInput) { + prevInput = "\u200b" + } + if (first == 0x21da) { + this.reset() + return this.cm.execCommand("undo") + } + } + // Find the part of the input that is actually new + var same = 0, + l = Math.min(prevInput.length, text.length) + while (same < l && prevInput.charCodeAt(same) == text.charCodeAt(same)) { + ++same + } + + runInOp(cm, function() { + applyTextInput( + cm, + text.slice(same), + prevInput.length - same, + null, + this$1.composing ? "*compose" : null + ) + + // Don't leave long text in the textarea, since it makes further polling slow + if (text.length > 1000 || text.indexOf("\n") > -1) { + input.value = this$1.prevInput = "" + } else { + this$1.prevInput = text + } + + if (this$1.composing) { + this$1.composing.range.clear() + this$1.composing.range = cm.markText(this$1.composing.start, cm.getCursor("to"), { + className: "CodeMirror-composing" + }) + } + }) + return true + } + + TextareaInput.prototype.ensurePolled = function() { + if (this.pollingFast && this.poll()) { + this.pollingFast = false + } + } + + TextareaInput.prototype.onKeyPress = function() { + if (ie && ie_version >= 9) { + this.hasSelection = null + } + this.fastPoll() + } + + TextareaInput.prototype.onContextMenu = function(e) { + var input = this, + cm = input.cm, + display = cm.display, + te = input.textarea + if (input.contextMenuPending) { + input.contextMenuPending() + } + var pos = posFromMouse(cm, e), + scrollPos = display.scroller.scrollTop + if (!pos || presto) { + return + } // Opera is difficult. + + // Reset the current text selection only if the click is done outside of the selection + // and 'resetSelectionOnContextMenu' option is true. + var reset = cm.options.resetSelectionOnContextMenu + if (reset && cm.doc.sel.contains(pos) == -1) { + operation(cm, setSelection)(cm.doc, simpleSelection(pos), sel_dontScroll) + } + + var oldCSS = te.style.cssText, + oldWrapperCSS = input.wrapper.style.cssText + var wrapperBox = input.wrapper.offsetParent.getBoundingClientRect() + input.wrapper.style.cssText = "position: static" + te.style.cssText = + "position: absolute; width: 30px; height: 30px;\n top: " + + (e.clientY - wrapperBox.top - 5) + + "px; left: " + + (e.clientX - wrapperBox.left - 5) + + "px;\n z-index: 1000; background: " + + (ie ? "rgba(255, 255, 255, .05)" : "transparent") + + ";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);" + var oldScrollY + if (webkit) { + oldScrollY = window.scrollY + } // Work around Chrome issue (#2712) + display.input.focus() + if (webkit) { + window.scrollTo(null, oldScrollY) + } + display.input.reset() + // Adds "Select all" to context menu in FF + if (!cm.somethingSelected()) { + te.value = input.prevInput = " " + } + input.contextMenuPending = rehide + display.selForContextMenu = cm.doc.sel + clearTimeout(display.detectingSelectAll) + + // Select-all will be greyed out if there's nothing to select, so + // this adds a zero-width space so that we can later check whether + // it got selected. + function prepareSelectAllHack() { + if (te.selectionStart != null) { + var selected = cm.somethingSelected() + var extval = "\u200b" + (selected ? te.value : "") + te.value = "\u21da" // Used to catch context-menu undo + te.value = extval + input.prevInput = selected ? "" : "\u200b" + te.selectionStart = 1 + te.selectionEnd = extval.length + // Re-set this, in case some other handler touched the + // selection in the meantime. + display.selForContextMenu = cm.doc.sel + } + } + function rehide() { + if (input.contextMenuPending != rehide) { + return + } + input.contextMenuPending = false + input.wrapper.style.cssText = oldWrapperCSS + te.style.cssText = oldCSS + if (ie && ie_version < 9) { + display.scrollbars.setScrollTop((display.scroller.scrollTop = scrollPos)) + } + + // Try to detect the user choosing select-all + if (te.selectionStart != null) { + if (!ie || (ie && ie_version < 9)) { + prepareSelectAllHack() + } + var i = 0, + poll = function() { + if ( + display.selForContextMenu == cm.doc.sel && + te.selectionStart == 0 && + te.selectionEnd > 0 && + input.prevInput == "\u200b" + ) { + operation(cm, selectAll)(cm) + } else if (i++ < 10) { + display.detectingSelectAll = setTimeout(poll, 500) + } else { + display.selForContextMenu = null + display.input.reset() + } + } + display.detectingSelectAll = setTimeout(poll, 200) + } + } + + if (ie && ie_version >= 9) { + prepareSelectAllHack() + } + if (captureRightClick) { + e_stop(e) + var mouseup = function() { + off(window, "mouseup", mouseup) + setTimeout(rehide, 20) + } + on(window, "mouseup", mouseup) + } else { + setTimeout(rehide, 50) + } + } + + TextareaInput.prototype.readOnlyChanged = function(val) { + if (!val) { + this.reset() + } + this.textarea.disabled = val == "nocursor" + } + + TextareaInput.prototype.setUneditable = function() {} + + TextareaInput.prototype.needsContentAttribute = false + + function fromTextArea(textarea, options) { + options = options ? copyObj(options) : {} + options.value = textarea.value + if (!options.tabindex && textarea.tabIndex) { + options.tabindex = textarea.tabIndex + } + if (!options.placeholder && textarea.placeholder) { + options.placeholder = textarea.placeholder + } + // Set autofocus to true if this textarea is focused, or if it has + // autofocus and no other element is focused. + if (options.autofocus == null) { + var hasFocus = activeElt() + options.autofocus = + hasFocus == textarea || + (textarea.getAttribute("autofocus") != null && hasFocus == document.body) + } + + function save() { + textarea.value = cm.getValue() + } + + var realSubmit + if (textarea.form) { + on(textarea.form, "submit", save) + // Deplorable hack to make the submit method do the right thing. + if (!options.leaveSubmitMethodAlone) { + var form = textarea.form + realSubmit = form.submit + try { + var wrappedSubmit = (form.submit = function() { + save() + form.submit = realSubmit + form.submit() + form.submit = wrappedSubmit + }) + } catch (e) {} + } + } + + options.finishInit = function(cm) { + cm.save = save + cm.getTextArea = function() { + return textarea + } + cm.toTextArea = function() { + cm.toTextArea = isNaN // Prevent this from being ran twice + save() + textarea.parentNode.removeChild(cm.getWrapperElement()) + textarea.style.display = "" + if (textarea.form) { + off(textarea.form, "submit", save) + if ( + !options.leaveSubmitMethodAlone && + typeof textarea.form.submit == "function" + ) { + textarea.form.submit = realSubmit + } + } + } + } + + textarea.style.display = "none" + var cm = CodeMirror(function(node) { + return textarea.parentNode.insertBefore(node, textarea.nextSibling) + }, options) + return cm + } + + function addLegacyProps(CodeMirror) { + CodeMirror.off = off + CodeMirror.on = on + CodeMirror.wheelEventPixels = wheelEventPixels + CodeMirror.Doc = Doc + CodeMirror.splitLines = splitLinesAuto + CodeMirror.countColumn = countColumn + CodeMirror.findColumn = findColumn + CodeMirror.isWordChar = isWordCharBasic + CodeMirror.Pass = Pass + CodeMirror.signal = signal + CodeMirror.Line = Line + CodeMirror.changeEnd = changeEnd + CodeMirror.scrollbarModel = scrollbarModel + CodeMirror.Pos = Pos + CodeMirror.cmpPos = cmp + CodeMirror.modes = modes + CodeMirror.mimeModes = mimeModes + CodeMirror.resolveMode = resolveMode + CodeMirror.getMode = getMode + CodeMirror.modeExtensions = modeExtensions + CodeMirror.extendMode = extendMode + CodeMirror.copyState = copyState + CodeMirror.startState = startState + CodeMirror.innerMode = innerMode + CodeMirror.commands = commands + CodeMirror.keyMap = keyMap + CodeMirror.keyName = keyName + CodeMirror.isModifierKey = isModifierKey + CodeMirror.lookupKey = lookupKey + CodeMirror.normalizeKeyMap = normalizeKeyMap + CodeMirror.StringStream = StringStream + CodeMirror.SharedTextMarker = SharedTextMarker + CodeMirror.TextMarker = TextMarker + CodeMirror.LineWidget = LineWidget + CodeMirror.e_preventDefault = e_preventDefault + CodeMirror.e_stopPropagation = e_stopPropagation + CodeMirror.e_stop = e_stop + CodeMirror.addClass = addClass + CodeMirror.contains = contains + CodeMirror.rmClass = rmClass + CodeMirror.keyNames = keyNames + } + + // EDITOR CONSTRUCTOR + + defineOptions(CodeMirror) + + addEditorMethods(CodeMirror) + + // Set up methods on CodeMirror's prototype to redirect to the editor's document. + var dontDelegate = "iter insert remove copy getEditor constructor".split(" ") + for (var prop in Doc.prototype) { + if (Doc.prototype.hasOwnProperty(prop) && indexOf(dontDelegate, prop) < 0) { + CodeMirror.prototype[prop] = (function(method) { + return function() { + return method.apply(this.doc, arguments) + } + })(Doc.prototype[prop]) + } + } + + eventMixin(Doc) + CodeMirror.inputStyles = { textarea: TextareaInput, contenteditable: ContentEditableInput } + + // Extra arguments are stored as the mode's dependencies, which is + // used by (legacy) mechanisms like loadmode.js to automatically + // load a mode. (Preferred mechanism is the require/define calls.) + CodeMirror.defineMode = function(name /*, mode, …*/) { + if (!CodeMirror.defaults.mode && name != "null") { + CodeMirror.defaults.mode = name + } + defineMode.apply(this, arguments) + } + + CodeMirror.defineMIME = defineMIME + + // Minimal default mode. + CodeMirror.defineMode("null", function() { + return { + token: function(stream) { + return stream.skipToEnd() + } + } + }) + CodeMirror.defineMIME("text/plain", "null") + + // EXTENSIONS + + CodeMirror.defineExtension = function(name, func) { + CodeMirror.prototype[name] = func + } + CodeMirror.defineDocExtension = function(name, func) { + Doc.prototype[name] = func + } + + CodeMirror.fromTextArea = fromTextArea + + addLegacyProps(CodeMirror) + + CodeMirror.version = "5.51.0" + + return CodeMirror +}) diff --git a/docs/assets/getting-started-assets/javascripts/codemirror/theme/xq-light.css b/docs/assets/getting-started-assets/javascripts/codemirror/theme/xq-light.css new file mode 100755 index 0000000000..20b5c79614 --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/codemirror/theme/xq-light.css @@ -0,0 +1,43 @@ +/* +Copyright (C) 2011 by MarkLogic Corporation +Author: Mike Brevoort + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +*/ +.cm-s-xq-light span.cm-keyword {line-height: 1em; font-weight: bold; color: #5A5CAD; } +.cm-s-xq-light span.cm-atom {color: #6C8CD5;} +.cm-s-xq-light span.cm-number {color: #164;} +.cm-s-xq-light span.cm-def {text-decoration:underline;} +.cm-s-xq-light span.cm-variable {color: black; } +.cm-s-xq-light span.cm-variable-2 {color:black;} +.cm-s-xq-light span.cm-variable-3 {color: black; } +.cm-s-xq-light span.cm-property {} +.cm-s-xq-light span.cm-operator {} +.cm-s-xq-light span.cm-comment {color: #0080FF; font-style: italic;} +.cm-s-xq-light span.cm-string {color: red;} +.cm-s-xq-light span.cm-meta {color: yellow;} +.cm-s-xq-light span.cm-qualifier {color: grey} +.cm-s-xq-light span.cm-builtin {color: #7EA656;} +.cm-s-xq-light span.cm-bracket {color: #cc7;} +.cm-s-xq-light span.cm-tag {color: #3F7F7F;} +.cm-s-xq-light span.cm-attribute {color: #7F007F;} +.cm-s-xq-light span.cm-error {color: #f00;} + +.cm-s-xq-light .CodeMirror-activeline-background {background: #e8f2ff !important;} +.cm-s-xq-light .CodeMirror-matchingbracket {outline:1px solid grey;color:black !important;background:yellow;} \ No newline at end of file diff --git a/docs/assets/getting-started-assets/javascripts/jquery-2.1.4.min.js b/docs/assets/getting-started-assets/javascripts/jquery-2.1.4.min.js new file mode 100755 index 0000000000..7c734648aa --- /dev/null +++ b/docs/assets/getting-started-assets/javascripts/jquery-2.1.4.min.js @@ -0,0 +1,4913 @@ +/*! jQuery v2.1.4 | (c) 2005, 2015 jQuery Foundation, Inc. | jquery.org/license */ +!(function(a, b) { + "object" == typeof module && "object" == typeof module.exports + ? (module.exports = a.document + ? b(a, !0) + : function(a) { + if (!a.document) throw new Error("jQuery requires a window with a document") + return b(a) + }) + : b(a) +})("undefined" != typeof window ? window : this, function(a, b) { + var c = [], + d = c.slice, + e = c.concat, + f = c.push, + g = c.indexOf, + h = {}, + i = h.toString, + j = h.hasOwnProperty, + k = {}, + l = a.document, + m = "2.1.4", + n = function(a, b) { + return new n.fn.init(a, b) + }, + o = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, + p = /^-ms-/, + q = /-([\da-z])/gi, + r = function(a, b) { + return b.toUpperCase() + } + ;(n.fn = n.prototype = { + jquery: m, + constructor: n, + selector: "", + length: 0, + toArray: function() { + return d.call(this) + }, + get: function(a) { + return null != a ? (0 > a ? this[a + this.length] : this[a]) : d.call(this) + }, + pushStack: function(a) { + var b = n.merge(this.constructor(), a) + return (b.prevObject = this), (b.context = this.context), b + }, + each: function(a, b) { + return n.each(this, a, b) + }, + map: function(a) { + return this.pushStack( + n.map(this, function(b, c) { + return a.call(b, c, b) + }) + ) + }, + slice: function() { + return this.pushStack(d.apply(this, arguments)) + }, + first: function() { + return this.eq(0) + }, + last: function() { + return this.eq(-1) + }, + eq: function(a) { + var b = this.length, + c = +a + (0 > a ? b : 0) + return this.pushStack(c >= 0 && b > c ? [this[c]] : []) + }, + end: function() { + return this.prevObject || this.constructor(null) + }, + push: f, + sort: c.sort, + splice: c.splice + }), + (n.extend = n.fn.extend = function() { + var a, + b, + c, + d, + e, + f, + g = arguments[0] || {}, + h = 1, + i = arguments.length, + j = !1 + for ( + "boolean" == typeof g && ((j = g), (g = arguments[h] || {}), h++), + "object" == typeof g || n.isFunction(g) || (g = {}), + h === i && ((g = this), h--); + i > h; + h++ + ) + if (null != (a = arguments[h])) + for (b in a) + (c = g[b]), + (d = a[b]), + g !== d && + (j && d && (n.isPlainObject(d) || (e = n.isArray(d))) + ? (e + ? ((e = !1), (f = c && n.isArray(c) ? c : [])) + : (f = c && n.isPlainObject(c) ? c : {}), + (g[b] = n.extend(j, f, d))) + : void 0 !== d && (g[b] = d)) + return g + }), + n.extend({ + expando: "jQuery" + (m + Math.random()).replace(/\D/g, ""), + isReady: !0, + error: function(a) { + throw new Error(a) + }, + noop: function() {}, + isFunction: function(a) { + return "function" === n.type(a) + }, + isArray: Array.isArray, + isWindow: function(a) { + return null != a && a === a.window + }, + isNumeric: function(a) { + return !n.isArray(a) && a - parseFloat(a) + 1 >= 0 + }, + isPlainObject: function(a) { + return "object" !== n.type(a) || a.nodeType || n.isWindow(a) + ? !1 + : a.constructor && !j.call(a.constructor.prototype, "isPrototypeOf") + ? !1 + : !0 + }, + isEmptyObject: function(a) { + var b + for (b in a) return !1 + return !0 + }, + type: function(a) { + return null == a + ? a + "" + : "object" == typeof a || "function" == typeof a + ? h[i.call(a)] || "object" + : typeof a + }, + globalEval: function(a) { + var b, + c = eval + ;(a = n.trim(a)), + a && + (1 === a.indexOf("use strict") + ? ((b = l.createElement("script")), + (b.text = a), + l.head.appendChild(b).parentNode.removeChild(b)) + : c(a)) + }, + camelCase: function(a) { + return a.replace(p, "ms-").replace(q, r) + }, + nodeName: function(a, b) { + return a.nodeName && a.nodeName.toLowerCase() === b.toLowerCase() + }, + each: function(a, b, c) { + var d, + e = 0, + f = a.length, + g = s(a) + if (c) { + if (g) { + for (; f > e; e++) if (((d = b.apply(a[e], c)), d === !1)) break + } else for (e in a) if (((d = b.apply(a[e], c)), d === !1)) break + } else if (g) { + for (; f > e; e++) if (((d = b.call(a[e], e, a[e])), d === !1)) break + } else for (e in a) if (((d = b.call(a[e], e, a[e])), d === !1)) break + return a + }, + trim: function(a) { + return null == a ? "" : (a + "").replace(o, "") + }, + makeArray: function(a, b) { + var c = b || [] + return ( + null != a && + (s(Object(a)) ? n.merge(c, "string" == typeof a ? [a] : a) : f.call(c, a)), + c + ) + }, + inArray: function(a, b, c) { + return null == b ? -1 : g.call(b, a, c) + }, + merge: function(a, b) { + for (var c = +b.length, d = 0, e = a.length; c > d; d++) a[e++] = b[d] + return (a.length = e), a + }, + grep: function(a, b, c) { + for (var d, e = [], f = 0, g = a.length, h = !c; g > f; f++) + (d = !b(a[f], f)), d !== h && e.push(a[f]) + return e + }, + map: function(a, b, c) { + var d, + f = 0, + g = a.length, + h = s(a), + i = [] + if (h) for (; g > f; f++) (d = b(a[f], f, c)), null != d && i.push(d) + else for (f in a) (d = b(a[f], f, c)), null != d && i.push(d) + return e.apply([], i) + }, + guid: 1, + proxy: function(a, b) { + var c, e, f + return ( + "string" == typeof b && ((c = a[b]), (b = a), (a = c)), + n.isFunction(a) + ? ((e = d.call(arguments, 2)), + (f = function() { + return a.apply(b || this, e.concat(d.call(arguments))) + }), + (f.guid = a.guid = a.guid || n.guid++), + f) + : void 0 + ) + }, + now: Date.now, + support: k + }), + n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function( + a, + b + ) { + h["[object " + b + "]"] = b.toLowerCase() + }) + function s(a) { + var b = "length" in a && a.length, + c = n.type(a) + return "function" === c || n.isWindow(a) + ? !1 + : 1 === a.nodeType && b + ? !0 + : "array" === c || 0 === b || ("number" == typeof b && b > 0 && b - 1 in a) + } + var t = (function(a) { + var b, + c, + d, + e, + f, + g, + h, + i, + j, + k, + l, + m, + n, + o, + p, + q, + r, + s, + t, + u = "sizzle" + 1 * new Date(), + v = a.document, + w = 0, + x = 0, + y = ha(), + z = ha(), + A = ha(), + B = function(a, b) { + return a === b && (l = !0), 0 + }, + C = 1 << 31, + D = {}.hasOwnProperty, + E = [], + F = E.pop, + G = E.push, + H = E.push, + I = E.slice, + J = function(a, b) { + for (var c = 0, d = a.length; d > c; c++) if (a[c] === b) return c + return -1 + }, + K = + "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", + L = "[\\x20\\t\\r\\n\\f]", + M = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", + N = M.replace("w", "w#"), + O = + "\\[" + + L + + "*(" + + M + + ")(?:" + + L + + "*([*^$|!~]?=)" + + L + + "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + + N + + "))|)" + + L + + "*\\]", + P = + ":(" + + M + + ")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|" + + O + + ")*)|.*)\\)|)", + Q = new RegExp(L + "+", "g"), + R = new RegExp("^" + L + "+|((?:^|[^\\\\])(?:\\\\.)*)" + L + "+$", "g"), + S = new RegExp("^" + L + "*," + L + "*"), + T = new RegExp("^" + L + "*([>+~]|" + L + ")" + L + "*"), + U = new RegExp("=" + L + "*([^\\]'\"]*?)" + L + "*\\]", "g"), + V = new RegExp(P), + W = new RegExp("^" + N + "$"), + X = { + ID: new RegExp("^#(" + M + ")"), + CLASS: new RegExp("^\\.(" + M + ")"), + TAG: new RegExp("^(" + M.replace("w", "w*") + ")"), + ATTR: new RegExp("^" + O), + PSEUDO: new RegExp("^" + P), + CHILD: new RegExp( + "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + + L + + "*(even|odd|(([+-]|)(\\d*)n|)" + + L + + "*(?:([+-]|)" + + L + + "*(\\d+)|))" + + L + + "*\\)|)", + "i" + ), + bool: new RegExp("^(?:" + K + ")$", "i"), + needsContext: new RegExp( + "^" + + L + + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + + L + + "*((?:-\\d)?\\d*)" + + L + + "*\\)|)(?=[^-]|$)", + "i" + ) + }, + Y = /^(?:input|select|textarea|button)$/i, + Z = /^h\d$/i, + $ = /^[^{]+\{\s*\[native \w/, + _ = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, + aa = /[+~]/, + ba = /'|\\/g, + ca = new RegExp("\\\\([\\da-f]{1,6}" + L + "?|(" + L + ")|.)", "ig"), + da = function(a, b, c) { + var d = "0x" + b - 65536 + return d !== d || c + ? b + : 0 > d + ? String.fromCharCode(d + 65536) + : String.fromCharCode((d >> 10) | 55296, (1023 & d) | 56320) + }, + ea = function() { + m() + } + try { + H.apply((E = I.call(v.childNodes)), v.childNodes), E[v.childNodes.length].nodeType + } catch (fa) { + H = { + apply: E.length + ? function(a, b) { + G.apply(a, I.call(b)) + } + : function(a, b) { + var c = a.length, + d = 0 + while ((a[c++] = b[d++])); + a.length = c - 1 + } + } + } + function ga(a, b, d, e) { + var f, h, j, k, l, o, r, s, w, x + if ( + ((b ? b.ownerDocument || b : v) !== n && m(b), + (b = b || n), + (d = d || []), + (k = b.nodeType), + "string" != typeof a || !a || (1 !== k && 9 !== k && 11 !== k)) + ) + return d + if (!e && p) { + if (11 !== k && (f = _.exec(a))) + if ((j = f[1])) { + if (9 === k) { + if (((h = b.getElementById(j)), !h || !h.parentNode)) return d + if (h.id === j) return d.push(h), d + } else if ( + b.ownerDocument && + (h = b.ownerDocument.getElementById(j)) && + t(b, h) && + h.id === j + ) + return d.push(h), d + } else { + if (f[2]) return H.apply(d, b.getElementsByTagName(a)), d + if ((j = f[3]) && c.getElementsByClassName) + return H.apply(d, b.getElementsByClassName(j)), d + } + if (c.qsa && (!q || !q.test(a))) { + if ( + ((s = r = u), + (w = b), + (x = 1 !== k && a), + 1 === k && "object" !== b.nodeName.toLowerCase()) + ) { + ;(o = g(a)), + (r = b.getAttribute("id")) + ? (s = r.replace(ba, "\\$&")) + : b.setAttribute("id", s), + (s = "[id='" + s + "'] "), + (l = o.length) + while (l--) o[l] = s + ra(o[l]) + ;(w = (aa.test(a) && pa(b.parentNode)) || b), (x = o.join(",")) + } + if (x) + try { + return H.apply(d, w.querySelectorAll(x)), d + } catch (y) { + } finally { + r || b.removeAttribute("id") + } + } + } + return i(a.replace(R, "$1"), b, d, e) + } + function ha() { + var a = [] + function b(c, e) { + return a.push(c + " ") > d.cacheLength && delete b[a.shift()], (b[c + " "] = e) + } + return b + } + function ia(a) { + return (a[u] = !0), a + } + function ja(a) { + var b = n.createElement("div") + try { + return !!a(b) + } catch (c) { + return !1 + } finally { + b.parentNode && b.parentNode.removeChild(b), (b = null) + } + } + function ka(a, b) { + var c = a.split("|"), + e = a.length + while (e--) d.attrHandle[c[e]] = b + } + function la(a, b) { + var c = b && a, + d = + c && + 1 === a.nodeType && + 1 === b.nodeType && + (~b.sourceIndex || C) - (~a.sourceIndex || C) + if (d) return d + if (c) while ((c = c.nextSibling)) if (c === b) return -1 + return a ? 1 : -1 + } + function ma(a) { + return function(b) { + var c = b.nodeName.toLowerCase() + return "input" === c && b.type === a + } + } + function na(a) { + return function(b) { + var c = b.nodeName.toLowerCase() + return ("input" === c || "button" === c) && b.type === a + } + } + function oa(a) { + return ia(function(b) { + return ( + (b = +b), + ia(function(c, d) { + var e, + f = a([], c.length, b), + g = f.length + while (g--) c[(e = f[g])] && (c[e] = !(d[e] = c[e])) + }) + ) + }) + } + function pa(a) { + return a && "undefined" != typeof a.getElementsByTagName && a + } + ;(c = ga.support = {}), + (f = ga.isXML = function(a) { + var b = a && (a.ownerDocument || a).documentElement + return b ? "HTML" !== b.nodeName : !1 + }), + (m = ga.setDocument = function(a) { + var b, + e, + g = a ? a.ownerDocument || a : v + return g !== n && 9 === g.nodeType && g.documentElement + ? ((n = g), + (o = g.documentElement), + (e = g.defaultView), + e && + e !== e.top && + (e.addEventListener + ? e.addEventListener("unload", ea, !1) + : e.attachEvent && e.attachEvent("onunload", ea)), + (p = !f(g)), + (c.attributes = ja(function(a) { + return (a.className = "i"), !a.getAttribute("className") + })), + (c.getElementsByTagName = ja(function(a) { + return ( + a.appendChild(g.createComment("")), + !a.getElementsByTagName("*").length + ) + })), + (c.getElementsByClassName = $.test(g.getElementsByClassName)), + (c.getById = ja(function(a) { + return ( + (o.appendChild(a).id = u), + !g.getElementsByName || !g.getElementsByName(u).length + ) + })), + c.getById + ? ((d.find.ID = function(a, b) { + if ("undefined" != typeof b.getElementById && p) { + var c = b.getElementById(a) + return c && c.parentNode ? [c] : [] + } + }), + (d.filter.ID = function(a) { + var b = a.replace(ca, da) + return function(a) { + return a.getAttribute("id") === b + } + })) + : (delete d.find.ID, + (d.filter.ID = function(a) { + var b = a.replace(ca, da) + return function(a) { + var c = + "undefined" != typeof a.getAttributeNode && + a.getAttributeNode("id") + return c && c.value === b + } + })), + (d.find.TAG = c.getElementsByTagName + ? function(a, b) { + return "undefined" != typeof b.getElementsByTagName + ? b.getElementsByTagName(a) + : c.qsa + ? b.querySelectorAll(a) + : void 0 + } + : function(a, b) { + var c, + d = [], + e = 0, + f = b.getElementsByTagName(a) + if ("*" === a) { + while ((c = f[e++])) 1 === c.nodeType && d.push(c) + return d + } + return f + }), + (d.find.CLASS = + c.getElementsByClassName && + function(a, b) { + return p ? b.getElementsByClassName(a) : void 0 + }), + (r = []), + (q = []), + (c.qsa = $.test(g.querySelectorAll)) && + (ja(function(a) { + ;(o.appendChild(a).innerHTML = + ""), + a.querySelectorAll("[msallowcapture^='']").length && + q.push("[*^$]=" + L + "*(?:''|\"\")"), + a.querySelectorAll("[selected]").length || + q.push("\\[" + L + "*(?:value|" + K + ")"), + a.querySelectorAll("[id~=" + u + "-]").length || q.push("~="), + a.querySelectorAll(":checked").length || q.push(":checked"), + a.querySelectorAll("a#" + u + "+*").length || q.push(".#.+[+~]") + }), + ja(function(a) { + var b = g.createElement("input") + b.setAttribute("type", "hidden"), + a.appendChild(b).setAttribute("name", "D"), + a.querySelectorAll("[name=d]").length && + q.push("name" + L + "*[*^$|!~]?="), + a.querySelectorAll(":enabled").length || + q.push(":enabled", ":disabled"), + a.querySelectorAll("*,:x"), + q.push(",.*:") + })), + (c.matchesSelector = $.test( + (s = + o.matches || + o.webkitMatchesSelector || + o.mozMatchesSelector || + o.oMatchesSelector || + o.msMatchesSelector) + )) && + ja(function(a) { + ;(c.disconnectedMatch = s.call(a, "div")), + s.call(a, "[s!='']:x"), + r.push("!=", P) + }), + (q = q.length && new RegExp(q.join("|"))), + (r = r.length && new RegExp(r.join("|"))), + (b = $.test(o.compareDocumentPosition)), + (t = + b || $.test(o.contains) + ? function(a, b) { + var c = 9 === a.nodeType ? a.documentElement : a, + d = b && b.parentNode + return ( + a === d || + !( + !d || + 1 !== d.nodeType || + !(c.contains + ? c.contains(d) + : a.compareDocumentPosition && + 16 & a.compareDocumentPosition(d)) + ) + ) + } + : function(a, b) { + if (b) while ((b = b.parentNode)) if (b === a) return !0 + return !1 + }), + (B = b + ? function(a, b) { + if (a === b) return (l = !0), 0 + var d = !a.compareDocumentPosition - !b.compareDocumentPosition + return d + ? d + : ((d = + (a.ownerDocument || a) === (b.ownerDocument || b) + ? a.compareDocumentPosition(b) + : 1), + 1 & d || + (!c.sortDetached && b.compareDocumentPosition(a) === d) + ? a === g || (a.ownerDocument === v && t(v, a)) + ? -1 + : b === g || (b.ownerDocument === v && t(v, b)) + ? 1 + : k + ? J(k, a) - J(k, b) + : 0 + : 4 & d + ? -1 + : 1) + } + : function(a, b) { + if (a === b) return (l = !0), 0 + var c, + d = 0, + e = a.parentNode, + f = b.parentNode, + h = [a], + i = [b] + if (!e || !f) + return a === g + ? -1 + : b === g + ? 1 + : e + ? -1 + : f + ? 1 + : k + ? J(k, a) - J(k, b) + : 0 + if (e === f) return la(a, b) + c = a + while ((c = c.parentNode)) h.unshift(c) + c = b + while ((c = c.parentNode)) i.unshift(c) + while (h[d] === i[d]) d++ + return d ? la(h[d], i[d]) : h[d] === v ? -1 : i[d] === v ? 1 : 0 + }), + g) + : n + }), + (ga.matches = function(a, b) { + return ga(a, null, null, b) + }), + (ga.matchesSelector = function(a, b) { + if ( + ((a.ownerDocument || a) !== n && m(a), + (b = b.replace(U, "='$1']")), + !(!c.matchesSelector || !p || (r && r.test(b)) || (q && q.test(b)))) + ) + try { + var d = s.call(a, b) + if (d || c.disconnectedMatch || (a.document && 11 !== a.document.nodeType)) + return d + } catch (e) {} + return ga(b, n, null, [a]).length > 0 + }), + (ga.contains = function(a, b) { + return (a.ownerDocument || a) !== n && m(a), t(a, b) + }), + (ga.attr = function(a, b) { + ;(a.ownerDocument || a) !== n && m(a) + var e = d.attrHandle[b.toLowerCase()], + f = e && D.call(d.attrHandle, b.toLowerCase()) ? e(a, b, !p) : void 0 + return void 0 !== f + ? f + : c.attributes || !p + ? a.getAttribute(b) + : (f = a.getAttributeNode(b)) && f.specified + ? f.value + : null + }), + (ga.error = function(a) { + throw new Error("Syntax error, unrecognized expression: " + a) + }), + (ga.uniqueSort = function(a) { + var b, + d = [], + e = 0, + f = 0 + if (((l = !c.detectDuplicates), (k = !c.sortStable && a.slice(0)), a.sort(B), l)) { + while ((b = a[f++])) b === a[f] && (e = d.push(f)) + while (e--) a.splice(d[e], 1) + } + return (k = null), a + }), + (e = ga.getText = function(a) { + var b, + c = "", + d = 0, + f = a.nodeType + if (f) { + if (1 === f || 9 === f || 11 === f) { + if ("string" == typeof a.textContent) return a.textContent + for (a = a.firstChild; a; a = a.nextSibling) c += e(a) + } else if (3 === f || 4 === f) return a.nodeValue + } else while ((b = a[d++])) c += e(b) + return c + }), + (d = ga.selectors = { + cacheLength: 50, + createPseudo: ia, + match: X, + attrHandle: {}, + find: {}, + relative: { + ">": { dir: "parentNode", first: !0 }, + " ": { dir: "parentNode" }, + "+": { dir: "previousSibling", first: !0 }, + "~": { dir: "previousSibling" } + }, + preFilter: { + ATTR: function(a) { + return ( + (a[1] = a[1].replace(ca, da)), + (a[3] = (a[3] || a[4] || a[5] || "").replace(ca, da)), + "~=" === a[2] && (a[3] = " " + a[3] + " "), + a.slice(0, 4) + ) + }, + CHILD: function(a) { + return ( + (a[1] = a[1].toLowerCase()), + "nth" === a[1].slice(0, 3) + ? (a[3] || ga.error(a[0]), + (a[4] = +(a[4] + ? a[5] + (a[6] || 1) + : 2 * ("even" === a[3] || "odd" === a[3]))), + (a[5] = +(a[7] + a[8] || "odd" === a[3]))) + : a[3] && ga.error(a[0]), + a + ) + }, + PSEUDO: function(a) { + var b, + c = !a[6] && a[2] + return X.CHILD.test(a[0]) + ? null + : (a[3] + ? (a[2] = a[4] || a[5] || "") + : c && + V.test(c) && + (b = g(c, !0)) && + (b = c.indexOf(")", c.length - b) - c.length) && + ((a[0] = a[0].slice(0, b)), (a[2] = c.slice(0, b))), + a.slice(0, 3)) + } + }, + filter: { + TAG: function(a) { + var b = a.replace(ca, da).toLowerCase() + return "*" === a + ? function() { + return !0 + } + : function(a) { + return a.nodeName && a.nodeName.toLowerCase() === b + } + }, + CLASS: function(a) { + var b = y[a + " "] + return ( + b || + ((b = new RegExp("(^|" + L + ")" + a + "(" + L + "|$)")) && + y(a, function(a) { + return b.test( + ("string" == typeof a.className && a.className) || + ("undefined" != typeof a.getAttribute && + a.getAttribute("class")) || + "" + ) + })) + ) + }, + ATTR: function(a, b, c) { + return function(d) { + var e = ga.attr(d, a) + return null == e + ? "!=" === b + : b + ? ((e += ""), + "=" === b + ? e === c + : "!=" === b + ? e !== c + : "^=" === b + ? c && 0 === e.indexOf(c) + : "*=" === b + ? c && e.indexOf(c) > -1 + : "$=" === b + ? c && e.slice(-c.length) === c + : "~=" === b + ? (" " + e.replace(Q, " ") + " ").indexOf(c) > -1 + : "|=" === b + ? e === c || e.slice(0, c.length + 1) === c + "-" + : !1) + : !0 + } + }, + CHILD: function(a, b, c, d, e) { + var f = "nth" !== a.slice(0, 3), + g = "last" !== a.slice(-4), + h = "of-type" === b + return 1 === d && 0 === e + ? function(a) { + return !!a.parentNode + } + : function(b, c, i) { + var j, + k, + l, + m, + n, + o, + p = f !== g ? "nextSibling" : "previousSibling", + q = b.parentNode, + r = h && b.nodeName.toLowerCase(), + s = !i && !h + if (q) { + if (f) { + while (p) { + l = b + while ((l = l[p])) + if ( + h + ? l.nodeName.toLowerCase() === r + : 1 === l.nodeType + ) + return !1 + o = p = "only" === a && !o && "nextSibling" + } + return !0 + } + if (((o = [g ? q.firstChild : q.lastChild]), g && s)) { + ;(k = q[u] || (q[u] = {})), + (j = k[a] || []), + (n = j[0] === w && j[1]), + (m = j[0] === w && j[2]), + (l = n && q.childNodes[n]) + while ((l = (++n && l && l[p]) || (m = n = 0) || o.pop())) + if (1 === l.nodeType && ++m && l === b) { + k[a] = [w, n, m] + break + } + } else if (s && (j = (b[u] || (b[u] = {}))[a]) && j[0] === w) + m = j[1] + else + while ((l = (++n && l && l[p]) || (m = n = 0) || o.pop())) + if ( + (h + ? l.nodeName.toLowerCase() === r + : 1 === l.nodeType) && + ++m && + (s && ((l[u] || (l[u] = {}))[a] = [w, m]), + l === b) + ) + break + return (m -= e), m === d || (m % d === 0 && m / d >= 0) + } + } + }, + PSEUDO: function(a, b) { + var c, + e = + d.pseudos[a] || + d.setFilters[a.toLowerCase()] || + ga.error("unsupported pseudo: " + a) + return e[u] + ? e(b) + : e.length > 1 + ? ((c = [a, a, "", b]), + d.setFilters.hasOwnProperty(a.toLowerCase()) + ? ia(function(a, c) { + var d, + f = e(a, b), + g = f.length + while (g--) (d = J(a, f[g])), (a[d] = !(c[d] = f[g])) + }) + : function(a) { + return e(a, 0, c) + }) + : e + } + }, + pseudos: { + not: ia(function(a) { + var b = [], + c = [], + d = h(a.replace(R, "$1")) + return d[u] + ? ia(function(a, b, c, e) { + var f, + g = d(a, null, e, []), + h = a.length + while (h--) (f = g[h]) && (a[h] = !(b[h] = f)) + }) + : function(a, e, f) { + return (b[0] = a), d(b, null, f, c), (b[0] = null), !c.pop() + } + }), + has: ia(function(a) { + return function(b) { + return ga(a, b).length > 0 + } + }), + contains: ia(function(a) { + return ( + (a = a.replace(ca, da)), + function(b) { + return (b.textContent || b.innerText || e(b)).indexOf(a) > -1 + } + ) + }), + lang: ia(function(a) { + return ( + W.test(a || "") || ga.error("unsupported lang: " + a), + (a = a.replace(ca, da).toLowerCase()), + function(b) { + var c + do + if ( + (c = p + ? b.lang + : b.getAttribute("xml:lang") || b.getAttribute("lang")) + ) + return ( + (c = c.toLowerCase()), + c === a || 0 === c.indexOf(a + "-") + ) + while ((b = b.parentNode) && 1 === b.nodeType) + return !1 + } + ) + }), + target: function(b) { + var c = a.location && a.location.hash + return c && c.slice(1) === b.id + }, + root: function(a) { + return a === o + }, + focus: function(a) { + return ( + a === n.activeElement && + (!n.hasFocus || n.hasFocus()) && + !!(a.type || a.href || ~a.tabIndex) + ) + }, + enabled: function(a) { + return a.disabled === !1 + }, + disabled: function(a) { + return a.disabled === !0 + }, + checked: function(a) { + var b = a.nodeName.toLowerCase() + return ("input" === b && !!a.checked) || ("option" === b && !!a.selected) + }, + selected: function(a) { + return a.parentNode && a.parentNode.selectedIndex, a.selected === !0 + }, + empty: function(a) { + for (a = a.firstChild; a; a = a.nextSibling) if (a.nodeType < 6) return !1 + return !0 + }, + parent: function(a) { + return !d.pseudos.empty(a) + }, + header: function(a) { + return Z.test(a.nodeName) + }, + input: function(a) { + return Y.test(a.nodeName) + }, + button: function(a) { + var b = a.nodeName.toLowerCase() + return ("input" === b && "button" === a.type) || "button" === b + }, + text: function(a) { + var b + return ( + "input" === a.nodeName.toLowerCase() && + "text" === a.type && + (null == (b = a.getAttribute("type")) || "text" === b.toLowerCase()) + ) + }, + first: oa(function() { + return [0] + }), + last: oa(function(a, b) { + return [b - 1] + }), + eq: oa(function(a, b, c) { + return [0 > c ? c + b : c] + }), + even: oa(function(a, b) { + for (var c = 0; b > c; c += 2) a.push(c) + return a + }), + odd: oa(function(a, b) { + for (var c = 1; b > c; c += 2) a.push(c) + return a + }), + lt: oa(function(a, b, c) { + for (var d = 0 > c ? c + b : c; --d >= 0; ) a.push(d) + return a + }), + gt: oa(function(a, b, c) { + for (var d = 0 > c ? c + b : c; ++d < b; ) a.push(d) + return a + }) + } + }), + (d.pseudos.nth = d.pseudos.eq) + for (b in { radio: !0, checkbox: !0, file: !0, password: !0, image: !0 }) + d.pseudos[b] = ma(b) + for (b in { submit: !0, reset: !0 }) d.pseudos[b] = na(b) + function qa() {} + ;(qa.prototype = d.filters = d.pseudos), + (d.setFilters = new qa()), + (g = ga.tokenize = function(a, b) { + var c, + e, + f, + g, + h, + i, + j, + k = z[a + " "] + if (k) return b ? 0 : k.slice(0) + ;(h = a), (i = []), (j = d.preFilter) + while (h) { + ;(!c || (e = S.exec(h))) && + (e && (h = h.slice(e[0].length) || h), i.push((f = []))), + (c = !1), + (e = T.exec(h)) && + ((c = e.shift()), + f.push({ value: c, type: e[0].replace(R, " ") }), + (h = h.slice(c.length))) + for (g in d.filter) + !(e = X[g].exec(h)) || + (j[g] && !(e = j[g](e))) || + ((c = e.shift()), + f.push({ value: c, type: g, matches: e }), + (h = h.slice(c.length))) + if (!c) break + } + return b ? h.length : h ? ga.error(a) : z(a, i).slice(0) + }) + function ra(a) { + for (var b = 0, c = a.length, d = ""; c > b; b++) d += a[b].value + return d + } + function sa(a, b, c) { + var d = b.dir, + e = c && "parentNode" === d, + f = x++ + return b.first + ? function(b, c, f) { + while ((b = b[d])) if (1 === b.nodeType || e) return a(b, c, f) + } + : function(b, c, g) { + var h, + i, + j = [w, f] + if (g) { + while ((b = b[d])) if ((1 === b.nodeType || e) && a(b, c, g)) return !0 + } else + while ((b = b[d])) + if (1 === b.nodeType || e) { + if ( + ((i = b[u] || (b[u] = {})), + (h = i[d]) && h[0] === w && h[1] === f) + ) + return (j[2] = h[2]) + if (((i[d] = j), (j[2] = a(b, c, g)))) return !0 + } + } + } + function ta(a) { + return a.length > 1 + ? function(b, c, d) { + var e = a.length + while (e--) if (!a[e](b, c, d)) return !1 + return !0 + } + : a[0] + } + function ua(a, b, c) { + for (var d = 0, e = b.length; e > d; d++) ga(a, b[d], c) + return c + } + function va(a, b, c, d, e) { + for (var f, g = [], h = 0, i = a.length, j = null != b; i > h; h++) + (f = a[h]) && (!c || c(f, d, e)) && (g.push(f), j && b.push(h)) + return g + } + function wa(a, b, c, d, e, f) { + return ( + d && !d[u] && (d = wa(d)), + e && !e[u] && (e = wa(e, f)), + ia(function(f, g, h, i) { + var j, + k, + l, + m = [], + n = [], + o = g.length, + p = f || ua(b || "*", h.nodeType ? [h] : h, []), + q = !a || (!f && b) ? p : va(p, m, a, h, i), + r = c ? (e || (f ? a : o || d) ? [] : g) : q + if ((c && c(q, r, h, i), d)) { + ;(j = va(r, n)), d(j, [], h, i), (k = j.length) + while (k--) (l = j[k]) && (r[n[k]] = !(q[n[k]] = l)) + } + if (f) { + if (e || a) { + if (e) { + ;(j = []), (k = r.length) + while (k--) (l = r[k]) && j.push((q[k] = l)) + e(null, (r = []), j, i) + } + k = r.length + while (k--) + (l = r[k]) && (j = e ? J(f, l) : m[k]) > -1 && (f[j] = !(g[j] = l)) + } + } else (r = va(r === g ? r.splice(o, r.length) : r)), e ? e(null, g, r, i) : H.apply(g, r) + }) + ) + } + function xa(a) { + for ( + var b, + c, + e, + f = a.length, + g = d.relative[a[0].type], + h = g || d.relative[" "], + i = g ? 1 : 0, + k = sa( + function(a) { + return a === b + }, + h, + !0 + ), + l = sa( + function(a) { + return J(b, a) > -1 + }, + h, + !0 + ), + m = [ + function(a, c, d) { + var e = + (!g && (d || c !== j)) || + ((b = c).nodeType ? k(a, c, d) : l(a, c, d)) + return (b = null), e + } + ]; + f > i; + i++ + ) + if ((c = d.relative[a[i].type])) m = [sa(ta(m), c)] + else { + if (((c = d.filter[a[i].type].apply(null, a[i].matches)), c[u])) { + for (e = ++i; f > e; e++) if (d.relative[a[e].type]) break + return wa( + i > 1 && ta(m), + i > 1 && + ra( + a + .slice(0, i - 1) + .concat({ value: " " === a[i - 2].type ? "*" : "" }) + ).replace(R, "$1"), + c, + e > i && xa(a.slice(i, e)), + f > e && xa((a = a.slice(e))), + f > e && ra(a) + ) + } + m.push(c) + } + return ta(m) + } + function ya(a, b) { + var c = b.length > 0, + e = a.length > 0, + f = function(f, g, h, i, k) { + var l, + m, + o, + p = 0, + q = "0", + r = f && [], + s = [], + t = j, + u = f || (e && d.find.TAG("*", k)), + v = (w += null == t ? 1 : Math.random() || 0.1), + x = u.length + for (k && (j = g !== n && g); q !== x && null != (l = u[q]); q++) { + if (e && l) { + m = 0 + while ((o = a[m++])) + if (o(l, g, h)) { + i.push(l) + break + } + k && (w = v) + } + c && ((l = !o && l) && p--, f && r.push(l)) + } + if (((p += q), c && q !== p)) { + m = 0 + while ((o = b[m++])) o(r, s, g, h) + if (f) { + if (p > 0) while (q--) r[q] || s[q] || (s[q] = F.call(i)) + s = va(s) + } + H.apply(i, s), + k && !f && s.length > 0 && p + b.length > 1 && ga.uniqueSort(i) + } + return k && ((w = v), (j = t)), r + } + return c ? ia(f) : f + } + return ( + (h = ga.compile = function(a, b) { + var c, + d = [], + e = [], + f = A[a + " "] + if (!f) { + b || (b = g(a)), (c = b.length) + while (c--) (f = xa(b[c])), f[u] ? d.push(f) : e.push(f) + ;(f = A(a, ya(e, d))), (f.selector = a) + } + return f + }), + (i = ga.select = function(a, b, e, f) { + var i, + j, + k, + l, + m, + n = "function" == typeof a && a, + o = !f && g((a = n.selector || a)) + if (((e = e || []), 1 === o.length)) { + if ( + ((j = o[0] = o[0].slice(0)), + j.length > 2 && + "ID" === (k = j[0]).type && + c.getById && + 9 === b.nodeType && + p && + d.relative[j[1].type]) + ) { + if (((b = (d.find.ID(k.matches[0].replace(ca, da), b) || [])[0]), !b)) + return e + n && (b = b.parentNode), (a = a.slice(j.shift().value.length)) + } + i = X.needsContext.test(a) ? 0 : j.length + while (i--) { + if (((k = j[i]), d.relative[(l = k.type)])) break + if ( + (m = d.find[l]) && + (f = m( + k.matches[0].replace(ca, da), + (aa.test(j[0].type) && pa(b.parentNode)) || b + )) + ) { + if ((j.splice(i, 1), (a = f.length && ra(j)), !a)) + return H.apply(e, f), e + break + } + } + } + return (n || h(a, o))(f, b, !p, e, (aa.test(a) && pa(b.parentNode)) || b), e + }), + (c.sortStable = + u + .split("") + .sort(B) + .join("") === u), + (c.detectDuplicates = !!l), + m(), + (c.sortDetached = ja(function(a) { + return 1 & a.compareDocumentPosition(n.createElement("div")) + })), + ja(function(a) { + return (a.innerHTML = ""), "#" === a.firstChild.getAttribute("href") + }) || + ka("type|href|height|width", function(a, b, c) { + return c ? void 0 : a.getAttribute(b, "type" === b.toLowerCase() ? 1 : 2) + }), + (c.attributes && + ja(function(a) { + return ( + (a.innerHTML = ""), + a.firstChild.setAttribute("value", ""), + "" === a.firstChild.getAttribute("value") + ) + })) || + ka("value", function(a, b, c) { + return c || "input" !== a.nodeName.toLowerCase() ? void 0 : a.defaultValue + }), + ja(function(a) { + return null == a.getAttribute("disabled") + }) || + ka(K, function(a, b, c) { + var d + return c + ? void 0 + : a[b] === !0 + ? b.toLowerCase() + : (d = a.getAttributeNode(b)) && d.specified + ? d.value + : null + }), + ga + ) + })(a) + ;(n.find = t), + (n.expr = t.selectors), + (n.expr[":"] = n.expr.pseudos), + (n.unique = t.uniqueSort), + (n.text = t.getText), + (n.isXMLDoc = t.isXML), + (n.contains = t.contains) + var u = n.expr.match.needsContext, + v = /^<(\w+)\s*\/?>(?:<\/\1>|)$/, + w = /^.[^:#\[\.,]*$/ + function x(a, b, c) { + if (n.isFunction(b)) + return n.grep(a, function(a, d) { + return !!b.call(a, d, a) !== c + }) + if (b.nodeType) + return n.grep(a, function(a) { + return (a === b) !== c + }) + if ("string" == typeof b) { + if (w.test(b)) return n.filter(b, a, c) + b = n.filter(b, a) + } + return n.grep(a, function(a) { + return g.call(b, a) >= 0 !== c + }) + } + ;(n.filter = function(a, b, c) { + var d = b[0] + return ( + c && (a = ":not(" + a + ")"), + 1 === b.length && 1 === d.nodeType + ? n.find.matchesSelector(d, a) + ? [d] + : [] + : n.find.matches( + a, + n.grep(b, function(a) { + return 1 === a.nodeType + }) + ) + ) + }), + n.fn.extend({ + find: function(a) { + var b, + c = this.length, + d = [], + e = this + if ("string" != typeof a) + return this.pushStack( + n(a).filter(function() { + for (b = 0; c > b; b++) if (n.contains(e[b], this)) return !0 + }) + ) + for (b = 0; c > b; b++) n.find(a, e[b], d) + return ( + (d = this.pushStack(c > 1 ? n.unique(d) : d)), + (d.selector = this.selector ? this.selector + " " + a : a), + d + ) + }, + filter: function(a) { + return this.pushStack(x(this, a || [], !1)) + }, + not: function(a) { + return this.pushStack(x(this, a || [], !0)) + }, + is: function(a) { + return !!x(this, "string" == typeof a && u.test(a) ? n(a) : a || [], !1).length + } + }) + var y, + z = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, + A = (n.fn.init = function(a, b) { + var c, d + if (!a) return this + if ("string" == typeof a) { + if ( + ((c = + "<" === a[0] && ">" === a[a.length - 1] && a.length >= 3 + ? [null, a, null] + : z.exec(a)), + !c || (!c[1] && b)) + ) + return !b || b.jquery ? (b || y).find(a) : this.constructor(b).find(a) + if (c[1]) { + if ( + ((b = b instanceof n ? b[0] : b), + n.merge( + this, + n.parseHTML(c[1], b && b.nodeType ? b.ownerDocument || b : l, !0) + ), + v.test(c[1]) && n.isPlainObject(b)) + ) + for (c in b) n.isFunction(this[c]) ? this[c](b[c]) : this.attr(c, b[c]) + return this + } + return ( + (d = l.getElementById(c[2])), + d && d.parentNode && ((this.length = 1), (this[0] = d)), + (this.context = l), + (this.selector = a), + this + ) + } + return a.nodeType + ? ((this.context = this[0] = a), (this.length = 1), this) + : n.isFunction(a) + ? "undefined" != typeof y.ready + ? y.ready(a) + : a(n) + : (void 0 !== a.selector && + ((this.selector = a.selector), (this.context = a.context)), + n.makeArray(a, this)) + }) + ;(A.prototype = n.fn), (y = n(l)) + var B = /^(?:parents|prev(?:Until|All))/, + C = { children: !0, contents: !0, next: !0, prev: !0 } + n.extend({ + dir: function(a, b, c) { + var d = [], + e = void 0 !== c + while ((a = a[b]) && 9 !== a.nodeType) + if (1 === a.nodeType) { + if (e && n(a).is(c)) break + d.push(a) + } + return d + }, + sibling: function(a, b) { + for (var c = []; a; a = a.nextSibling) 1 === a.nodeType && a !== b && c.push(a) + return c + } + }), + n.fn.extend({ + has: function(a) { + var b = n(a, this), + c = b.length + return this.filter(function() { + for (var a = 0; c > a; a++) if (n.contains(this, b[a])) return !0 + }) + }, + closest: function(a, b) { + for ( + var c, + d = 0, + e = this.length, + f = [], + g = u.test(a) || "string" != typeof a ? n(a, b || this.context) : 0; + e > d; + d++ + ) + for (c = this[d]; c && c !== b; c = c.parentNode) + if ( + c.nodeType < 11 && + (g ? g.index(c) > -1 : 1 === c.nodeType && n.find.matchesSelector(c, a)) + ) { + f.push(c) + break + } + return this.pushStack(f.length > 1 ? n.unique(f) : f) + }, + index: function(a) { + return a + ? "string" == typeof a + ? g.call(n(a), this[0]) + : g.call(this, a.jquery ? a[0] : a) + : this[0] && this[0].parentNode + ? this.first().prevAll().length + : -1 + }, + add: function(a, b) { + return this.pushStack(n.unique(n.merge(this.get(), n(a, b)))) + }, + addBack: function(a) { + return this.add(null == a ? this.prevObject : this.prevObject.filter(a)) + } + }) + function D(a, b) { + while ((a = a[b]) && 1 !== a.nodeType); + return a + } + n.each( + { + parent: function(a) { + var b = a.parentNode + return b && 11 !== b.nodeType ? b : null + }, + parents: function(a) { + return n.dir(a, "parentNode") + }, + parentsUntil: function(a, b, c) { + return n.dir(a, "parentNode", c) + }, + next: function(a) { + return D(a, "nextSibling") + }, + prev: function(a) { + return D(a, "previousSibling") + }, + nextAll: function(a) { + return n.dir(a, "nextSibling") + }, + prevAll: function(a) { + return n.dir(a, "previousSibling") + }, + nextUntil: function(a, b, c) { + return n.dir(a, "nextSibling", c) + }, + prevUntil: function(a, b, c) { + return n.dir(a, "previousSibling", c) + }, + siblings: function(a) { + return n.sibling((a.parentNode || {}).firstChild, a) + }, + children: function(a) { + return n.sibling(a.firstChild) + }, + contents: function(a) { + return a.contentDocument || n.merge([], a.childNodes) + } + }, + function(a, b) { + n.fn[a] = function(c, d) { + var e = n.map(this, b, c) + return ( + "Until" !== a.slice(-5) && (d = c), + d && "string" == typeof d && (e = n.filter(d, e)), + this.length > 1 && (C[a] || n.unique(e), B.test(a) && e.reverse()), + this.pushStack(e) + ) + } + } + ) + var E = /\S+/g, + F = {} + function G(a) { + var b = (F[a] = {}) + return ( + n.each(a.match(E) || [], function(a, c) { + b[c] = !0 + }), + b + ) + } + ;(n.Callbacks = function(a) { + a = "string" == typeof a ? F[a] || G(a) : n.extend({}, a) + var b, + c, + d, + e, + f, + g, + h = [], + i = !a.once && [], + j = function(l) { + for ( + b = a.memory && l, c = !0, g = e || 0, e = 0, f = h.length, d = !0; + h && f > g; + g++ + ) + if (h[g].apply(l[0], l[1]) === !1 && a.stopOnFalse) { + b = !1 + break + } + ;(d = !1), h && (i ? i.length && j(i.shift()) : b ? (h = []) : k.disable()) + }, + k = { + add: function() { + if (h) { + var c = h.length + !(function g(b) { + n.each(b, function(b, c) { + var d = n.type(c) + "function" === d + ? (a.unique && k.has(c)) || h.push(c) + : c && c.length && "string" !== d && g(c) + }) + })(arguments), + d ? (f = h.length) : b && ((e = c), j(b)) + } + return this + }, + remove: function() { + return ( + h && + n.each(arguments, function(a, b) { + var c + while ((c = n.inArray(b, h, c)) > -1) + h.splice(c, 1), d && (f >= c && f--, g >= c && g--) + }), + this + ) + }, + has: function(a) { + return a ? n.inArray(a, h) > -1 : !(!h || !h.length) + }, + empty: function() { + return (h = []), (f = 0), this + }, + disable: function() { + return (h = i = b = void 0), this + }, + disabled: function() { + return !h + }, + lock: function() { + return (i = void 0), b || k.disable(), this + }, + locked: function() { + return !i + }, + fireWith: function(a, b) { + return ( + !h || + (c && !i) || + ((b = b || []), + (b = [a, b.slice ? b.slice() : b]), + d ? i.push(b) : j(b)), + this + ) + }, + fire: function() { + return k.fireWith(this, arguments), this + }, + fired: function() { + return !!c + } + } + return k + }), + n.extend({ + Deferred: function(a) { + var b = [ + ["resolve", "done", n.Callbacks("once memory"), "resolved"], + ["reject", "fail", n.Callbacks("once memory"), "rejected"], + ["notify", "progress", n.Callbacks("memory")] + ], + c = "pending", + d = { + state: function() { + return c + }, + always: function() { + return e.done(arguments).fail(arguments), this + }, + then: function() { + var a = arguments + return n + .Deferred(function(c) { + n.each(b, function(b, f) { + var g = n.isFunction(a[b]) && a[b] + e[f[1]](function() { + var a = g && g.apply(this, arguments) + a && n.isFunction(a.promise) + ? a + .promise() + .done(c.resolve) + .fail(c.reject) + .progress(c.notify) + : c[f[0] + "With"]( + this === d ? c.promise() : this, + g ? [a] : arguments + ) + }) + }), + (a = null) + }) + .promise() + }, + promise: function(a) { + return null != a ? n.extend(a, d) : d + } + }, + e = {} + return ( + (d.pipe = d.then), + n.each(b, function(a, f) { + var g = f[2], + h = f[3] + ;(d[f[1]] = g.add), + h && + g.add( + function() { + c = h + }, + b[1 ^ a][2].disable, + b[2][2].lock + ), + (e[f[0]] = function() { + return e[f[0] + "With"](this === e ? d : this, arguments), this + }), + (e[f[0] + "With"] = g.fireWith) + }), + d.promise(e), + a && a.call(e, e), + e + ) + }, + when: function(a) { + var b = 0, + c = d.call(arguments), + e = c.length, + f = 1 !== e || (a && n.isFunction(a.promise)) ? e : 0, + g = 1 === f ? a : n.Deferred(), + h = function(a, b, c) { + return function(e) { + ;(b[a] = this), + (c[a] = arguments.length > 1 ? d.call(arguments) : e), + c === i ? g.notifyWith(b, c) : --f || g.resolveWith(b, c) + } + }, + i, + j, + k + if (e > 1) + for (i = new Array(e), j = new Array(e), k = new Array(e); e > b; b++) + c[b] && n.isFunction(c[b].promise) + ? c[b] + .promise() + .done(h(b, k, c)) + .fail(g.reject) + .progress(h(b, j, i)) + : --f + return f || g.resolveWith(k, c), g.promise() + } + }) + var H + ;(n.fn.ready = function(a) { + return n.ready.promise().done(a), this + }), + n.extend({ + isReady: !1, + readyWait: 1, + holdReady: function(a) { + a ? n.readyWait++ : n.ready(!0) + }, + ready: function(a) { + ;(a === !0 ? --n.readyWait : n.isReady) || + ((n.isReady = !0), + (a !== !0 && --n.readyWait > 0) || + (H.resolveWith(l, [n]), + n.fn.triggerHandler && (n(l).triggerHandler("ready"), n(l).off("ready")))) + } + }) + function I() { + l.removeEventListener("DOMContentLoaded", I, !1), + a.removeEventListener("load", I, !1), + n.ready() + } + ;(n.ready.promise = function(b) { + return ( + H || + ((H = n.Deferred()), + "complete" === l.readyState + ? setTimeout(n.ready) + : (l.addEventListener("DOMContentLoaded", I, !1), + a.addEventListener("load", I, !1))), + H.promise(b) + ) + }), + n.ready.promise() + var J = (n.access = function(a, b, c, d, e, f, g) { + var h = 0, + i = a.length, + j = null == c + if ("object" === n.type(c)) { + e = !0 + for (h in c) n.access(a, b, h, c[h], !0, f, g) + } else if ( + void 0 !== d && + ((e = !0), + n.isFunction(d) || (g = !0), + j && + (g + ? (b.call(a, d), (b = null)) + : ((j = b), + (b = function(a, b, c) { + return j.call(n(a), c) + }))), + b) + ) + for (; i > h; h++) b(a[h], c, g ? d : d.call(a[h], h, b(a[h], c))) + return e ? a : j ? b.call(a) : i ? b(a[0], c) : f + }) + n.acceptData = function(a) { + return 1 === a.nodeType || 9 === a.nodeType || !+a.nodeType + } + function K() { + Object.defineProperty((this.cache = {}), 0, { + get: function() { + return {} + } + }), + (this.expando = n.expando + K.uid++) + } + ;(K.uid = 1), + (K.accepts = n.acceptData), + (K.prototype = { + key: function(a) { + if (!K.accepts(a)) return 0 + var b = {}, + c = a[this.expando] + if (!c) { + c = K.uid++ + try { + ;(b[this.expando] = { value: c }), Object.defineProperties(a, b) + } catch (d) { + ;(b[this.expando] = c), n.extend(a, b) + } + } + return this.cache[c] || (this.cache[c] = {}), c + }, + set: function(a, b, c) { + var d, + e = this.key(a), + f = this.cache[e] + if ("string" == typeof b) f[b] = c + else if (n.isEmptyObject(f)) n.extend(this.cache[e], b) + else for (d in b) f[d] = b[d] + return f + }, + get: function(a, b) { + var c = this.cache[this.key(a)] + return void 0 === b ? c : c[b] + }, + access: function(a, b, c) { + var d + return void 0 === b || (b && "string" == typeof b && void 0 === c) + ? ((d = this.get(a, b)), void 0 !== d ? d : this.get(a, n.camelCase(b))) + : (this.set(a, b, c), void 0 !== c ? c : b) + }, + remove: function(a, b) { + var c, + d, + e, + f = this.key(a), + g = this.cache[f] + if (void 0 === b) this.cache[f] = {} + else { + n.isArray(b) + ? (d = b.concat(b.map(n.camelCase))) + : ((e = n.camelCase(b)), + b in g ? (d = [b, e]) : ((d = e), (d = d in g ? [d] : d.match(E) || []))), + (c = d.length) + while (c--) delete g[d[c]] + } + }, + hasData: function(a) { + return !n.isEmptyObject(this.cache[a[this.expando]] || {}) + }, + discard: function(a) { + a[this.expando] && delete this.cache[a[this.expando]] + } + }) + var L = new K(), + M = new K(), + N = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, + O = /([A-Z])/g + function P(a, b, c) { + var d + if (void 0 === c && 1 === a.nodeType) + if ( + ((d = "data-" + b.replace(O, "-$1").toLowerCase()), + (c = a.getAttribute(d)), + "string" == typeof c) + ) { + try { + c = + "true" === c + ? !0 + : "false" === c + ? !1 + : "null" === c + ? null + : +c + "" === c + ? +c + : N.test(c) + ? n.parseJSON(c) + : c + } catch (e) {} + M.set(a, b, c) + } else c = void 0 + return c + } + n.extend({ + hasData: function(a) { + return M.hasData(a) || L.hasData(a) + }, + data: function(a, b, c) { + return M.access(a, b, c) + }, + removeData: function(a, b) { + M.remove(a, b) + }, + _data: function(a, b, c) { + return L.access(a, b, c) + }, + _removeData: function(a, b) { + L.remove(a, b) + } + }), + n.fn.extend({ + data: function(a, b) { + var c, + d, + e, + f = this[0], + g = f && f.attributes + if (void 0 === a) { + if ( + this.length && + ((e = M.get(f)), 1 === f.nodeType && !L.get(f, "hasDataAttrs")) + ) { + c = g.length + while (c--) + g[c] && + ((d = g[c].name), + 0 === d.indexOf("data-") && + ((d = n.camelCase(d.slice(5))), P(f, d, e[d]))) + L.set(f, "hasDataAttrs", !0) + } + return e + } + return "object" == typeof a + ? this.each(function() { + M.set(this, a) + }) + : J( + this, + function(b) { + var c, + d = n.camelCase(a) + if (f && void 0 === b) { + if (((c = M.get(f, a)), void 0 !== c)) return c + if (((c = M.get(f, d)), void 0 !== c)) return c + if (((c = P(f, d, void 0)), void 0 !== c)) return c + } else + this.each(function() { + var c = M.get(this, d) + M.set(this, d, b), + -1 !== a.indexOf("-") && void 0 !== c && M.set(this, a, b) + }) + }, + null, + b, + arguments.length > 1, + null, + !0 + ) + }, + removeData: function(a) { + return this.each(function() { + M.remove(this, a) + }) + } + }), + n.extend({ + queue: function(a, b, c) { + var d + return a + ? ((b = (b || "fx") + "queue"), + (d = L.get(a, b)), + c && (!d || n.isArray(c) ? (d = L.access(a, b, n.makeArray(c))) : d.push(c)), + d || []) + : void 0 + }, + dequeue: function(a, b) { + b = b || "fx" + var c = n.queue(a, b), + d = c.length, + e = c.shift(), + f = n._queueHooks(a, b), + g = function() { + n.dequeue(a, b) + } + "inprogress" === e && ((e = c.shift()), d--), + e && ("fx" === b && c.unshift("inprogress"), delete f.stop, e.call(a, g, f)), + !d && f && f.empty.fire() + }, + _queueHooks: function(a, b) { + var c = b + "queueHooks" + return ( + L.get(a, c) || + L.access(a, c, { + empty: n.Callbacks("once memory").add(function() { + L.remove(a, [b + "queue", c]) + }) + }) + ) + } + }), + n.fn.extend({ + queue: function(a, b) { + var c = 2 + return ( + "string" != typeof a && ((b = a), (a = "fx"), c--), + arguments.length < c + ? n.queue(this[0], a) + : void 0 === b + ? this + : this.each(function() { + var c = n.queue(this, a, b) + n._queueHooks(this, a), + "fx" === a && "inprogress" !== c[0] && n.dequeue(this, a) + }) + ) + }, + dequeue: function(a) { + return this.each(function() { + n.dequeue(this, a) + }) + }, + clearQueue: function(a) { + return this.queue(a || "fx", []) + }, + promise: function(a, b) { + var c, + d = 1, + e = n.Deferred(), + f = this, + g = this.length, + h = function() { + --d || e.resolveWith(f, [f]) + } + "string" != typeof a && ((b = a), (a = void 0)), (a = a || "fx") + while (g--) + (c = L.get(f[g], a + "queueHooks")), c && c.empty && (d++, c.empty.add(h)) + return h(), e.promise(b) + } + }) + var Q = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source, + R = ["Top", "Right", "Bottom", "Left"], + S = function(a, b) { + return (a = b || a), "none" === n.css(a, "display") || !n.contains(a.ownerDocument, a) + }, + T = /^(?:checkbox|radio)$/i + !(function() { + var a = l.createDocumentFragment(), + b = a.appendChild(l.createElement("div")), + c = l.createElement("input") + c.setAttribute("type", "radio"), + c.setAttribute("checked", "checked"), + c.setAttribute("name", "t"), + b.appendChild(c), + (k.checkClone = b.cloneNode(!0).cloneNode(!0).lastChild.checked), + (b.innerHTML = ""), + (k.noCloneChecked = !!b.cloneNode(!0).lastChild.defaultValue) + })() + var U = "undefined" + k.focusinBubbles = "onfocusin" in a + var V = /^key/, + W = /^(?:mouse|pointer|contextmenu)|click/, + X = /^(?:focusinfocus|focusoutblur)$/, + Y = /^([^.]*)(?:\.(.+)|)$/ + function Z() { + return !0 + } + function $() { + return !1 + } + function _() { + try { + return l.activeElement + } catch (a) {} + } + ;(n.event = { + global: {}, + add: function(a, b, c, d, e) { + var f, + g, + h, + i, + j, + k, + l, + m, + o, + p, + q, + r = L.get(a) + if (r) { + c.handler && ((f = c), (c = f.handler), (e = f.selector)), + c.guid || (c.guid = n.guid++), + (i = r.events) || (i = r.events = {}), + (g = r.handle) || + (g = r.handle = function(b) { + return typeof n !== U && n.event.triggered !== b.type + ? n.event.dispatch.apply(a, arguments) + : void 0 + }), + (b = (b || "").match(E) || [""]), + (j = b.length) + while (j--) + (h = Y.exec(b[j]) || []), + (o = q = h[1]), + (p = (h[2] || "").split(".").sort()), + o && + ((l = n.event.special[o] || {}), + (o = (e ? l.delegateType : l.bindType) || o), + (l = n.event.special[o] || {}), + (k = n.extend( + { + type: o, + origType: q, + data: d, + handler: c, + guid: c.guid, + selector: e, + needsContext: e && n.expr.match.needsContext.test(e), + namespace: p.join(".") + }, + f + )), + (m = i[o]) || + ((m = i[o] = []), + (m.delegateCount = 0), + (l.setup && l.setup.call(a, d, p, g) !== !1) || + (a.addEventListener && a.addEventListener(o, g, !1))), + l.add && + (l.add.call(a, k), k.handler.guid || (k.handler.guid = c.guid)), + e ? m.splice(m.delegateCount++, 0, k) : m.push(k), + (n.event.global[o] = !0)) + } + }, + remove: function(a, b, c, d, e) { + var f, + g, + h, + i, + j, + k, + l, + m, + o, + p, + q, + r = L.hasData(a) && L.get(a) + if (r && (i = r.events)) { + ;(b = (b || "").match(E) || [""]), (j = b.length) + while (j--) + if ( + ((h = Y.exec(b[j]) || []), + (o = q = h[1]), + (p = (h[2] || "").split(".").sort()), + o) + ) { + ;(l = n.event.special[o] || {}), + (o = (d ? l.delegateType : l.bindType) || o), + (m = i[o] || []), + (h = + h[2] && + new RegExp("(^|\\.)" + p.join("\\.(?:.*\\.|)") + "(\\.|$)")), + (g = f = m.length) + while (f--) + (k = m[f]), + (!e && q !== k.origType) || + (c && c.guid !== k.guid) || + (h && !h.test(k.namespace)) || + (d && d !== k.selector && ("**" !== d || !k.selector)) || + (m.splice(f, 1), + k.selector && m.delegateCount--, + l.remove && l.remove.call(a, k)) + g && + !m.length && + ((l.teardown && l.teardown.call(a, p, r.handle) !== !1) || + n.removeEvent(a, o, r.handle), + delete i[o]) + } else for (o in i) n.event.remove(a, o + b[j], c, d, !0) + n.isEmptyObject(i) && (delete r.handle, L.remove(a, "events")) + } + }, + trigger: function(b, c, d, e) { + var f, + g, + h, + i, + k, + m, + o, + p = [d || l], + q = j.call(b, "type") ? b.type : b, + r = j.call(b, "namespace") ? b.namespace.split(".") : [] + if ( + ((g = h = d = d || l), + 3 !== d.nodeType && + 8 !== d.nodeType && + !X.test(q + n.event.triggered) && + (q.indexOf(".") >= 0 && ((r = q.split(".")), (q = r.shift()), r.sort()), + (k = q.indexOf(":") < 0 && "on" + q), + (b = b[n.expando] ? b : new n.Event(q, "object" == typeof b && b)), + (b.isTrigger = e ? 2 : 3), + (b.namespace = r.join(".")), + (b.namespace_re = b.namespace + ? new RegExp("(^|\\.)" + r.join("\\.(?:.*\\.|)") + "(\\.|$)") + : null), + (b.result = void 0), + b.target || (b.target = d), + (c = null == c ? [b] : n.makeArray(c, [b])), + (o = n.event.special[q] || {}), + e || !o.trigger || o.trigger.apply(d, c) !== !1)) + ) { + if (!e && !o.noBubble && !n.isWindow(d)) { + for ( + i = o.delegateType || q, X.test(i + q) || (g = g.parentNode); + g; + g = g.parentNode + ) + p.push(g), (h = g) + h === (d.ownerDocument || l) && p.push(h.defaultView || h.parentWindow || a) + } + f = 0 + while ((g = p[f++]) && !b.isPropagationStopped()) + (b.type = f > 1 ? i : o.bindType || q), + (m = (L.get(g, "events") || {})[b.type] && L.get(g, "handle")), + m && m.apply(g, c), + (m = k && g[k]), + m && + m.apply && + n.acceptData(g) && + ((b.result = m.apply(g, c)), b.result === !1 && b.preventDefault()) + return ( + (b.type = q), + e || + b.isDefaultPrevented() || + (o._default && o._default.apply(p.pop(), c) !== !1) || + !n.acceptData(d) || + (k && + n.isFunction(d[q]) && + !n.isWindow(d) && + ((h = d[k]), + h && (d[k] = null), + (n.event.triggered = q), + d[q](), + (n.event.triggered = void 0), + h && (d[k] = h))), + b.result + ) + } + }, + dispatch: function(a) { + a = n.event.fix(a) + var b, + c, + e, + f, + g, + h = [], + i = d.call(arguments), + j = (L.get(this, "events") || {})[a.type] || [], + k = n.event.special[a.type] || {} + if ( + ((i[0] = a), + (a.delegateTarget = this), + !k.preDispatch || k.preDispatch.call(this, a) !== !1) + ) { + ;(h = n.event.handlers.call(this, a, j)), (b = 0) + while ((f = h[b++]) && !a.isPropagationStopped()) { + ;(a.currentTarget = f.elem), (c = 0) + while ((g = f.handlers[c++]) && !a.isImmediatePropagationStopped()) + (!a.namespace_re || a.namespace_re.test(g.namespace)) && + ((a.handleObj = g), + (a.data = g.data), + (e = ((n.event.special[g.origType] || {}).handle || g.handler).apply( + f.elem, + i + )), + void 0 !== e && + (a.result = e) === !1 && + (a.preventDefault(), a.stopPropagation())) + } + return k.postDispatch && k.postDispatch.call(this, a), a.result + } + }, + handlers: function(a, b) { + var c, + d, + e, + f, + g = [], + h = b.delegateCount, + i = a.target + if (h && i.nodeType && (!a.button || "click" !== a.type)) + for (; i !== this; i = i.parentNode || this) + if (i.disabled !== !0 || "click" !== a.type) { + for (d = [], c = 0; h > c; c++) + (f = b[c]), + (e = f.selector + " "), + void 0 === d[e] && + (d[e] = f.needsContext + ? n(e, this).index(i) >= 0 + : n.find(e, this, null, [i]).length), + d[e] && d.push(f) + d.length && g.push({ elem: i, handlers: d }) + } + return h < b.length && g.push({ elem: this, handlers: b.slice(h) }), g + }, + props: "altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split( + " " + ), + fixHooks: {}, + keyHooks: { + props: "char charCode key keyCode".split(" "), + filter: function(a, b) { + return null == a.which && (a.which = null != b.charCode ? b.charCode : b.keyCode), a + } + }, + mouseHooks: { + props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split( + " " + ), + filter: function(a, b) { + var c, + d, + e, + f = b.button + return ( + null == a.pageX && + null != b.clientX && + ((c = a.target.ownerDocument || l), + (d = c.documentElement), + (e = c.body), + (a.pageX = + b.clientX + + ((d && d.scrollLeft) || (e && e.scrollLeft) || 0) - + ((d && d.clientLeft) || (e && e.clientLeft) || 0)), + (a.pageY = + b.clientY + + ((d && d.scrollTop) || (e && e.scrollTop) || 0) - + ((d && d.clientTop) || (e && e.clientTop) || 0))), + a.which || void 0 === f || (a.which = 1 & f ? 1 : 2 & f ? 3 : 4 & f ? 2 : 0), + a + ) + } + }, + fix: function(a) { + if (a[n.expando]) return a + var b, + c, + d, + e = a.type, + f = a, + g = this.fixHooks[e] + g || + (this.fixHooks[e] = g = W.test(e) + ? this.mouseHooks + : V.test(e) + ? this.keyHooks + : {}), + (d = g.props ? this.props.concat(g.props) : this.props), + (a = new n.Event(f)), + (b = d.length) + while (b--) (c = d[b]), (a[c] = f[c]) + return ( + a.target || (a.target = l), + 3 === a.target.nodeType && (a.target = a.target.parentNode), + g.filter ? g.filter(a, f) : a + ) + }, + special: { + load: { noBubble: !0 }, + focus: { + trigger: function() { + return this !== _() && this.focus ? (this.focus(), !1) : void 0 + }, + delegateType: "focusin" + }, + blur: { + trigger: function() { + return this === _() && this.blur ? (this.blur(), !1) : void 0 + }, + delegateType: "focusout" + }, + click: { + trigger: function() { + return "checkbox" === this.type && this.click && n.nodeName(this, "input") + ? (this.click(), !1) + : void 0 + }, + _default: function(a) { + return n.nodeName(a.target, "a") + } + }, + beforeunload: { + postDispatch: function(a) { + void 0 !== a.result && + a.originalEvent && + (a.originalEvent.returnValue = a.result) + } + } + }, + simulate: function(a, b, c, d) { + var e = n.extend(new n.Event(), c, { type: a, isSimulated: !0, originalEvent: {} }) + d ? n.event.trigger(e, null, b) : n.event.dispatch.call(b, e), + e.isDefaultPrevented() && c.preventDefault() + } + }), + (n.removeEvent = function(a, b, c) { + a.removeEventListener && a.removeEventListener(b, c, !1) + }), + (n.Event = function(a, b) { + return this instanceof n.Event + ? (a && a.type + ? ((this.originalEvent = a), + (this.type = a.type), + (this.isDefaultPrevented = + a.defaultPrevented || + (void 0 === a.defaultPrevented && a.returnValue === !1) + ? Z + : $)) + : (this.type = a), + b && n.extend(this, b), + (this.timeStamp = (a && a.timeStamp) || n.now()), + void (this[n.expando] = !0)) + : new n.Event(a, b) + }), + (n.Event.prototype = { + isDefaultPrevented: $, + isPropagationStopped: $, + isImmediatePropagationStopped: $, + preventDefault: function() { + var a = this.originalEvent + ;(this.isDefaultPrevented = Z), a && a.preventDefault && a.preventDefault() + }, + stopPropagation: function() { + var a = this.originalEvent + ;(this.isPropagationStopped = Z), a && a.stopPropagation && a.stopPropagation() + }, + stopImmediatePropagation: function() { + var a = this.originalEvent + ;(this.isImmediatePropagationStopped = Z), + a && a.stopImmediatePropagation && a.stopImmediatePropagation(), + this.stopPropagation() + } + }), + n.each( + { + mouseenter: "mouseover", + mouseleave: "mouseout", + pointerenter: "pointerover", + pointerleave: "pointerout" + }, + function(a, b) { + n.event.special[a] = { + delegateType: b, + bindType: b, + handle: function(a) { + var c, + d = this, + e = a.relatedTarget, + f = a.handleObj + return ( + (!e || (e !== d && !n.contains(d, e))) && + ((a.type = f.origType), + (c = f.handler.apply(this, arguments)), + (a.type = b)), + c + ) + } + } + } + ), + k.focusinBubbles || + n.each({ focus: "focusin", blur: "focusout" }, function(a, b) { + var c = function(a) { + n.event.simulate(b, a.target, n.event.fix(a), !0) + } + n.event.special[b] = { + setup: function() { + var d = this.ownerDocument || this, + e = L.access(d, b) + e || d.addEventListener(a, c, !0), L.access(d, b, (e || 0) + 1) + }, + teardown: function() { + var d = this.ownerDocument || this, + e = L.access(d, b) - 1 + e ? L.access(d, b, e) : (d.removeEventListener(a, c, !0), L.remove(d, b)) + } + } + }), + n.fn.extend({ + on: function(a, b, c, d, e) { + var f, g + if ("object" == typeof a) { + "string" != typeof b && ((c = c || b), (b = void 0)) + for (g in a) this.on(g, b, c, a[g], e) + return this + } + if ( + (null == c && null == d + ? ((d = b), (c = b = void 0)) + : null == d && + ("string" == typeof b + ? ((d = c), (c = void 0)) + : ((d = c), (c = b), (b = void 0))), + d === !1) + ) + d = $ + else if (!d) return this + return ( + 1 === e && + ((f = d), + (d = function(a) { + return n().off(a), f.apply(this, arguments) + }), + (d.guid = f.guid || (f.guid = n.guid++))), + this.each(function() { + n.event.add(this, a, d, c, b) + }) + ) + }, + one: function(a, b, c, d) { + return this.on(a, b, c, d, 1) + }, + off: function(a, b, c) { + var d, e + if (a && a.preventDefault && a.handleObj) + return ( + (d = a.handleObj), + n(a.delegateTarget).off( + d.namespace ? d.origType + "." + d.namespace : d.origType, + d.selector, + d.handler + ), + this + ) + if ("object" == typeof a) { + for (e in a) this.off(e, b, a[e]) + return this + } + return ( + (b === !1 || "function" == typeof b) && ((c = b), (b = void 0)), + c === !1 && (c = $), + this.each(function() { + n.event.remove(this, a, c, b) + }) + ) + }, + trigger: function(a, b) { + return this.each(function() { + n.event.trigger(a, b, this) + }) + }, + triggerHandler: function(a, b) { + var c = this[0] + return c ? n.event.trigger(a, b, c, !0) : void 0 + } + }) + var aa = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, + ba = /<([\w:]+)/, + ca = /<|&#?\w+;/, + da = /<(?:script|style|link)/i, + ea = /checked\s*(?:[^=]|=\s*.checked.)/i, + fa = /^$|\/(?:java|ecma)script/i, + ga = /^true\/(.*)/, + ha = /^\s*\s*$/g, + ia = { + option: [1, ""], + thead: [1, "", "
    "], + col: [2, "", "
    "], + tr: [2, "", "
    "], + td: [3, "", "
    "], + _default: [0, "", ""] + } + ;(ia.optgroup = ia.option), + (ia.tbody = ia.tfoot = ia.colgroup = ia.caption = ia.thead), + (ia.th = ia.td) + function ja(a, b) { + return n.nodeName(a, "table") && n.nodeName(11 !== b.nodeType ? b : b.firstChild, "tr") + ? a.getElementsByTagName("tbody")[0] || + a.appendChild(a.ownerDocument.createElement("tbody")) + : a + } + function ka(a) { + return (a.type = (null !== a.getAttribute("type")) + "/" + a.type), a + } + function la(a) { + var b = ga.exec(a.type) + return b ? (a.type = b[1]) : a.removeAttribute("type"), a + } + function ma(a, b) { + for (var c = 0, d = a.length; d > c; c++) + L.set(a[c], "globalEval", !b || L.get(b[c], "globalEval")) + } + function na(a, b) { + var c, d, e, f, g, h, i, j + if (1 === b.nodeType) { + if (L.hasData(a) && ((f = L.access(a)), (g = L.set(b, f)), (j = f.events))) { + delete g.handle, (g.events = {}) + for (e in j) for (c = 0, d = j[e].length; d > c; c++) n.event.add(b, e, j[e][c]) + } + M.hasData(a) && ((h = M.access(a)), (i = n.extend({}, h)), M.set(b, i)) + } + } + function oa(a, b) { + var c = a.getElementsByTagName + ? a.getElementsByTagName(b || "*") + : a.querySelectorAll + ? a.querySelectorAll(b || "*") + : [] + return void 0 === b || (b && n.nodeName(a, b)) ? n.merge([a], c) : c + } + function pa(a, b) { + var c = b.nodeName.toLowerCase() + "input" === c && T.test(a.type) + ? (b.checked = a.checked) + : ("input" === c || "textarea" === c) && (b.defaultValue = a.defaultValue) + } + n.extend({ + clone: function(a, b, c) { + var d, + e, + f, + g, + h = a.cloneNode(!0), + i = n.contains(a.ownerDocument, a) + if (!(k.noCloneChecked || (1 !== a.nodeType && 11 !== a.nodeType) || n.isXMLDoc(a))) + for (g = oa(h), f = oa(a), d = 0, e = f.length; e > d; d++) pa(f[d], g[d]) + if (b) + if (c) + for (f = f || oa(a), g = g || oa(h), d = 0, e = f.length; e > d; d++) + na(f[d], g[d]) + else na(a, h) + return (g = oa(h, "script")), g.length > 0 && ma(g, !i && oa(a, "script")), h + }, + buildFragment: function(a, b, c, d) { + for ( + var e, f, g, h, i, j, k = b.createDocumentFragment(), l = [], m = 0, o = a.length; + o > m; + m++ + ) + if (((e = a[m]), e || 0 === e)) + if ("object" === n.type(e)) n.merge(l, e.nodeType ? [e] : e) + else if (ca.test(e)) { + ;(f = f || k.appendChild(b.createElement("div"))), + (g = (ba.exec(e) || ["", ""])[1].toLowerCase()), + (h = ia[g] || ia._default), + (f.innerHTML = h[1] + e.replace(aa, "<$1>") + h[2]), + (j = h[0]) + while (j--) f = f.lastChild + n.merge(l, f.childNodes), (f = k.firstChild), (f.textContent = "") + } else l.push(b.createTextNode(e)) + ;(k.textContent = ""), (m = 0) + while ((e = l[m++])) + if ( + (!d || -1 === n.inArray(e, d)) && + ((i = n.contains(e.ownerDocument, e)), + (f = oa(k.appendChild(e), "script")), + i && ma(f), + c) + ) { + j = 0 + while ((e = f[j++])) fa.test(e.type || "") && c.push(e) + } + return k + }, + cleanData: function(a) { + for (var b, c, d, e, f = n.event.special, g = 0; void 0 !== (c = a[g]); g++) { + if (n.acceptData(c) && ((e = c[L.expando]), e && (b = L.cache[e]))) { + if (b.events) + for (d in b.events) + f[d] ? n.event.remove(c, d) : n.removeEvent(c, d, b.handle) + L.cache[e] && delete L.cache[e] + } + delete M.cache[c[M.expando]] + } + } + }), + n.fn.extend({ + text: function(a) { + return J( + this, + function(a) { + return void 0 === a + ? n.text(this) + : this.empty().each(function() { + ;(1 === this.nodeType || + 11 === this.nodeType || + 9 === this.nodeType) && + (this.textContent = a) + }) + }, + null, + a, + arguments.length + ) + }, + append: function() { + return this.domManip(arguments, function(a) { + if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { + var b = ja(this, a) + b.appendChild(a) + } + }) + }, + prepend: function() { + return this.domManip(arguments, function(a) { + if (1 === this.nodeType || 11 === this.nodeType || 9 === this.nodeType) { + var b = ja(this, a) + b.insertBefore(a, b.firstChild) + } + }) + }, + before: function() { + return this.domManip(arguments, function(a) { + this.parentNode && this.parentNode.insertBefore(a, this) + }) + }, + after: function() { + return this.domManip(arguments, function(a) { + this.parentNode && this.parentNode.insertBefore(a, this.nextSibling) + }) + }, + remove: function(a, b) { + for (var c, d = a ? n.filter(a, this) : this, e = 0; null != (c = d[e]); e++) + b || 1 !== c.nodeType || n.cleanData(oa(c)), + c.parentNode && + (b && n.contains(c.ownerDocument, c) && ma(oa(c, "script")), + c.parentNode.removeChild(c)) + return this + }, + empty: function() { + for (var a, b = 0; null != (a = this[b]); b++) + 1 === a.nodeType && (n.cleanData(oa(a, !1)), (a.textContent = "")) + return this + }, + clone: function(a, b) { + return ( + (a = null == a ? !1 : a), + (b = null == b ? a : b), + this.map(function() { + return n.clone(this, a, b) + }) + ) + }, + html: function(a) { + return J( + this, + function(a) { + var b = this[0] || {}, + c = 0, + d = this.length + if (void 0 === a && 1 === b.nodeType) return b.innerHTML + if ( + "string" == typeof a && + !da.test(a) && + !ia[(ba.exec(a) || ["", ""])[1].toLowerCase()] + ) { + a = a.replace(aa, "<$1>") + try { + for (; d > c; c++) + (b = this[c] || {}), + 1 === b.nodeType && + (n.cleanData(oa(b, !1)), (b.innerHTML = a)) + b = 0 + } catch (e) {} + } + b && this.empty().append(a) + }, + null, + a, + arguments.length + ) + }, + replaceWith: function() { + var a = arguments[0] + return ( + this.domManip(arguments, function(b) { + ;(a = this.parentNode), n.cleanData(oa(this)), a && a.replaceChild(b, this) + }), + a && (a.length || a.nodeType) ? this : this.remove() + ) + }, + detach: function(a) { + return this.remove(a, !0) + }, + domManip: function(a, b) { + a = e.apply([], a) + var c, + d, + f, + g, + h, + i, + j = 0, + l = this.length, + m = this, + o = l - 1, + p = a[0], + q = n.isFunction(p) + if (q || (l > 1 && "string" == typeof p && !k.checkClone && ea.test(p))) + return this.each(function(c) { + var d = m.eq(c) + q && (a[0] = p.call(this, c, d.html())), d.domManip(a, b) + }) + if ( + l && + ((c = n.buildFragment(a, this[0].ownerDocument, !1, this)), + (d = c.firstChild), + 1 === c.childNodes.length && (c = d), + d) + ) { + for (f = n.map(oa(c, "script"), ka), g = f.length; l > j; j++) + (h = c), + j !== o && ((h = n.clone(h, !0, !0)), g && n.merge(f, oa(h, "script"))), + b.call(this[j], h, j) + if (g) + for (i = f[f.length - 1].ownerDocument, n.map(f, la), j = 0; g > j; j++) + (h = f[j]), + fa.test(h.type || "") && + !L.access(h, "globalEval") && + n.contains(i, h) && + (h.src + ? n._evalUrl && n._evalUrl(h.src) + : n.globalEval(h.textContent.replace(ha, ""))) + } + return this + } + }), + n.each( + { + appendTo: "append", + prependTo: "prepend", + insertBefore: "before", + insertAfter: "after", + replaceAll: "replaceWith" + }, + function(a, b) { + n.fn[a] = function(a) { + for (var c, d = [], e = n(a), g = e.length - 1, h = 0; g >= h; h++) + (c = h === g ? this : this.clone(!0)), n(e[h])[b](c), f.apply(d, c.get()) + return this.pushStack(d) + } + } + ) + var qa, + ra = {} + function sa(b, c) { + var d, + e = n(c.createElement(b)).appendTo(c.body), + f = + a.getDefaultComputedStyle && (d = a.getDefaultComputedStyle(e[0])) + ? d.display + : n.css(e[0], "display") + return e.detach(), f + } + function ta(a) { + var b = l, + c = ra[a] + return ( + c || + ((c = sa(a, b)), + ("none" !== c && c) || + ((qa = (qa || n("