diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 08dd22a05..2c9825a36 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -65,31 +65,6 @@ jobs: - run: pnpm test:fastboot-express-middleware - run: pnpm test:fastboot-app-server - integration-tests: - name: Integration Tests - runs-on: ${{ matrix.os }} - timeout-minutes: 15 - - strategy: - fail-fast: false - matrix: - node-version: [16.x, 14.x] - os: [ubuntu-latest, windows-latest] - - steps: - - name: Checkout Code - uses: actions/checkout@v4 - - uses: pnpm/action-setup@v3 - with: - version: 7 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - cache: pnpm - - run: pnpm install --frozen-lockfile - - run: pnpm test:integration - test-packages: name: Test Packages runs-on: ${{ matrix.os }} @@ -177,3 +152,47 @@ jobs: - run: pnpm install --frozen-lockfile - name: test run: pnpm --filter ember-cli-fastboot exec ember try:one ${{ matrix.ember-try-scenario }} --skip-cleanup + + discover_matrix: + runs-on: ubuntu-latest + + outputs: + matrix: ${{ steps.set-matrix.outputs.matrix }} + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 7 + - uses: actions/setup-node@v4 + with: + node-version: 16 + cache: pnpm + - run: pnpm install --frozen-lockfile + - id: set-matrix + working-directory: test-packages/test-scenarios + run: echo "matrix=$(npm run --silent test:list -- --matrix 'npm run test -- --filter %s:')" >> $GITHUB_OUTPUT + + scenario-tester: + needs: discover_matrix + name: ${{ matrix.name }} + runs-on: ubuntu-latest + timeout-minutes: 7 + + strategy: + fail-fast: false + matrix: ${{fromJson(needs.discover_matrix.outputs.matrix)}} + + steps: + - uses: actions/checkout@v4 + - uses: pnpm/action-setup@v3 + with: + version: 7 + - uses: actions/setup-node@v4 + with: + node-version: 16 + cache: pnpm + - run: pnpm install --frozen-lockfile + - name: test + run: ${{ matrix.command }} + working-directory: test-packages/test-scenarios diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..b1c3f64c1 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +auto-install-peers=false \ No newline at end of file diff --git a/README.md b/README.md index 911e362f3..3c7e3c133 100644 --- a/README.md +++ b/README.md @@ -742,13 +742,6 @@ Make sure you have `.vscode/launch.json` with minimal configuration that looks l Run the automated tests by running `npm test`. -Note that the integration tests create new Ember applications via `ember -new` and thus have to run an `npm install`, which can take several -minutes, particularly on slow connections. - -To speed up test runs you can run `npm run test:precook` to "precook" a -`node_modules` directory that will be reused across test runs. - ### Debugging Integration Tests Run the tests with the `DEBUG` environment variable set to diff --git a/packages/ember-cli-fastboot/.eslintignore b/packages/ember-cli-fastboot/.eslintignore index 922165552..701947ed3 100644 --- a/packages/ember-cli-fastboot/.eslintignore +++ b/packages/ember-cli-fastboot/.eslintignore @@ -13,6 +13,7 @@ # misc /coverage/ !.* +.*/ .eslintcache # ember-try diff --git a/packages/ember-cli-fastboot/.eslintrc.js b/packages/ember-cli-fastboot/.eslintrc.js index 577f12b96..0d0936647 100644 --- a/packages/ember-cli-fastboot/.eslintrc.js +++ b/packages/ember-cli-fastboot/.eslintrc.js @@ -1,4 +1,3 @@ -/* eslint-disable no-dupe-keys, prettier/prettier */ 'use strict'; module.exports = { @@ -18,34 +17,23 @@ module.exports = { 'plugin:prettier/recommended', ], env: { - browser: true - }, - rules: { - 'ember/no-get': 'warn', - 'ember/require-computed-property-dependencies': 'warn' + browser: true, }, rules: {}, overrides: [ // node files { files: [ - '.eslintrc.js', - '.prettierrc.js', - '.template-lintrc.js', - 'ember-cli-build.js', - 'index.js', - 'testem.js', - 'blueprints/*/index.js', - 'config/**/*.js', - 'tests/dummy/config/**/*.js', - 'lib/**/*.js' - ], - excludedFiles: [ - 'app/**', - 'addon/**', - 'addon-test-support/**', - 'app/**', - 'tests/dummy/app/**', + './.eslintrc.js', + './.prettierrc.js', + './.template-lintrc.js', + './ember-cli-build.js', + './index.js', + './testem.js', + './blueprints/*/index.js', + './config/**/*.js', + './tests/dummy/config/**/*.js', + './lib/**/*.js', ], parserOptions: { sourceType: 'script', @@ -57,5 +45,10 @@ module.exports = { plugins: ['node'], extends: ['plugin:node/recommended'], }, + { + // Test files: + files: ['tests/**/*-test.{js,ts}'], + extends: ['plugin:qunit/recommended'], + }, ], }; diff --git a/test-packages/basic-app/.gitignore b/packages/ember-cli-fastboot/.gitignore similarity index 100% rename from test-packages/basic-app/.gitignore rename to packages/ember-cli-fastboot/.gitignore diff --git a/packages/ember-cli-fastboot/.npmignore b/packages/ember-cli-fastboot/.npmignore index eb8e610c6..7f9fb3267 100644 --- a/packages/ember-cli-fastboot/.npmignore +++ b/packages/ember-cli-fastboot/.npmignore @@ -27,6 +27,7 @@ /testem.js /test/ /tests/ +/yarn-error.log /yarn.lock .gitkeep diff --git a/packages/ember-cli-fastboot/.template-lintrc.js b/packages/ember-cli-fastboot/.template-lintrc.js index 3b0b9af95..f35f61c7b 100644 --- a/packages/ember-cli-fastboot/.template-lintrc.js +++ b/packages/ember-cli-fastboot/.template-lintrc.js @@ -1,5 +1,5 @@ 'use strict'; module.exports = { - extends: 'octane', + extends: 'recommended', }; diff --git a/packages/ember-cli-fastboot/LICENSE.md b/packages/ember-cli-fastboot/LICENSE.md new file mode 100644 index 000000000..ff84a5be7 --- /dev/null +++ b/packages/ember-cli-fastboot/LICENSE.md @@ -0,0 +1,9 @@ +The MIT License (MIT) + +Copyright (c) 2024 + +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. diff --git a/packages/ember-cli-fastboot/addon/services/fastboot.js b/packages/ember-cli-fastboot/addon/services/fastboot.js index 78d4be01a..dfe7a30a7 100644 --- a/packages/ember-cli-fastboot/addon/services/fastboot.js +++ b/packages/ember-cli-fastboot/addon/services/fastboot.js @@ -14,15 +14,15 @@ const RequestObject = EObject.extend({ let request = this.request; delete this.request; - this.method = request.method; - this.body = request.body; - this.cookies = request.cookies; - this.headers = request.headers; - this.queryParams = request.queryParams; - this.path = request.path; - this.protocol = request.protocol; + this.method = request?.method; + this.body = request?.body; + this.cookies = request?.cookies; + this.headers = request?.headers; + this.queryParams = request?.queryParams; + this.path = request?.path; + this.protocol = request?.protocol; this._host = function() { - return request.host(); + return request?.host(); }; }, diff --git a/packages/ember-cli-fastboot/config/ember-try.js b/packages/ember-cli-fastboot/config/ember-try.js index 213b507a0..9056508af 100644 --- a/packages/ember-cli-fastboot/config/ember-try.js +++ b/packages/ember-cli-fastboot/config/ember-try.js @@ -27,7 +27,7 @@ module.exports = async function () { name: 'ember-lts-3.24', npm: { devDependencies: { - 'ember-source': '~3.24.0', + 'ember-source': '~3.24.3', }, }, }, @@ -39,14 +39,6 @@ module.exports = async function () { }, }, }, - { - name: 'ember-lts-4.4', - npm: { - devDependencies: { - 'ember-source': '~4.4.0', - }, - }, - }, { name: 'ember-release', npm: { diff --git a/packages/ember-cli-fastboot/ember-cli-build.js b/packages/ember-cli-fastboot/ember-cli-build.js index a778499b7..e211c6334 100644 --- a/packages/ember-cli-fastboot/ember-cli-build.js +++ b/packages/ember-cli-fastboot/ember-cli-build.js @@ -15,5 +15,11 @@ module.exports = function (defaults) { */ const { maybeEmbroider } = require('@embroider/test-setup'); - return maybeEmbroider(app); + return maybeEmbroider(app, { + skipBabel: [ + { + package: 'qunit', + }, + ], + }); }; diff --git a/packages/ember-cli-fastboot/fix-node-modules.mjs b/packages/ember-cli-fastboot/fix-node-modules.mjs deleted file mode 100644 index fdd4b85aa..000000000 --- a/packages/ember-cli-fastboot/fix-node-modules.mjs +++ /dev/null @@ -1,46 +0,0 @@ -/** - * Fix nested packages not using workspace version - * ember-cli-addon-tests will link ember-cli-fastboot and run npm install in the test apps, - * the installation will install fastboot from npm registry rather than workspace version - */ - -import path from 'path'; -import fs from 'fs-extra'; -import { fileURLToPath } from 'url'; -import chalk from 'chalk'; -const __dirname = path.dirname(fileURLToPath(import.meta.url)); - -const packagesDir = path.resolve(__dirname, '../../packages'); -const nodeModulesDir = path.resolve(__dirname, 'node_modules'); - -// eslint-disable-next-line no-undef -const shouldRestore = process.argv[2]; -if (shouldRestore === '--help' || shouldRestore === '-h') { - console.log(`Usage: node fix-node-modules.mjs [arguments] -Options: - -h, --help print this message - -r, --restore restore node_modules by removing symlinks`); -} else if (shouldRestore === '-r' || shouldRestore === '--restore') { - run(true); -} else { - run(false); -} - -function run(shouldRestore) { - ['fastboot', 'fastboot-express-middleware'].forEach((packageName) => { - const nodeModulesPackageDir = path.join(nodeModulesDir, packageName); - const workspacesPackageDir = path.resolve(packagesDir, packageName); - if (fs.existsSync(nodeModulesPackageDir)) { - console.log(chalk.blue(`remove ${nodeModulesPackageDir}`)); - fs.removeSync(nodeModulesPackageDir); - } - if (!shouldRestore) { - console.log( - chalk.green( - `symlink ${nodeModulesPackageDir} -> ${workspacesPackageDir}` - ) - ); - fs.symlinkSync(workspacesPackageDir, nodeModulesPackageDir, 'dir'); - } - }); -} diff --git a/packages/ember-cli-fastboot/package.json b/packages/ember-cli-fastboot/package.json index 24024cc2b..087ecc428 100644 --- a/packages/ember-cli-fastboot/package.json +++ b/packages/ember-cli-fastboot/package.json @@ -14,18 +14,16 @@ }, "scripts": { "build": "ember build --environment=production", - "lint": "npm-run-all --aggregate-output --continue-on-error --parallel 'lint:!(fix)'", + "lint": "npm-run-all --aggregate-output --continue-on-error --parallel \"lint:!(fix)\"", "lint:fix": "npm-run-all --aggregate-output --continue-on-error --parallel lint:*:fix", "lint:hbs": "ember-template-lint .", "lint:hbs:fix": "ember-template-lint . --fix", "lint:js": "eslint . --cache", - "release": "release-it", "lint:js:fix": "eslint . --fix", "start": "ember serve", "test": "npm-run-all lint test:*", - "test:mocha": "node fix-node-modules.mjs && mocha && node fix-node-modules.mjs -r", + "test:mocha": "mocha", "test:ember": "ember test", - "test:precook": "node node_modules/ember-cli-addon-tests/scripts/precook-node-modules.js", "test:ember-compatibility": "ember try:each" }, "dependencies": { @@ -39,8 +37,8 @@ "ember-cli-lodash-subset": "^2.0.1", "ember-cli-preprocess-registry": "^3.3.0", "ember-cli-version-checker": "^5.1.2", - "fastboot": "4.1.2", - "fastboot-express-middleware": "4.1.2", + "fastboot": "workspace:*", + "fastboot-express-middleware": "workspace:*", "fastboot-transform": "^0.1.3", "fs-extra": "^10.0.0", "json-stable-stringify": "^1.0.1", @@ -50,64 +48,53 @@ }, "devDependencies": { "@ember/optional-features": "^2.0.0", + "@ember/string": "^3.1.1", "@ember/test-helpers": "^2.6.0", - "@embroider/test-setup": "^0.37.0", + "@embroider/test-setup": "^3.0.3", "@glimmer/component": "^1.0.4", "@glimmer/tracking": "^1.0.4", "babel-eslint": "^10.1.0", - "body-parser": "^1.18.3", "broccoli-asset-rev": "^3.0.0", "broccoli-test-helper": "^1.5.0", - "chai": "^4.3.4", - "chai-fs": "^2.0.0", - "chai-string": "^1.4.0", - "co": "4.6.0", "ember-auto-import": "^2.2.1", - "ember-cli": "~4.1.0", - "ember-cli-addon-tests": "^0.11.1", + "ember-cli": "~3.28.6", "ember-cli-dependency-checker": "^3.2.0", - "ember-cli-htmlbars": "^5.7.1", - "ember-cli-inject-live-reload": "^2.0.2", + "ember-cli-htmlbars": "^5.7.2", + "ember-cli-inject-live-reload": "^2.1.0", "ember-cli-sri": "^2.1.1", - "ember-cli-terser": "^4.0.1", + "ember-cli-terser": "^4.0.2", "ember-disable-prototype-extensions": "^1.1.3", "ember-export-application-global": "^2.0.1", "ember-load-initializers": "^2.1.2", - "ember-maybe-import-regenerator-for-testing": "^1.0.0", + "ember-maybe-import-regenerator": "^0.1.6", "ember-page-title": "^7.0.0", "ember-qunit": "^5.1.5", - "ember-resolver": "^8.0.2", - "ember-sinon": "^2.2.0", - "ember-source": "~3.26.1", + "ember-resolver": "^8.0.3", + "ember-source": "~3.28.8", "ember-source-channel-url": "^3.0.0", - "ember-template-lint": "^3.2.0", - "ember-try": "^2.0.0", - "eslint": "^7.23.0", - "eslint-config-prettier": "^8.1.0", - "eslint-plugin-ember": "^10.3.0", + "ember-template-lint": "^3.15.0", + "ember-try": "^3.0.0", + "eslint": "^7.32.0", + "eslint-config-prettier": "^8.3.0", + "eslint-plugin-ember": "^10.5.8", "eslint-plugin-node": "^11.1.0", - "eslint-plugin-prettier": "^3.3.1", + "eslint-plugin-prettier": "^3.4.1", + "eslint-plugin-qunit": "^6.2.0", "glob": "^7.1.3", "lint-to-the-future": "^2.0.0", "lint-to-the-future-eslint": "^2.0.1", "loader.js": "^4.7.0", "mocha": "^9.1.2", "npm-run-all": "^4.1.5", - "prettier": "^2.2.1", - "qunit": "^2.14.1", + "prettier": "^2.5.1", + "qunit": "^2.17.2", "qunit-dom": "^1.6.0", - "release-it": "^14.2.2", - "release-it-lerna-changelog": "^3.1.0", - "request": "^2.88.0", - "rsvp": "^4.8.3", - "webpack": "^5.58.1" + "sinon": "^17.0.1", + "webpack": "^5.90.1" }, "engines": { "node": "14.* || 16.* || >=18" }, - "publishConfig": { - "registry": "https://registry.npmjs.org/" - }, "ember": { "edition": "octane" }, @@ -116,8 +103,5 @@ "before": [ "broccoli-serve-files" ] - }, - "volta": { - "extends": "../../package.json" } } diff --git a/packages/ember-cli-fastboot/test/fastboot-config-test.js b/packages/ember-cli-fastboot/test/fastboot-config-test.js deleted file mode 100644 index 7a9b78e41..000000000 --- a/packages/ember-cli-fastboot/test/fastboot-config-test.js +++ /dev/null @@ -1,57 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const expect = require('chai').use(require('chai-string')).expect; -const RSVP = require('rsvp'); -const request = RSVP.denodeify(require('request')); - -const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; - -describe('FastBoot config', function () { - this.timeout(400000); - - let app; - - before(function () { - app = new AddonTestApp(); - - return app - .create('fastboot-config', { - emberVersion: 'latest', - emberDataVersion: 'latest', - }) - .then(function () { - app.editPackageJSON((pkg) => { - delete pkg.devDependencies['ember-fetch']; - delete pkg.devDependencies['ember-welcome-page']; - // needed because @ember-data/store does `FastBoot.require('crypto')` - pkg.fastbootDependencies = ['crypto']; - }); - return app.run('npm', 'install'); - }) - .then(function () { - return app.startServer({ - command: 'serve', - }); - }); - }); - - after(function () { - return app.stopServer(); - }); - - it('provides sandbox globals', function () { - return request({ - url: 'http://localhost:49741/', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.statusCode).to.equal(200); - expect(response.headers['content-type']).to.equalIgnoreCase( - 'text/html; charset=utf-8' - ); - expect(response.body).to.contain('

My Global

'); - }); - }); -}); diff --git a/packages/ember-cli-fastboot/test/fastboot-location-config-test.js b/packages/ember-cli-fastboot/test/fastboot-location-config-test.js deleted file mode 100644 index b00213165..000000000 --- a/packages/ember-cli-fastboot/test/fastboot-location-config-test.js +++ /dev/null @@ -1,73 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const expect = require('chai').expect; -const RSVP = require('rsvp'); -const request = RSVP.denodeify(require('request')); - -const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; - -describe('FastBootLocation Configuration', function () { - this.timeout(300000); - - let app; - - before(function () { - app = new AddonTestApp(); - - return app - .create('fastboot-location-config', { - emberVersion: 'latest', - emberDataVersion: 'latest', - }) - .then(function () { - app.editPackageJSON((pkg) => { - delete pkg.devDependencies['ember-fetch']; - delete pkg.devDependencies['ember-welcome-page']; - // needed because @ember-data/store does `FastBoot.require('crypto')` - pkg.fastbootDependencies = ['crypto']; - }); - return app.run('npm', 'install'); - }) - .then(function () { - return app.startServer({ - command: 'serve', - }); - }); - }); - - after(function () { - return app.stopServer(); - }); - - it('should use the redirect code provided by the EmberApp', function () { - return request({ - url: 'http://localhost:49741/redirect-on-transition-to', - followRedirect: false, - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - if (response.statusCode === 500) throw new Error(response.body); - expect(response.statusCode).to.equal(302); - expect(response.headers.location).to.equal( - '//localhost:49741/test-passed' - ); - }); - }); - - describe('when fastboot.fastbootHeaders is false', function () { - it('should not send the "x-fastboot-path" header on a redirect', function () { - return request({ - url: 'http://localhost:49741/redirect-on-transition-to', - followRedirect: false, - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - if (response.statusCode === 500) throw new Error(response.body); - expect(response.headers).to.not.include.keys(['x-fastboot-path']); - }); - }); - }); -}); diff --git a/packages/ember-cli-fastboot/test/fastboot-location-test.js b/packages/ember-cli-fastboot/test/fastboot-location-test.js deleted file mode 100644 index 773331d07..000000000 --- a/packages/ember-cli-fastboot/test/fastboot-location-test.js +++ /dev/null @@ -1,172 +0,0 @@ -/* eslint-disable no-undef, prettier/prettier */ -'use strict'; - -const expect = require('chai').expect; -const RSVP = require('rsvp'); -const request = RSVP.denodeify(require('request')); - -const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; - -describe('FastBootLocation', function () { - this.timeout(300000); - - let app; - before(function () { - app = new AddonTestApp(); - - return app - .create('fastboot-location', { - emberVersion: 'latest', - emberDataVersion: 'latest', - }) - .then(function () { - app.editPackageJSON((pkg) => { - delete pkg.devDependencies['ember-fetch']; - delete pkg.devDependencies['ember-welcome-page']; - // needed because @ember-data/store does `FastBoot.require('crypto')` - pkg.fastbootDependencies = ['crypto']; - }); - return app.run('npm', 'install'); - }) - .then(function () { - return app.startServer({ - command: 'serve', - }); - }); - }); - - after(function () { - return app.stopServer(); - }); - - it('should NOT redirect when no transition is called', function () { - return request({ - url: 'http://localhost:49741/my-root/test-passed', - followRedirect: false, - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - if (response.statusCode === 500) throw new Error(response.body); - expect(response.statusCode).to.equal(200); - - expect(response.headers).to.not.include.keys('location'); - expect(response.headers).to.include.keys('x-fastboot-path'); - expect(response.headers['x-fastboot-path']).to.equal( - '/my-root/test-passed' - ); - - expect(response.body).to.contain('The Test Passed!'); - }); - }); - - it('should NOT redirect when intermediateTransitionTo is called', function () { - return request({ - url: 'http://localhost:49741/my-root/redirect-on-intermediate-transition-to', - followRedirect: false, - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - if (response.statusCode === 500) throw new Error(response.body); - expect(response.statusCode).to.equal(200); - - expect(response.headers).to.not.include.keys('location'); - expect(response.headers).to.include.keys('x-fastboot-path'); - expect(response.headers['x-fastboot-path']).to.equal( - '/my-root/redirect-on-intermediate-transition-to' - ); - - expect(response.body).to.not.contain('Welcome to Ember'); - expect(response.body).to.not.contain('The Test Passed!'); - }); - }); - - it('should redirect when transitionTo is called', function () { - return request({ - url: 'http://localhost:49741/my-root/redirect-on-transition-to', - followRedirect: false, - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - if (response.statusCode === 500) throw new Error(response.body); - expect(response.statusCode).to.equal(307); - - expect(response.headers).to.include.keys(['location', 'x-fastboot-path']); - expect(response.headers.location).to.equal( - '//localhost:49741/my-root/test-passed' - ); - expect(response.headers['x-fastboot-path']).to.equal( - '/my-root/test-passed' - ); - expect(response.body).to.contain('Redirecting to'); - expect(response.body).to.contain('/my-root/test-passed'); - }); - }); - - it('should redirect when replaceWith is called', function () { - return request({ - url: 'http://localhost:49741/my-root/redirect-on-replace-with', - followRedirect: false, - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - if (response.statusCode === 500) throw new Error(response.body); - expect(response.statusCode).to.equal(307); - - expect(response.headers).to.include.keys(['location', 'x-fastboot-path']); - expect(response.headers.location).to.equal( - '//localhost:49741/my-root/test-passed' - ); - expect(response.headers['x-fastboot-path']).to.equal( - '/my-root/test-passed' - ); - expect(response.body).to.contain('Redirecting to'); - expect(response.body).to.contain('/my-root/test-passed'); - }); - }); - - it('should NOT redirect when transitionTo is called with identical route name', function () { - return request({ - url: 'http://localhost:49741/my-root/noop-transition-to', - followRedirect: false, - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - if (response.statusCode === 500) throw new Error(response.body); - expect(response.statusCode).to.equal(200); - - expect(response.headers).to.not.include.keys('location'); - expect(response.headers).to.include.keys('x-fastboot-path'); - expect(response.headers['x-fastboot-path']).to.equal( - '/my-root/noop-transition-to' - ); - - expect(response.body).to.contain('Redirect to self'); - }); - }); - - it('should NOT redirect when replaceWith is called with identical route name', function () { - return request({ - url: 'http://localhost:49741/my-root/noop-replace-with', - followRedirect: false, - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - if (response.statusCode === 500) throw new Error(response.body); - expect(response.statusCode).to.equal(200); - - expect(response.headers).to.not.include.keys('location'); - expect(response.headers).to.include.keys('x-fastboot-path'); - expect(response.headers['x-fastboot-path']).to.equal( - '/my-root/noop-replace-with' - ); - - expect(response.body).to.contain('Redirect to self'); - }); - }); -}); diff --git a/packages/ember-cli-fastboot/test/fixtures/customized-outputpaths/app/index.html b/packages/ember-cli-fastboot/test/fixtures/customized-outputpaths/app/index.html deleted file mode 100644 index fad2dd9d7..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/customized-outputpaths/app/index.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - Customized Output Paths - - - - {{content-for "head"}} - - - - - {{content-for "head-footer"}} - - - {{content-for "body"}} - - - - - {{content-for "body-footer"}} - - diff --git a/packages/ember-cli-fastboot/test/fixtures/customized-outputpaths/ember-cli-build.js b/packages/ember-cli-fastboot/test/fixtures/customized-outputpaths/ember-cli-build.js deleted file mode 100644 index 09d16cce6..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/customized-outputpaths/ember-cli-build.js +++ /dev/null @@ -1,23 +0,0 @@ -/* eslint-disable no-redeclare, prettier/prettier */ -/*jshint node:true*/ -/* global require, module */ -var EmberApp = require('ember-cli/lib/broccoli/ember-app'); - -module.exports = function(defaults) { - var app = new EmberApp(defaults, { - outputPaths: { - app: { - html: 'index.html', - css: { - 'app': '/some-assets/path/app.css', - }, - js: '/some-assets/path/app-file.js' - }, - vendor: { - js: '/some-assets/path/lib.js' - } - } - }); - - return app.toTree(); -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/README.md b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/README.md deleted file mode 100644 index f0e160bf6..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/README.md +++ /dev/null @@ -1 +0,0 @@ -This fixture app has an addon that implements fastbootConfigTree that extends application config in FastBoot build. diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/router.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/router.js deleted file mode 100644 index 924811e16..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/router.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable ember/new-module-imports, prettier/prettier */ -import Ember from 'ember'; -import config from './config/environment'; - -const Router = Ember.Router.extend({ - location: config.locationType, - rootURL: config.rootURL -}); - -Router.map(function() { -}); - -export default Router; diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/routes/application.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/routes/application.js deleted file mode 100644 index 1b8521463..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/routes/application.js +++ /dev/null @@ -1,10 +0,0 @@ -/* eslint-disable ember/new-module-imports, prettier/prettier */ -import Ember from 'ember'; - -export default Ember.Route.extend({ - model() { - if (typeof FastBoot !== 'undefined') { - return window.myGlobal; - } - } -}); diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/templates/application.hbs b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/templates/application.hbs deleted file mode 100644 index 17f5e29c5..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/app/templates/application.hbs +++ /dev/null @@ -1 +0,0 @@ -

{{this.model}}

\ No newline at end of file diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/config/fastboot.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/config/fastboot.js deleted file mode 100644 index bf7cb0b00..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/config/fastboot.js +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable no-undef, no-unused-vars, prettier/prettier */ -module.exports = function(environment) { - return { - sandboxGlobals: { - myGlobal: 'My Global' - } - }; -} diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/ember-cli-build.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/ember-cli-build.js deleted file mode 100644 index 20d9b73a3..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/ember-cli-build.js +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable prettier/prettier */ -module.exports = function(defaults) { - var EmberApp = require('ember-cli/lib/broccoli/ember-app'); - var app = new EmberApp(defaults, {}); - - return app.toTree(); -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon-2/index.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon-2/index.js deleted file mode 100644 index 3f2b8378d..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon-2/index.js +++ /dev/null @@ -1,3 +0,0 @@ -module.exports = { - name: "Fake Addon" -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon-2/package.json b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon-2/package.json deleted file mode 100644 index 48d9e8326..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon-2/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "fake-addon-2", - "version": "0.1.0", - "ember-addon": { - "fastbootDependencies": ["bar", "baz", "path"] - }, - "dependencies": { - "bar": "^0.1.2", - "baz": "0.0.0" - }, - "keywords": [ - "ember-addon" - ] -} diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon/index.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon/index.js deleted file mode 100644 index 2e69824ce..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon/index.js +++ /dev/null @@ -1,11 +0,0 @@ -module.exports = { - name: "Fake Addon", - - fastbootConfigTree() { - return { - [this.app.name]: { - 'foo': 'bar' - } - } - } -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon/package.json b/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon/package.json deleted file mode 100644 index 4001ad234..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-config/node_modules/fake-addon/package.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "name": "fake-addon", - "version": "0.1.0", - "ember-addon": { - "fastbootDependencies": ["path", "foo", "bar"] - }, - "dependencies": { - "foo": "1.0.0", - "bar": "^0.1.2" - }, - "keywords": [ - "ember-addon" - ] -} diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/app/router.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/app/router.js deleted file mode 100644 index 25a6ad097..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/app/router.js +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable ember/new-module-imports, prettier/prettier */ -import Ember from 'ember'; - -let Router = Ember.Router; - -Router.map(function() { - this.route('redirect-on-transition-to'); - this.route('test-passed'); -}); - -export default Router; diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/app/templates/application.hbs b/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/app/templates/application.hbs deleted file mode 100644 index 5230580f8..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/app/templates/application.hbs +++ /dev/null @@ -1,3 +0,0 @@ -

Welcome to Ember

- -{{outlet}} \ No newline at end of file diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/config/environment.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/config/environment.js deleted file mode 100644 index 95d513ddf..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/config/environment.js +++ /dev/null @@ -1,18 +0,0 @@ -/* eslint-disable no-undef, prettier/prettier */ -'use strict'; - -module.exports = function(environment) { - var ENV = { - rootURL: '/', - locationType: 'auto', - environment: environment, - modulePrefix: 'fastboot-location-config', - fastboot: { - fastbootHeaders: false, - hostWhitelist: [/localhost:\d+/], - redirectCode: 302, - } - }; - - return ENV; -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/config/targets.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/config/targets.js deleted file mode 100644 index 67994db90..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-location-config/config/targets.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const browsers = [ - 'last 1 Chrome versions', - 'last 1 Firefox versions', - 'last 1 Safari versions', -]; - -module.exports = { - browsers, - node: 'current', -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/routes/redirect-on-transition-to.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/routes/redirect-on-transition-to.js deleted file mode 100644 index e0b5fa45b..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/routes/redirect-on-transition-to.js +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable ember/new-module-imports, prettier/prettier */ -import Ember from 'ember'; - -export default Ember.Route.extend({ - beforeModel() { - this.transitionTo('test-passed'); - } -}); diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/routes/test-passed.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/routes/test-passed.js deleted file mode 100644 index 567c2b55d..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/routes/test-passed.js +++ /dev/null @@ -1,4 +0,0 @@ -/* eslint-disable ember/new-module-imports */ -import Ember from 'ember'; - -export default Ember.Route.extend({}); diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/templates/test-passed.hbs b/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/templates/test-passed.hbs deleted file mode 100644 index cad7fc851..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-location/app/templates/test-passed.hbs +++ /dev/null @@ -1,4 +0,0 @@ -

The Test Passed!

- -

All redirection tests should be set up to redirect here.

- diff --git a/packages/ember-cli-fastboot/test/fixtures/fastboot-location/config/targets.js b/packages/ember-cli-fastboot/test/fixtures/fastboot-location/config/targets.js deleted file mode 100644 index 67994db90..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/fastboot-location/config/targets.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const browsers = [ - 'last 1 Chrome versions', - 'last 1 Firefox versions', - 'last 1 Safari versions', -]; - -module.exports = { - browsers, - node: 'current', -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/request/app/templates/application.hbs b/packages/ember-cli-fastboot/test/fixtures/request/app/templates/application.hbs deleted file mode 100644 index 5230580f8..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/request/app/templates/application.hbs +++ /dev/null @@ -1,3 +0,0 @@ -

Welcome to Ember

- -{{outlet}} \ No newline at end of file diff --git a/packages/ember-cli-fastboot/test/fixtures/request/config/environment.js b/packages/ember-cli-fastboot/test/fixtures/request/config/environment.js deleted file mode 100644 index 5af9dc8d3..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/request/config/environment.js +++ /dev/null @@ -1,57 +0,0 @@ -/* eslint-disable no-undef */ -/* jshint node: true */ -'use strict'; - -module.exports = function (environment) { - let ENV = { - modulePrefix: 'request', - environment, - rootURL: '/', - locationType: 'auto', - EmberENV: { - FEATURES: { - // Here you can enable experimental features on an ember canary build - // e.g. EMBER_NATIVE_DECORATOR_SUPPORT: true - }, - EXTEND_PROTOTYPES: { - // Prevent Ember Data from overriding Date.parse. - Date: false, - }, - }, - - APP: { - // Here you can pass flags/options to your application instance - // when it is created - }, - - fastboot: { - hostWhitelist: ['example.com', 'subdomain.example.com', /localhost:\d+/], - }, - }; - - if (environment === 'development') { - // ENV.APP.LOG_RESOLVER = true; - // ENV.APP.LOG_ACTIVE_GENERATION = true; - // ENV.APP.LOG_TRANSITIONS = true; - // ENV.APP.LOG_TRANSITIONS_INTERNAL = true; - // ENV.APP.LOG_VIEW_LOOKUPS = true; - } - - if (environment === 'test') { - // Testem prefers this... - ENV.locationType = 'none'; - - // keep test console output quieter - ENV.APP.LOG_ACTIVE_GENERATION = false; - ENV.APP.LOG_VIEW_LOOKUPS = false; - - ENV.APP.rootElement = '#ember-testing'; - ENV.APP.autoboot = false; - } - - if (environment === 'production') { - // here you can enable a production-specific feature - } - - return ENV; -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/request/config/targets.js b/packages/ember-cli-fastboot/test/fixtures/request/config/targets.js deleted file mode 100644 index 67994db90..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/request/config/targets.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const browsers = [ - 'last 1 Chrome versions', - 'last 1 Firefox versions', - 'last 1 Safari versions', -]; - -module.exports = { - browsers, - node: 'current', -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/root-url/app/templates/application.hbs b/packages/ember-cli-fastboot/test/fixtures/root-url/app/templates/application.hbs deleted file mode 100644 index 05eb936cf..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/root-url/app/templates/application.hbs +++ /dev/null @@ -1,3 +0,0 @@ -

Welcome to Ember.js

- -{{outlet}} diff --git a/packages/ember-cli-fastboot/test/fixtures/root-url/config/environment.js b/packages/ember-cli-fastboot/test/fixtures/root-url/config/environment.js deleted file mode 100644 index 35a33ec26..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/root-url/config/environment.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable no-undef, prettier/prettier */ -'use strict'; - -module.exports = function(environment) { - var ENV = { - rootURL: '/my-root/', - environment: environment, - modulePrefix: 'root-url', - locationType: 'auto' - }; - - return ENV; -}; diff --git a/packages/ember-cli-fastboot/test/fixtures/root-url/config/targets.js b/packages/ember-cli-fastboot/test/fixtures/root-url/config/targets.js deleted file mode 100644 index 67994db90..000000000 --- a/packages/ember-cli-fastboot/test/fixtures/root-url/config/targets.js +++ /dev/null @@ -1,13 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const browsers = [ - 'last 1 Chrome versions', - 'last 1 Firefox versions', - 'last 1 Safari versions', -]; - -module.exports = { - browsers, - node: 'current', -}; diff --git a/packages/ember-cli-fastboot/test/new-package-json-test.js b/packages/ember-cli-fastboot/test/new-package-json-test.js index 30a913096..dea1df874 100644 --- a/packages/ember-cli-fastboot/test/new-package-json-test.js +++ b/packages/ember-cli-fastboot/test/new-package-json-test.js @@ -50,8 +50,22 @@ describe('FastbootConfig', function() { await output.build(); - expect(output.read()).to.deep.equal({ - 'package.json': `{"dependencies":{},"fastboot":{"appName":"app","config":{"app":{"modulePrefix":"app"}},"manifest":{"appFiles":["app.js","app-fastboot.js"],"htmlFile":"index.html","vendorFiles":["vendor.js"]},"moduleWhitelist":[],"schemaVersion":3}}`, + let files = output.read(); + + expect(files).to.have.key('package.json'); + expect(JSON.parse(files['package.json'])).to.deep.equal({ + dependencies: {}, + fastboot: { + appName: 'app', + config: { app: { modulePrefix: 'app' } }, + manifest: { + appFiles: ['app.js', 'app-fastboot.js'], + htmlFile: 'index.html', + vendorFiles: ['vendor.js'], + }, + moduleWhitelist: [], + schemaVersion: 3, + }, }); await output.build(); @@ -72,8 +86,22 @@ describe('FastbootConfig', function() { 'package.json': 'change', }); - expect(output.read()).to.deep.equal({ - 'package.json': `{"dependencies":{"apple":"*","orange":"^1.0.0"},"fastboot":{"appName":"app","config":{"app":{"modulePrefix":"app"}},"manifest":{"appFiles":["app.js","app-fastboot.js"],"htmlFile":"index.html","vendorFiles":["vendor.js"]},"moduleWhitelist":["apple","orange"],"schemaVersion":3}}`, + let changedFiles = output.read(); + + expect(changedFiles).to.have.key('package.json'); + expect(JSON.parse(changedFiles['package.json'])).to.deep.equal({ + dependencies: { apple: '*', orange: '^1.0.0' }, + fastboot: { + appName: 'app', + config: { app: { modulePrefix: 'app' } }, + manifest: { + appFiles: ['app.js', 'app-fastboot.js'], + htmlFile: 'index.html', + vendorFiles: ['vendor.js'], + }, + moduleWhitelist: ['apple', 'orange'], + schemaVersion: 3, + }, }); project.pkg.fastbootDependencies = ['apple', 'orange']; @@ -88,8 +116,22 @@ describe('FastbootConfig', function() { await output.build(); - expect(output.read()).to.deep.equal({ - 'package.json': `{"dependencies":{"apple":"^3.0.0","orange":"^1.0.0"},"fastboot":{"appName":"app","config":{"app":{"modulePrefix":"app"}},"manifest":{"appFiles":["app.js","app-fastboot.js"],"htmlFile":"index.html","vendorFiles":["vendor.js"]},"moduleWhitelist":["apple","orange"],"schemaVersion":3}}`, + let moreChangedFiles = output.read(); + + expect(moreChangedFiles).to.have.key('package.json'); + expect(JSON.parse(moreChangedFiles['package.json'])).to.deep.equal({ + dependencies: { apple: '^3.0.0', orange: '^1.0.0' }, + fastboot: { + appName: 'app', + config: { app: { modulePrefix: 'app' } }, + manifest: { + appFiles: ['app.js', 'app-fastboot.js'], + htmlFile: 'index.html', + vendorFiles: ['vendor.js'], + }, + moduleWhitelist: ['apple', 'orange'], + schemaVersion: 3, + }, }); }); }); diff --git a/packages/ember-cli-fastboot/test/package-json-test.js b/packages/ember-cli-fastboot/test/package-json-test.js deleted file mode 100644 index bff1f7e20..000000000 --- a/packages/ember-cli-fastboot/test/package-json-test.js +++ /dev/null @@ -1,59 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const chai = require('chai'); -const expect = chai.expect; -const fs = require('fs-extra'); -const path = require('path'); -const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; - -chai.use(require('chai-fs')); - -describe('generating package.json', function () { - this.timeout(300000); - - describe('with customized outputPaths options', function () { - // Tests an app with a custom `outputPaths` set - let customApp = new AddonTestApp(); - - before(function () { - return customApp - .create('customized-outputpaths', { - emberVersion: 'latest', - emberDataVersion: 'latest', - }) - .then(function () { - customApp.editPackageJSON((pkg) => { - delete pkg.devDependencies['ember-fetch']; - delete pkg.devDependencies['ember-welcome-page']; - // needed because @ember-data/store does `FastBoot.require('crypto')` - pkg.fastbootDependencies = ['crypto']; - }); - return customApp.run('npm', 'install'); - }) - .then(function () { - return customApp.runEmberCommand('build'); - }); - }); - - it('respects custom output paths and maps to them in the manifest', function () { - function p(filePath) { - return customApp.filePath(path.join('dist', filePath)); - } - - let pkg = fs.readJsonSync(customApp.filePath('/dist/package.json')); - let manifest = pkg.fastboot.manifest; - - expect(manifest.appFiles).to.include('some-assets/path/app-file.js'); - manifest.appFiles.forEach(function (file) { - expect(p(file)).to.be.a.file(); - }); - expect(p(manifest.htmlFile)).to.be.a.file(); - - expect(manifest.vendorFiles).to.include('some-assets/path/lib.js'); - manifest.vendorFiles.forEach(function (file) { - expect(p(file)).to.be.a.file(); - }); - }); - }); -}); diff --git a/packages/ember-cli-fastboot/test/request-details-test.js b/packages/ember-cli-fastboot/test/request-details-test.js deleted file mode 100644 index 5e3967cea..000000000 --- a/packages/ember-cli-fastboot/test/request-details-test.js +++ /dev/null @@ -1,170 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const chai = require('chai'); -const expect = chai.expect; -const RSVP = require('rsvp'); -const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; -const request = RSVP.denodeify(require('request')); - -function injectMiddlewareAddon(app) { - app.editPackageJSON(function (pkg) { - pkg.devDependencies['body-parser'] = - process.env.npm_package_devDependencies_body_parser; - pkg.dependencies = pkg.dependencies || {}; - pkg.dependencies['fastboot-express-middleware'] = - process.env.npm_package_dependencies_fastboot_express_middleware; - pkg['ember-addon'] = { - paths: ['lib/post-middleware'], - }; - delete pkg.devDependencies['ember-fetch']; - delete pkg.devDependencies['ember-welcome-page']; - // needed because @ember-data/store does `FastBoot.require('crypto')` - pkg.fastbootDependencies = ['crypto']; - }); - return app.run('npm', 'install'); -} - -describe('request details', function () { - this.timeout(300000); - - let app; - - before(function () { - app = new AddonTestApp(); - - return app - .create('request', { - emberVersion: 'latest', - emberDataVersion: 'latest', - }) - .then(() => injectMiddlewareAddon(app)) - .then(function () { - return app.startServer({ - command: 'serve', - }); - }); - }); - - after(function () { - return app.stopServer(); - }); - - it('makes host available via a service', function () { - return request({ - url: 'http://localhost:49741/show-host', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.body).to.contain('Host: localhost:49741'); - expect(response.body).to.contain( - 'Host from Instance Initializer: localhost:49741' - ); - }); - }); - - it('makes protocol available via a service', function () { - return request({ - url: 'http://localhost:49741/show-protocol', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.body).to.contain('Protocol: http:'); - expect(response.body).to.contain( - 'Protocol from Instance Initializer: http:' - ); - }); - }); - - it('makes path available via a service', function () { - return request({ - url: 'http://localhost:49741/show-path', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.body).to.contain('Path: /show-path'); - expect(response.body).to.contain( - 'Path from Instance Initializer: /show-path' - ); - }); - }); - - it('makes query params available via a service', function () { - return request({ - url: 'http://localhost:49741/list-query-params?foo=bar', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.body).to.contain('Query Params: bar'); - expect(response.body).to.contain( - 'Query Params from Instance Initializer: bar' - ); - }); - }); - - it('makes cookies available via a service', function () { - let jar = request.jar(); - let cookie = request.cookie('city=Cluj'); - - jar.setCookie(cookie, 'http://localhost:49741'); - - return request({ - url: 'http://localhost:49741/list-cookies', - headers: { - Accept: 'text/html', - }, - jar: jar, - }).then(function (response) { - expect(response.body).to.contain('Cookies: Cluj'); - expect(response.body).to.contain( - 'Cookies from Instance Initializer: Cluj' - ); - }); - }); - - it('makes headers available via a service', function () { - return request({ - url: 'http://localhost:49741/list-headers', - headers: { - 'X-FastBoot-info': 'foobar', - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.body).to.contain('Headers: foobar'); - expect(response.body).to.contain( - 'Headers from Instance Initializer: foobar' - ); - }); - }); - - it('makes method available via a service', function () { - return request({ - url: 'http://localhost:49741/show-method', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.body).to.contain('Method: GET'); - expect(response.body).to.contain('Method from Instance Initializer: GET'); - }); - }); - - it('makes body available via a service', function () { - return request({ - url: 'http://localhost:49741/show-body', - method: 'POST', - headers: { - Accept: 'text/html', - 'Content-Type': 'text/plain', - }, - body: 'TEST', - }).then(function (response) { - expect(response.body).to.contain('Body: TEST'); - expect(response.body).to.contain('Body from Instance Initializer: TEST'); - }); - }); -}); diff --git a/packages/ember-cli-fastboot/test/root-url-test.js b/packages/ember-cli-fastboot/test/root-url-test.js deleted file mode 100644 index 321fb6f2b..000000000 --- a/packages/ember-cli-fastboot/test/root-url-test.js +++ /dev/null @@ -1,98 +0,0 @@ -/* eslint-disable no-undef */ -'use strict'; - -const expect = require('chai').use(require('chai-string')).expect; -const RSVP = require('rsvp'); -const request = RSVP.denodeify(require('request')); - -const AddonTestApp = require('ember-cli-addon-tests').AddonTestApp; - -describe('rootUrl acceptance', function () { - this.timeout(300000); - - let app; - - before(function () { - app = new AddonTestApp(); - - return app - .create('root-url', { - emberVersion: 'latest', - emberDataVersion: 'latest', - }) - .then(function () { - app.editPackageJSON((pkg) => { - delete pkg.devDependencies['ember-fetch']; - delete pkg.devDependencies['ember-welcome-page']; - // needed because @ember-data/store does `FastBoot.require('crypto')` - pkg.fastbootDependencies = ['crypto']; - }); - return app.run('npm', 'install'); - }) - .then(function () { - return app.startServer({ - command: 'serve', - }); - }); - }); - - after(function () { - return app.stopServer(); - }); - - it('/ HTML contents', function () { - return request({ - url: 'http://localhost:49741/my-root/', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.statusCode).to.equal(200); - expect(response.headers['content-type']).to.equalIgnoreCase( - 'text/html; charset=utf-8' - ); - expect(response.body).to.contain('Welcome to Ember.js'); - }); - }); - - it('Out of scope requests', function () { - return request({ - url: 'http://localhost:49741/foo-bar/', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.statusCode).to.equal(404); - }); - }); - - it('with fastboot query parameter turned on', function () { - return request({ - url: 'http://localhost:49741/my-root/?fastboot=true', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.statusCode).to.equal(200); - expect(response.headers['content-type']).to.equalIgnoreCase( - 'text/html; charset=utf-8' - ); - expect(response.body).to.contain('Welcome to Ember.js'); - }); - }); - - it('with fastboot query parameter turned off', function () { - return request({ - url: 'http://localhost:49741/my-root/?fastboot=false', - headers: { - Accept: 'text/html', - }, - }).then(function (response) { - expect(response.statusCode).to.equal(200); - expect(response.headers['content-type']).to.equalIgnoreCase( - 'text/html; charset=utf-8' - ); - expect(response.body).to.contain(''); - }); - }); -}); diff --git a/packages/ember-cli-fastboot/tests/.eslintrc.js b/packages/ember-cli-fastboot/tests/.eslintrc.js deleted file mode 100644 index 89df8ff59..000000000 --- a/packages/ember-cli-fastboot/tests/.eslintrc.js +++ /dev/null @@ -1,6 +0,0 @@ -/* eslint-disable prettier/prettier */ -module.exports = { - env: { - embertest: true - } -}; diff --git a/packages/ember-cli-fastboot/tests/dummy/config/ember-cli-update.json b/packages/ember-cli-fastboot/tests/dummy/config/ember-cli-update.json index 3a4ab3220..871e6e48f 100644 --- a/packages/ember-cli-fastboot/tests/dummy/config/ember-cli-update.json +++ b/packages/ember-cli-fastboot/tests/dummy/config/ember-cli-update.json @@ -3,7 +3,7 @@ "packages": [ { "name": "ember-cli", - "version": "3.26.1", + "version": "3.28.6", "blueprints": [ { "name": "addon", diff --git a/packages/ember-cli-fastboot/tests/dummy/config/targets.js b/packages/ember-cli-fastboot/tests/dummy/config/targets.js index 4b33327e8..3cd797ab4 100644 --- a/packages/ember-cli-fastboot/tests/dummy/config/targets.js +++ b/packages/ember-cli-fastboot/tests/dummy/config/targets.js @@ -6,12 +6,20 @@ const browsers = [ 'last 1 Safari versions', ]; -const isCI = Boolean(process.env.CI); -const isProduction = process.env.EMBER_ENV === 'production'; - -if (isCI || isProduction) { - browsers.push('ie 11'); -} +// Ember's browser support policy is changing, and IE11 support will end in +// v4.0 onwards. +// +// See https://deprecations.emberjs.com/v3.x#toc_3-0-browser-support-policy +// +// If you need IE11 support on a version of Ember that still offers support +// for it, uncomment the code block below. +// +// const isCI = Boolean(process.env.CI); +// const isProduction = process.env.EMBER_ENV === 'production'; +// +// if (isCI || isProduction) { +// browsers.push('ie 11'); +// } module.exports = { browsers, diff --git a/packages/ember-cli-fastboot/tests/dummy/public/crossdomain.xml b/packages/ember-cli-fastboot/tests/dummy/public/crossdomain.xml deleted file mode 100644 index 0c16a7a07..000000000 --- a/packages/ember-cli-fastboot/tests/dummy/public/crossdomain.xml +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - diff --git a/packages/ember-cli-fastboot/tests/helpers/destroy-app.js b/packages/ember-cli-fastboot/tests/helpers/destroy-app.js deleted file mode 100644 index e7f983bd1..000000000 --- a/packages/ember-cli-fastboot/tests/helpers/destroy-app.js +++ /dev/null @@ -1,5 +0,0 @@ -import { run } from '@ember/runloop'; - -export default function destroyApp(application) { - run(application, 'destroy'); -} diff --git a/packages/ember-cli-fastboot/tests/helpers/module-for-acceptance.js b/packages/ember-cli-fastboot/tests/helpers/module-for-acceptance.js deleted file mode 100644 index d6ea17f72..000000000 --- a/packages/ember-cli-fastboot/tests/helpers/module-for-acceptance.js +++ /dev/null @@ -1,22 +0,0 @@ -/* eslint-disable prettier/prettier */ -import { module } from 'qunit'; -import { resolve } from 'rsvp'; -import startApp from '../helpers/start-app'; -import destroyApp from '../helpers/destroy-app'; - -export default function(name, options = {}) { - module(name, { - beforeEach() { - this.application = startApp(); - - if (options.beforeEach) { - return options.beforeEach.apply(this, arguments); - } - }, - - afterEach() { - let afterEach = options.afterEach && options.afterEach.apply(this, arguments); - return resolve(afterEach).then(() => destroyApp(this.application)); - } - }); -} diff --git a/packages/ember-cli-fastboot/tests/helpers/resolver.js b/packages/ember-cli-fastboot/tests/helpers/resolver.js deleted file mode 100644 index fed52c720..000000000 --- a/packages/ember-cli-fastboot/tests/helpers/resolver.js +++ /dev/null @@ -1,12 +0,0 @@ -/* eslint-disable prettier/prettier */ -import Resolver from '../../resolver'; -import config from '../../config/environment'; - -const resolver = Resolver.create(); - -resolver.namespace = { - modulePrefix: config.modulePrefix, - podModulePrefix: config.podModulePrefix -}; - -export default resolver; diff --git a/packages/ember-cli-fastboot/tests/helpers/start-app.js b/packages/ember-cli-fastboot/tests/helpers/start-app.js deleted file mode 100644 index 99d35dcf4..000000000 --- a/packages/ember-cli-fastboot/tests/helpers/start-app.js +++ /dev/null @@ -1,17 +0,0 @@ -import Application from '../../app'; -import config from '../../config/environment'; -import { merge } from '@ember/polyfills'; -import { run } from '@ember/runloop'; - -export default function startApp(attrs) { - let attributes = merge({}, config.APP); - attributes.autoboot = true; - attributes = merge(attributes, attrs); // use defaults, but you can override; - - return run(() => { - let application = Application.create(attributes); - application.setupForTesting(); - application.injectTestHelpers(); - return application; - }); -} diff --git a/packages/ember-cli-fastboot/tests/index.html b/packages/ember-cli-fastboot/tests/index.html index f5efd816e..c4bb4117d 100644 --- a/packages/ember-cli-fastboot/tests/index.html +++ b/packages/ember-cli-fastboot/tests/index.html @@ -28,7 +28,7 @@ - + diff --git a/packages/ember-cli-fastboot/tests/unit/services/fastboot-test.js b/packages/ember-cli-fastboot/tests/unit/services/fastboot-test.js index b0b929220..9906f4af6 100644 --- a/packages/ember-cli-fastboot/tests/unit/services/fastboot-test.js +++ b/packages/ember-cli-fastboot/tests/unit/services/fastboot-test.js @@ -7,8 +7,8 @@ module('Unit | Service | fastboot in the browser', function(hooks) { test('isFastBoot', function(assert) { let service = this.owner.lookup('service:fastboot'); - assert.equal(service.isFastBoot, false, `it should be false`); - assert.equal(service.get('isFastBoot'), false, `it should be false`); + assert.false(service.isFastBoot, `it should be false`); + assert.false(service.get('isFastBoot'), `it should be false`); }); test('isFastboot', function(assert) { diff --git a/packages/ember-cli-fastboot/tests/unit/services/fastboot/shoebox-test.js b/packages/ember-cli-fastboot/tests/unit/services/fastboot/shoebox-test.js index 5ba69884a..b9f86f189 100644 --- a/packages/ember-cli-fastboot/tests/unit/services/fastboot/shoebox-test.js +++ b/packages/ember-cli-fastboot/tests/unit/services/fastboot/shoebox-test.js @@ -9,7 +9,7 @@ module('Unit | Service | fastboot | shoebox', function(hooks) { setupTest(hooks); hooks.beforeEach(function() { - sandbox = sinon.sandbox.create(); + sandbox = sinon.createSandbox(); }); hooks.afterEach(function() { @@ -90,4 +90,4 @@ module('Unit | Service | fastboot | shoebox', function(hooks) { assert.strictEqual(service.get('shoebox').retrieve('foo'), 'bar'); }); -}); \ No newline at end of file +}); diff --git a/packages/fastboot-express-middleware/package.json b/packages/fastboot-express-middleware/package.json index 91795f259..6db592fb5 100644 --- a/packages/fastboot-express-middleware/package.json +++ b/packages/fastboot-express-middleware/package.json @@ -21,7 +21,7 @@ "main": "src/index.js", "scripts": { "lint": "eslint --cache .", - "test": "yarn lint:js && mocha" + "test": "mocha" }, "dependencies": { "chalk": "^4.1.2", diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/auto-import-fastboot.js b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/auto-import-fastboot.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app-fastboot.js b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app-fastboot.js deleted file mode 100644 index 6eee9dd1a..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app-fastboot.js +++ /dev/null @@ -1,83 +0,0 @@ -define('~fastboot/app-factory', ['fastboot-app/app', 'fastboot-app/config/environment'], function(App, config) { - App = App['default']; - config = config['default']; - - return { - 'default': function() { - return App.create(config.APP); - } - }; -}); - -define("fastboot-app/initializers/ajax", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - const { - get - } = Ember; - - var nodeAjax = function (options) { - let httpRegex = /^https?:\/\//; - let protocolRelativeRegex = /^\/\//; - let protocol = get(this, 'fastboot.request.protocol'); - - if (protocolRelativeRegex.test(options.url)) { - options.url = protocol + options.url; - } else if (!httpRegex.test(options.url)) { - try { - options.url = protocol + '//' + get(this, 'fastboot.request.host') + options.url; - } catch (fbError) { - throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message); - } - } - - if (najax) { - najax(options); - } else { - throw new Error('najax does not seem to be defined in your app. Did you override it via `addOrOverrideSandboxGlobals` in the fastboot server?'); - } - }; - - var _default = { - name: 'ajax-service', - initialize: function (application) { - application.register('ajax:node', nodeAjax, { - instantiate: false - }); - application.inject('adapter', '_ajaxRequest', 'ajax:node'); - application.inject('adapter', 'fastboot', 'service:fastboot'); - } - }; - _exports.default = _default; -}); -define("fastboot-app/initializers/error-handler", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - /** - * Initializer to attach an `onError` hook to your app running in fastboot. It catches any run loop - * exceptions and other errors and prevents the node process from crashing. - * - */ - var _default = { - name: 'error-handler', - initialize: function () { - if (!Ember.onerror) { - // if no onerror handler is defined, define one for fastboot environments - Ember.onerror = function (err) { - const errorMessage = `There was an error running your app in fastboot. More info about the error: \n ${err.stack || err}`; - console.error(errorMessage); - }; - } - } - }; - _exports.default = _default; -});//# sourceMappingURL=fastboot-app-fastboot.map diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app-fastboot.map b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app-fastboot.map deleted file mode 100644 index 4b1f00f58..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app-fastboot.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["app-factory.js","fastboot-app/initializers/ajax.js","fastboot-app/initializers/error-handler.js"],"sourcesContent":["define('~fastboot/app-factory', ['fastboot-app/app', 'fastboot-app/config/environment'], function(App, config) {\n App = App['default'];\n config = config['default'];\n\n return {\n 'default': function() {\n return App.create(config.APP);\n }\n };\n});\n","define(\"fastboot-app/initializers/ajax\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n const {\n get\n } = Ember;\n\n var nodeAjax = function (options) {\n let httpRegex = /^https?:\\/\\//;\n let protocolRelativeRegex = /^\\/\\//;\n let protocol = get(this, 'fastboot.request.protocol');\n\n if (protocolRelativeRegex.test(options.url)) {\n options.url = protocol + options.url;\n } else if (!httpRegex.test(options.url)) {\n try {\n options.url = protocol + '//' + get(this, 'fastboot.request.host') + options.url;\n } catch (fbError) {\n throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message);\n }\n }\n\n if (najax) {\n najax(options);\n } else {\n throw new Error('najax does not seem to be defined in your app. Did you override it via `addOrOverrideSandboxGlobals` in the fastboot server?');\n }\n };\n\n var _default = {\n name: 'ajax-service',\n initialize: function (application) {\n application.register('ajax:node', nodeAjax, {\n instantiate: false\n });\n application.inject('adapter', '_ajaxRequest', 'ajax:node');\n application.inject('adapter', 'fastboot', 'service:fastboot');\n }\n };\n _exports.default = _default;\n});","define(\"fastboot-app/initializers/error-handler\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n /**\n * Initializer to attach an `onError` hook to your app running in fastboot. It catches any run loop\n * exceptions and other errors and prevents the node process from crashing.\n *\n */\n var _default = {\n name: 'error-handler',\n initialize: function () {\n if (!Ember.onerror) {\n // if no onerror handler is defined, define one for fastboot environments\n Ember.onerror = function (err) {\n const errorMessage = `There was an error running your app in fastboot. More info about the error: \\n ${err.stack || err}`;\n console.error(errorMessage);\n };\n }\n }\n };\n _exports.default = _default;\n});"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"fastboot-app-fastboot.js"} \ No newline at end of file diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app.css b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app.js b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app.js deleted file mode 100644 index a3aeb4025..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app.js +++ /dev/null @@ -1,556 +0,0 @@ -'use strict'; - - - -;define("fastboot-app/adapters/-json-api", ["exports", "@ember-data/adapter/json-api"], function (_exports, _jsonApi) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _jsonApi.default; - } - }); -}); -;define("fastboot-app/app", ["exports", "ember-resolver", "ember-load-initializers", "fastboot-app/config/environment"], function (_exports, _emberResolver, _emberLoadInitializers, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - class App extends Ember.Application { - constructor(...args) { - super(...args); - - _defineProperty(this, "modulePrefix", _environment.default.modulePrefix); - - _defineProperty(this, "podModulePrefix", _environment.default.podModulePrefix); - - _defineProperty(this, "Resolver", _emberResolver.default); - } - - } - - _exports.default = App; - (0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix); -}); -;define("fastboot-app/component-managers/glimmer", ["exports", "@glimmer/component/-private/ember-component-manager"], function (_exports, _emberComponentManager) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _emberComponentManager.default; - } - }); -}); -;define("fastboot-app/components/welcome-page", ["exports", "ember-welcome-page/components/welcome-page"], function (_exports, _welcomePage) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _welcomePage.default; - } - }); -}); -;define("fastboot-app/data-adapter", ["exports", "@ember-data/debug"], function (_exports, _debug) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _debug.default; - } - }); -}); -;define("fastboot-app/helpers/app-version", ["exports", "fastboot-app/config/environment", "ember-cli-app-version/utils/regexp"], function (_exports, _environment, _regexp) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.appVersion = appVersion; - _exports.default = void 0; - - function appVersion(_, hash = {}) { - const version = _environment.default.APP.version; // e.g. 1.0.0-alpha.1+4jds75hf - // Allow use of 'hideSha' and 'hideVersion' For backwards compatibility - - let versionOnly = hash.versionOnly || hash.hideSha; - let shaOnly = hash.shaOnly || hash.hideVersion; - let match = null; - - if (versionOnly) { - if (hash.showExtended) { - match = version.match(_regexp.versionExtendedRegExp); // 1.0.0-alpha.1 - } // Fallback to just version - - - if (!match) { - match = version.match(_regexp.versionRegExp); // 1.0.0 - } - } - - if (shaOnly) { - match = version.match(_regexp.shaRegExp); // 4jds75hf - } - - return match ? match[0] : version; - } - - var _default = Ember.Helper.helper(appVersion); - - _exports.default = _default; -}); -;define("fastboot-app/helpers/pluralize", ["exports", "ember-inflector/lib/helpers/pluralize"], function (_exports, _pluralize) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - var _default = _pluralize.default; - _exports.default = _default; -}); -;define("fastboot-app/helpers/singularize", ["exports", "ember-inflector/lib/helpers/singularize"], function (_exports, _singularize) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - var _default = _singularize.default; - _exports.default = _default; -}); -;define("fastboot-app/initializers/app-version", ["exports", "ember-cli-app-version/initializer-factory", "fastboot-app/config/environment"], function (_exports, _initializerFactory, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - let name, version; - - if (_environment.default.APP) { - name = _environment.default.APP.name; - version = _environment.default.APP.version; - } - - var _default = { - name: 'App Version', - initialize: (0, _initializerFactory.default)(name, version) - }; - _exports.default = _default; -}); -;define("fastboot-app/initializers/container-debug-adapter", ["exports", "ember-resolver/resolvers/classic/container-debug-adapter"], function (_exports, _containerDebugAdapter) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - var _default = { - name: 'container-debug-adapter', - - initialize() { - let app = arguments[1] || arguments[0]; - app.register('container-debug-adapter:main', _containerDebugAdapter.default); - app.inject('container-debug-adapter:main', 'namespace', 'application:main'); - } - - }; - _exports.default = _default; -}); -;define("fastboot-app/initializers/ember-data-data-adapter", ["exports", "@ember-data/debug/setup"], function (_exports, _setup) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _setup.default; - } - }); -}); -;define("fastboot-app/initializers/ember-data", ["exports", "ember-data", "ember-data/setup-container"], function (_exports, _emberData, _setupContainer) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - /* - This code initializes EmberData in an Ember application. - - It ensures that the `store` service is automatically injected - as the `store` property on all routes and controllers. - */ - var _default = { - name: 'ember-data', - initialize: _setupContainer.default - }; - _exports.default = _default; -}); -;define("fastboot-app/initializers/export-application-global", ["exports", "fastboot-app/config/environment"], function (_exports, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.initialize = initialize; - _exports.default = void 0; - - function initialize() { - var application = arguments[1] || arguments[0]; - - if (_environment.default.exportApplicationGlobal !== false) { - var theGlobal; - - if (typeof window !== 'undefined') { - theGlobal = window; - } else if (typeof global !== 'undefined') { - theGlobal = global; - } else if (typeof self !== 'undefined') { - theGlobal = self; - } else { - // no reasonable global, just bail - return; - } - - var value = _environment.default.exportApplicationGlobal; - var globalName; - - if (typeof value === 'string') { - globalName = value; - } else { - globalName = Ember.String.classify(_environment.default.modulePrefix); - } - - if (!theGlobal[globalName]) { - theGlobal[globalName] = application; - application.reopen({ - willDestroy: function () { - this._super.apply(this, arguments); - - delete theGlobal[globalName]; - } - }); - } - } - } - - var _default = { - name: 'export-application-global', - initialize: initialize - }; - _exports.default = _default; -}); -;define("fastboot-app/instance-initializers/clear-double-boot", ["exports", "ember-cli-fastboot/instance-initializers/clear-double-boot"], function (_exports, _clearDoubleBoot) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _clearDoubleBoot.default; - } - }); -}); -;define("fastboot-app/instance-initializers/ember-data", ["exports", "ember-data/initialize-store-service"], function (_exports, _initializeStoreService) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - var _default = { - name: 'ember-data', - initialize: _initializeStoreService.default - }; - _exports.default = _default; -}); -;define("fastboot-app/locations/none", ["exports", "ember-cli-fastboot/locations/none"], function (_exports, _none) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _none.default; - } - }); -}); -;define("fastboot-app/router", ["exports", "fastboot-app/config/environment"], function (_exports, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - class Router extends Ember.Router { - constructor(...args) { - super(...args); - - _defineProperty(this, "location", _environment.default.locationType); - - _defineProperty(this, "rootURL", _environment.default.rootURL); - } - - } - - _exports.default = Router; - Router.map(function () {}); -}); -;define("fastboot-app/routes/index", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - var _dec, _class, _descriptor, _temp; - - function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; } - - function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); } - - let IndexRoute = (_dec = Ember.inject.service, (_class = (_temp = class IndexRoute extends Ember.Route { - constructor(...args) { - super(...args); - - _initializerDefineProperty(this, "fastboot", _descriptor, this); - } - - model() { - if (this.fastboot && this.fastboot.metadata) { - return this.fastboot.metadata; - } - - return "Hello Ember!"; - } - - }, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "fastboot", [_dec], { - configurable: true, - enumerable: true, - writable: true, - initializer: null - })), _class)); - _exports.default = IndexRoute; -}); -;define("fastboot-app/serializers/-default", ["exports", "@ember-data/serializer/json"], function (_exports, _json) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _json.default; - } - }); -}); -;define("fastboot-app/serializers/-json-api", ["exports", "@ember-data/serializer/json-api"], function (_exports, _jsonApi) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _jsonApi.default; - } - }); -}); -;define("fastboot-app/serializers/-rest", ["exports", "@ember-data/serializer/rest"], function (_exports, _rest) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _rest.default; - } - }); -}); -;define("fastboot-app/services/fastboot", ["exports", "ember-cli-fastboot/services/fastboot"], function (_exports, _fastboot) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _fastboot.default; - } - }); -}); -;define("fastboot-app/services/store", ["exports", "ember-data/store"], function (_exports, _store) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _store.default; - } - }); -}); -;define("fastboot-app/templates/application", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - var _default = Ember.HTMLBars.template({ - "id": "sAK/FsSO", - "block": "{\"symbols\":[],\"statements\":[[2,\"\\n\"],[2,\"\\n\"],[1,[30,[36,1],[[30,[36,0],null,null]],null]]],\"hasEval\":false,\"upvars\":[\"-outlet\",\"component\"]}", - "meta": { - "moduleName": "fastboot-app/templates/application.hbs" - } - }); - - _exports.default = _default; -}); -;define("fastboot-app/templates/index", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - var _default = Ember.HTMLBars.template({ - "id": "LD2YLCeU", - "block": "{\"symbols\":[\"@model\"],\"statements\":[[1,[32,1]]],\"hasEval\":false,\"upvars\":[]}", - "meta": { - "moduleName": "fastboot-app/templates/index.hbs" - } - }); - - _exports.default = _default; -}); -;define("fastboot-app/transforms/boolean", ["exports", "@ember-data/serializer/-private"], function (_exports, _private) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _private.BooleanTransform; - } - }); -}); -;define("fastboot-app/transforms/date", ["exports", "@ember-data/serializer/-private"], function (_exports, _private) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _private.DateTransform; - } - }); -}); -;define("fastboot-app/transforms/number", ["exports", "@ember-data/serializer/-private"], function (_exports, _private) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _private.NumberTransform; - } - }); -}); -;define("fastboot-app/transforms/string", ["exports", "@ember-data/serializer/-private"], function (_exports, _private) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _private.StringTransform; - } - }); -}); -; - -;define('fastboot-app/config/environment', [], function() { - if (typeof FastBoot !== 'undefined') { -return FastBoot.config('fastboot-app'); -} else { -var prefix = 'fastboot-app';try { - var metaName = prefix + '/config/environment'; - var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content'); - var config = JSON.parse(decodeURIComponent(rawConfig)); - - var exports = { 'default': config }; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; -} -catch(err) { - throw new Error('Could not read config from meta tag with name "' + metaName + '".'); -} - -} -}); - -; -if (typeof FastBoot === 'undefined') { - if (!runningTests) { - require('fastboot-app/app')['default'].create({"name":"fastboot-app","version":"0.0.0+fcd8aedb"}); - } -} - -//# sourceMappingURL=fastboot-app.map diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app.map b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app.map deleted file mode 100644 index 9a8c305d7..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/fastboot-app.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["vendor/ember-cli/app-prefix.js","fastboot-app/adapters/-json-api.js","fastboot-app/app.js","fastboot-app/component-managers/glimmer.js","fastboot-app/components/welcome-page.js","fastboot-app/data-adapter.js","fastboot-app/helpers/app-version.js","fastboot-app/helpers/pluralize.js","fastboot-app/helpers/singularize.js","fastboot-app/initializers/app-version.js","fastboot-app/initializers/container-debug-adapter.js","fastboot-app/initializers/ember-data-data-adapter.js","fastboot-app/initializers/ember-data.js","fastboot-app/initializers/export-application-global.js","fastboot-app/instance-initializers/clear-double-boot.js","fastboot-app/instance-initializers/ember-data.js","fastboot-app/locations/none.js","fastboot-app/router.js","fastboot-app/routes/index.js","fastboot-app/serializers/-default.js","fastboot-app/serializers/-json-api.js","fastboot-app/serializers/-rest.js","fastboot-app/services/fastboot.js","fastboot-app/services/store.js","fastboot-app/templates/application.js","fastboot-app/templates/index.js","fastboot-app/transforms/boolean.js","fastboot-app/transforms/date.js","fastboot-app/transforms/number.js","fastboot-app/transforms/string.js","vendor/ember-cli/app-suffix.js","vendor/ember-cli/app-config.js","vendor/ember-cli/app-boot.js"],"sourcesContent":["'use strict';\n\n\n","define(\"fastboot-app/adapters/-json-api\", [\"exports\", \"@ember-data/adapter/json-api\"], function (_exports, _jsonApi) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _jsonApi.default;\n }\n });\n});","define(\"fastboot-app/app\", [\"exports\", \"ember-resolver\", \"ember-load-initializers\", \"fastboot-app/config/environment\"], function (_exports, _emberResolver, _emberLoadInitializers, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n class App extends Ember.Application {\n constructor(...args) {\n super(...args);\n\n _defineProperty(this, \"modulePrefix\", _environment.default.modulePrefix);\n\n _defineProperty(this, \"podModulePrefix\", _environment.default.podModulePrefix);\n\n _defineProperty(this, \"Resolver\", _emberResolver.default);\n }\n\n }\n\n _exports.default = App;\n (0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix);\n});","define(\"fastboot-app/component-managers/glimmer\", [\"exports\", \"@glimmer/component/-private/ember-component-manager\"], function (_exports, _emberComponentManager) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _emberComponentManager.default;\n }\n });\n});","define(\"fastboot-app/components/welcome-page\", [\"exports\", \"ember-welcome-page/components/welcome-page\"], function (_exports, _welcomePage) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _welcomePage.default;\n }\n });\n});","define(\"fastboot-app/data-adapter\", [\"exports\", \"@ember-data/debug\"], function (_exports, _debug) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _debug.default;\n }\n });\n});","define(\"fastboot-app/helpers/app-version\", [\"exports\", \"fastboot-app/config/environment\", \"ember-cli-app-version/utils/regexp\"], function (_exports, _environment, _regexp) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.appVersion = appVersion;\n _exports.default = void 0;\n\n function appVersion(_, hash = {}) {\n const version = _environment.default.APP.version; // e.g. 1.0.0-alpha.1+4jds75hf\n // Allow use of 'hideSha' and 'hideVersion' For backwards compatibility\n\n let versionOnly = hash.versionOnly || hash.hideSha;\n let shaOnly = hash.shaOnly || hash.hideVersion;\n let match = null;\n\n if (versionOnly) {\n if (hash.showExtended) {\n match = version.match(_regexp.versionExtendedRegExp); // 1.0.0-alpha.1\n } // Fallback to just version\n\n\n if (!match) {\n match = version.match(_regexp.versionRegExp); // 1.0.0\n }\n }\n\n if (shaOnly) {\n match = version.match(_regexp.shaRegExp); // 4jds75hf\n }\n\n return match ? match[0] : version;\n }\n\n var _default = Ember.Helper.helper(appVersion);\n\n _exports.default = _default;\n});","define(\"fastboot-app/helpers/pluralize\", [\"exports\", \"ember-inflector/lib/helpers/pluralize\"], function (_exports, _pluralize) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n var _default = _pluralize.default;\n _exports.default = _default;\n});","define(\"fastboot-app/helpers/singularize\", [\"exports\", \"ember-inflector/lib/helpers/singularize\"], function (_exports, _singularize) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n var _default = _singularize.default;\n _exports.default = _default;\n});","define(\"fastboot-app/initializers/app-version\", [\"exports\", \"ember-cli-app-version/initializer-factory\", \"fastboot-app/config/environment\"], function (_exports, _initializerFactory, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n let name, version;\n\n if (_environment.default.APP) {\n name = _environment.default.APP.name;\n version = _environment.default.APP.version;\n }\n\n var _default = {\n name: 'App Version',\n initialize: (0, _initializerFactory.default)(name, version)\n };\n _exports.default = _default;\n});","define(\"fastboot-app/initializers/container-debug-adapter\", [\"exports\", \"ember-resolver/resolvers/classic/container-debug-adapter\"], function (_exports, _containerDebugAdapter) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n var _default = {\n name: 'container-debug-adapter',\n\n initialize() {\n let app = arguments[1] || arguments[0];\n app.register('container-debug-adapter:main', _containerDebugAdapter.default);\n app.inject('container-debug-adapter:main', 'namespace', 'application:main');\n }\n\n };\n _exports.default = _default;\n});","define(\"fastboot-app/initializers/ember-data-data-adapter\", [\"exports\", \"@ember-data/debug/setup\"], function (_exports, _setup) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _setup.default;\n }\n });\n});","define(\"fastboot-app/initializers/ember-data\", [\"exports\", \"ember-data\", \"ember-data/setup-container\"], function (_exports, _emberData, _setupContainer) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n /*\n This code initializes EmberData in an Ember application.\n \n It ensures that the `store` service is automatically injected\n as the `store` property on all routes and controllers.\n */\n var _default = {\n name: 'ember-data',\n initialize: _setupContainer.default\n };\n _exports.default = _default;\n});","define(\"fastboot-app/initializers/export-application-global\", [\"exports\", \"fastboot-app/config/environment\"], function (_exports, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.initialize = initialize;\n _exports.default = void 0;\n\n function initialize() {\n var application = arguments[1] || arguments[0];\n\n if (_environment.default.exportApplicationGlobal !== false) {\n var theGlobal;\n\n if (typeof window !== 'undefined') {\n theGlobal = window;\n } else if (typeof global !== 'undefined') {\n theGlobal = global;\n } else if (typeof self !== 'undefined') {\n theGlobal = self;\n } else {\n // no reasonable global, just bail\n return;\n }\n\n var value = _environment.default.exportApplicationGlobal;\n var globalName;\n\n if (typeof value === 'string') {\n globalName = value;\n } else {\n globalName = Ember.String.classify(_environment.default.modulePrefix);\n }\n\n if (!theGlobal[globalName]) {\n theGlobal[globalName] = application;\n application.reopen({\n willDestroy: function () {\n this._super.apply(this, arguments);\n\n delete theGlobal[globalName];\n }\n });\n }\n }\n }\n\n var _default = {\n name: 'export-application-global',\n initialize: initialize\n };\n _exports.default = _default;\n});","define(\"fastboot-app/instance-initializers/clear-double-boot\", [\"exports\", \"ember-cli-fastboot/instance-initializers/clear-double-boot\"], function (_exports, _clearDoubleBoot) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _clearDoubleBoot.default;\n }\n });\n});","define(\"fastboot-app/instance-initializers/ember-data\", [\"exports\", \"ember-data/initialize-store-service\"], function (_exports, _initializeStoreService) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n var _default = {\n name: 'ember-data',\n initialize: _initializeStoreService.default\n };\n _exports.default = _default;\n});","define(\"fastboot-app/locations/none\", [\"exports\", \"ember-cli-fastboot/locations/none\"], function (_exports, _none) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _none.default;\n }\n });\n});","define(\"fastboot-app/router\", [\"exports\", \"fastboot-app/config/environment\"], function (_exports, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n class Router extends Ember.Router {\n constructor(...args) {\n super(...args);\n\n _defineProperty(this, \"location\", _environment.default.locationType);\n\n _defineProperty(this, \"rootURL\", _environment.default.rootURL);\n }\n\n }\n\n _exports.default = Router;\n Router.map(function () {});\n});","define(\"fastboot-app/routes/index\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n var _dec, _class, _descriptor, _temp;\n\n function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\n function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n let IndexRoute = (_dec = Ember.inject.service, (_class = (_temp = class IndexRoute extends Ember.Route {\n constructor(...args) {\n super(...args);\n\n _initializerDefineProperty(this, \"fastboot\", _descriptor, this);\n }\n\n model() {\n if (this.fastboot && this.fastboot.metadata) {\n return this.fastboot.metadata;\n }\n\n return \"Hello Ember!\";\n }\n\n }, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, \"fastboot\", [_dec], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n })), _class));\n _exports.default = IndexRoute;\n});","define(\"fastboot-app/serializers/-default\", [\"exports\", \"@ember-data/serializer/json\"], function (_exports, _json) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _json.default;\n }\n });\n});","define(\"fastboot-app/serializers/-json-api\", [\"exports\", \"@ember-data/serializer/json-api\"], function (_exports, _jsonApi) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _jsonApi.default;\n }\n });\n});","define(\"fastboot-app/serializers/-rest\", [\"exports\", \"@ember-data/serializer/rest\"], function (_exports, _rest) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _rest.default;\n }\n });\n});","define(\"fastboot-app/services/fastboot\", [\"exports\", \"ember-cli-fastboot/services/fastboot\"], function (_exports, _fastboot) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _fastboot.default;\n }\n });\n});","define(\"fastboot-app/services/store\", [\"exports\", \"ember-data/store\"], function (_exports, _store) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _store.default;\n }\n });\n});","define(\"fastboot-app/templates/application\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n var _default = Ember.HTMLBars.template({\n \"id\": \"sAK/FsSO\",\n \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[2,\\\"\\\\n\\\"],[2,\\\"\\\\n\\\"],[1,[30,[36,1],[[30,[36,0],null,null]],null]]],\\\"hasEval\\\":false,\\\"upvars\\\":[\\\"-outlet\\\",\\\"component\\\"]}\",\n \"meta\": {\n \"moduleName\": \"fastboot-app/templates/application.hbs\"\n }\n });\n\n _exports.default = _default;\n});","define(\"fastboot-app/templates/index\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n var _default = Ember.HTMLBars.template({\n \"id\": \"LD2YLCeU\",\n \"block\": \"{\\\"symbols\\\":[\\\"@model\\\"],\\\"statements\\\":[[1,[32,1]]],\\\"hasEval\\\":false,\\\"upvars\\\":[]}\",\n \"meta\": {\n \"moduleName\": \"fastboot-app/templates/index.hbs\"\n }\n });\n\n _exports.default = _default;\n});","define(\"fastboot-app/transforms/boolean\", [\"exports\", \"@ember-data/serializer/-private\"], function (_exports, _private) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _private.BooleanTransform;\n }\n });\n});","define(\"fastboot-app/transforms/date\", [\"exports\", \"@ember-data/serializer/-private\"], function (_exports, _private) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _private.DateTransform;\n }\n });\n});","define(\"fastboot-app/transforms/number\", [\"exports\", \"@ember-data/serializer/-private\"], function (_exports, _private) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _private.NumberTransform;\n }\n });\n});","define(\"fastboot-app/transforms/string\", [\"exports\", \"@ember-data/serializer/-private\"], function (_exports, _private) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _private.StringTransform;\n }\n });\n});","\n","define('fastboot-app/config/environment', [], function() {\n if (typeof FastBoot !== 'undefined') {\nreturn FastBoot.config('fastboot-app');\n} else {\nvar prefix = 'fastboot-app';try {\n var metaName = prefix + '/config/environment';\n var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n var config = JSON.parse(decodeURIComponent(rawConfig));\n\n var exports = { 'default': config };\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n}\ncatch(err) {\n throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n}\n});\n","\nif (typeof FastBoot === 'undefined') {\n if (!runningTests) {\n require('fastboot-app/app')['default'].create({\"name\":\"fastboot-app\",\"version\":\"0.0.0+fcd8aedb\"});\n }\n}\n\n"],"names":[],"mappings":"AAAA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"fastboot-app.js"} \ No newline at end of file diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.css b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.css deleted file mode 100644 index 691d14c0a..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.css +++ /dev/null @@ -1,489 +0,0 @@ -/*! - * QUnit 2.12.0 - * https://qunitjs.com/ - * - * Copyright OpenJS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2020-11-09T00:20Z - */ - -/** Font Family and Sizes */ - -/* Style our buttons in a simple way, uninfluenced by the styles - the tested app might load. Don't affect buttons in #qunit-fixture! - https://github.com/qunitjs/qunit/pull/1395 - https://github.com/qunitjs/qunit/issues/1437 */ -#qunit-testrunner-toolbar button, -#qunit-testresult button { - font-size: initial; - border: initial; - background-color: buttonface; -} - -#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult { - font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif; -} - -#qunit-testrunner-toolbar, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; } -#qunit-tests { font-size: smaller; } - - -/** Resets */ - -#qunit-tests, #qunit-header, #qunit-banner, #qunit-filteredTest, #qunit-userAgent, #qunit-testresult, #qunit-modulefilter { - margin: 0; - padding: 0; -} - - -/** Header (excluding toolbar) */ - -#qunit-header { - padding: 0.5em 0 0.5em 1em; - - color: #8699A4; - background-color: #0D3349; - - font-size: 1.5em; - line-height: 1em; - font-weight: 400; - - border-radius: 5px 5px 0 0; -} - -#qunit-header a { - text-decoration: none; - color: #C2CCD1; -} - -#qunit-header a:hover, -#qunit-header a:focus { - color: #FFF; -} - -#qunit-banner { - height: 5px; -} - -#qunit-filteredTest { - padding: 0.5em 1em 0.5em 1em; - color: #366097; - background-color: #F4FF77; -} - -#qunit-userAgent { - padding: 0.5em 1em 0.5em 1em; - color: #FFF; - background-color: #2B81AF; - text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px; -} - - -/** Toolbar */ - -#qunit-testrunner-toolbar { - padding: 0.5em 1em 0.5em 1em; - color: #5E740B; - background-color: #EEE; -} - -#qunit-testrunner-toolbar .clearfix { - height: 0; - clear: both; -} - -#qunit-testrunner-toolbar label { - display: inline-block; -} - -#qunit-testrunner-toolbar input[type=checkbox], -#qunit-testrunner-toolbar input[type=radio] { - margin: 3px; - vertical-align: -2px; -} - -#qunit-testrunner-toolbar input[type=text] { - box-sizing: border-box; - height: 1.6em; -} - -#qunit-toolbar-filters { - float: right; -} - -.qunit-url-config, -.qunit-filter, -#qunit-modulefilter { - display: inline-block; - line-height: 2.1em; -} - -.qunit-filter, -#qunit-modulefilter { - position: relative; - margin-left: 1em; -} - -.qunit-url-config label { - margin-right: 0.5em; -} - -#qunit-modulefilter-search { - box-sizing: border-box; - min-width: 400px; -} - -#qunit-modulefilter-search-container:after { - position: absolute; - right: 0.3em; - content: "\25bc"; - color: black; -} - -#qunit-modulefilter-dropdown { - /* align with #qunit-modulefilter-search */ - box-sizing: border-box; - min-width: 400px; - position: absolute; - right: 0; - top: 50%; - margin-top: 0.8em; - - border: 1px solid #D3D3D3; - border-top: none; - border-radius: 0 0 .25em .25em; - color: #000; - background-color: #F5F5F5; - z-index: 99; -} - -#qunit-modulefilter-dropdown a { - color: inherit; - text-decoration: none; -} - -#qunit-modulefilter-dropdown .clickable.checked { - font-weight: bold; - color: #000; - background-color: #D2E0E6; -} - -#qunit-modulefilter-dropdown .clickable:hover { - color: #FFF; - background-color: #0D3349; -} - -#qunit-modulefilter-actions { - display: block; - overflow: auto; - - /* align with #qunit-modulefilter-dropdown-list */ - font: smaller/1.5em sans-serif; -} - -#qunit-modulefilter-dropdown #qunit-modulefilter-actions > * { - box-sizing: border-box; - max-height: 2.8em; - display: block; - padding: 0.4em; -} - -#qunit-modulefilter-dropdown #qunit-modulefilter-actions > button { - float: right; - font: inherit; -} - -#qunit-modulefilter-dropdown #qunit-modulefilter-actions > :last-child { - /* insert padding to align with checkbox margins */ - padding-left: 3px; -} - -#qunit-modulefilter-dropdown-list { - max-height: 200px; - overflow-y: auto; - margin: 0; - border-top: 2px groove threedhighlight; - padding: 0.4em 0 0; - font: smaller/1.5em sans-serif; -} - -#qunit-modulefilter-dropdown-list li { - white-space: nowrap; - overflow: hidden; - text-overflow: ellipsis; -} - -#qunit-modulefilter-dropdown-list .clickable { - display: block; - padding-left: 0.15em; - padding-right: 0.5em; -} - - -/** Tests: Pass/Fail */ - -#qunit-tests { - list-style-position: inside; -} - -#qunit-tests li { - padding: 0.4em 1em 0.4em 1em; - border-bottom: 1px solid #FFF; - list-style-position: inside; -} - -#qunit-tests > li { - display: none; -} - -#qunit-tests li.running, -#qunit-tests li.pass, -#qunit-tests li.fail, -#qunit-tests li.skipped, -#qunit-tests li.aborted { - display: list-item; -} - -#qunit-tests.hidepass { - position: relative; -} - -#qunit-tests.hidepass li.running, -#qunit-tests.hidepass li.pass:not(.todo) { - visibility: hidden; - position: absolute; - width: 0; - height: 0; - padding: 0; - border: 0; - margin: 0; -} - -#qunit-tests li strong { - cursor: pointer; -} - -#qunit-tests li.skipped strong { - cursor: default; -} - -#qunit-tests li a { - padding: 0.5em; - color: #C2CCD1; - text-decoration: none; -} - -#qunit-tests li p a { - padding: 0.25em; - color: #6B6464; -} -#qunit-tests li a:hover, -#qunit-tests li a:focus { - color: #000; -} - -#qunit-tests li .runtime { - float: right; - font-size: smaller; -} - -.qunit-assert-list { - margin-top: 0.5em; - padding: 0.5em; - - background-color: #FFF; - - border-radius: 5px; -} - -.qunit-source { - margin: 0.6em 0 0.3em; -} - -.qunit-collapsed { - display: none; -} - -#qunit-tests table { - border-collapse: collapse; - margin-top: 0.2em; -} - -#qunit-tests th { - text-align: right; - vertical-align: top; - padding: 0 0.5em 0 0; -} - -#qunit-tests td { - vertical-align: top; -} - -#qunit-tests pre { - margin: 0; - white-space: pre-wrap; - word-wrap: break-word; -} - -#qunit-tests del { - color: #374E0C; - background-color: #E0F2BE; - text-decoration: none; -} - -#qunit-tests ins { - color: #500; - background-color: #FFCACA; - text-decoration: none; -} - -/*** Test Counts */ - -#qunit-tests b.counts { color: #000; } -#qunit-tests b.passed { color: #5E740B; } -#qunit-tests b.failed { color: #710909; } - -#qunit-tests li li { - padding: 5px; - background-color: #FFF; - border-bottom: none; - list-style-position: inside; -} - -/*** Passing Styles */ - -#qunit-tests li li.pass { - color: #3C510C; - background-color: #FFF; - border-left: 10px solid #C6E746; -} - -#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; } -#qunit-tests .pass .test-name { color: #366097; } - -#qunit-tests .pass .test-actual, -#qunit-tests .pass .test-expected { color: #999; } - -#qunit-banner.qunit-pass { background-color: #C6E746; } - -/*** Failing Styles */ - -#qunit-tests li li.fail { - color: #710909; - background-color: #FFF; - border-left: 10px solid #EE5757; - white-space: pre; -} - -#qunit-tests > li:last-child { - border-radius: 0 0 5px 5px; -} - -#qunit-tests .fail { color: #000; background-color: #EE5757; } -#qunit-tests .fail .test-name, -#qunit-tests .fail .module-name { color: #000; } - -#qunit-tests .fail .test-actual { color: #EE5757; } -#qunit-tests .fail .test-expected { color: #008000; } - -#qunit-banner.qunit-fail { background-color: #EE5757; } - - -/*** Aborted tests */ -#qunit-tests .aborted { color: #000; background-color: orange; } -/*** Skipped tests */ - -#qunit-tests .skipped { - background-color: #EBECE9; -} - -#qunit-tests .qunit-todo-label, -#qunit-tests .qunit-skipped-label { - background-color: #F4FF77; - display: inline-block; - font-style: normal; - color: #366097; - line-height: 1.8em; - padding: 0 0.5em; - margin: -0.4em 0.4em -0.4em 0; -} - -#qunit-tests .qunit-todo-label { - background-color: #EEE; -} - -/** Result */ - -#qunit-testresult { - color: #2B81AF; - background-color: #D2E0E6; - - border-bottom: 1px solid #FFF; -} -#qunit-testresult .clearfix { - height: 0; - clear: both; -} -#qunit-testresult .module-name { - font-weight: 700; -} -#qunit-testresult-display { - padding: 0.5em 1em 0.5em 1em; - width: 85%; - float:left; -} -#qunit-testresult-controls { - padding: 0.5em 1em 0.5em 1em; - width: 10%; - float:left; -} - -/** Fixture */ - -#qunit-fixture { - position: absolute; - top: -10000px; - left: -10000px; - width: 1000px; - height: 1000px; -} - -#ember-testing-container { - position: relative; - background: white; - bottom: 0; - right: 0; - width: 640px; - height: 384px; - overflow: auto; - z-index: 98; - border: 1px solid #ccc; - margin: 0 auto; - - /* Prevent leaking position fixed elements outside the testing container */ - transform: translateZ(0); -} - -#ember-testing-container.full-screen { - width: 100%; - height: 100%; - overflow: auto; - z-index: 98; - border: none; -} - -#ember-testing { - width: 200%; - height: 200%; - transform: scale(0.5); - transform-origin: top left; -} - -.full-screen #ember-testing { - position: absolute; - width: 100%; - height: 100%; - transform: scale(1); -} diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.js b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.js deleted file mode 100644 index 9be17afdc..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.js +++ /dev/null @@ -1,17221 +0,0 @@ - - -(function() { -/*! - * @overview Ember - JavaScript Application Framework - * @copyright Copyright 2011-2019 Tilde Inc. and contributors - * Portions Copyright 2006-2011 Strobe Inc. - * Portions Copyright 2008-2011 Apple Inc. All rights reserved. - * @license Licensed under MIT license - * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 3.18.1 - */ -/*globals process */ -var define, require, Ember; // Used in @ember/-internals/environment/lib/global.js - - -mainContext = this; // eslint-disable-line no-undef - -(function () { - var registry; - var seen; - - function missingModule(name, referrerName) { - if (referrerName) { - throw new Error('Could not find module ' + name + ' required by: ' + referrerName); - } else { - throw new Error('Could not find module ' + name); - } - } - - function internalRequire(_name, referrerName) { - var name = _name; - var mod = registry[name]; - - if (!mod) { - name = name + '/index'; - mod = registry[name]; - } - - var exports = seen[name]; - - if (exports !== undefined) { - return exports; - } - - exports = seen[name] = {}; - - if (!mod) { - missingModule(_name, referrerName); - } - - var deps = mod.deps; - var callback = mod.callback; - var reified = new Array(deps.length); - - for (var i = 0; i < deps.length; i++) { - if (deps[i] === 'exports') { - reified[i] = exports; - } else if (deps[i] === 'require') { - reified[i] = require; - } else { - reified[i] = internalRequire(deps[i], name); - } - } - - callback.apply(this, reified); - return exports; - } - - var isNode = typeof window === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; - - if (!isNode) { - Ember = this.Ember = this.Ember || {}; - } - - if (typeof Ember === 'undefined') { - Ember = {}; - } - - if (typeof Ember.__loader === 'undefined') { - registry = Object.create(null); - seen = Object.create(null); - - define = function (name, deps, callback) { - var value = {}; - - if (!callback) { - value.deps = []; - value.callback = deps; - } else { - value.deps = deps; - value.callback = callback; - } - - registry[name] = value; - }; - - require = function (name) { - return internalRequire(name, null); - }; // setup `require` module - - - require['default'] = require; - - require.has = function registryHas(moduleName) { - return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']); - }; - - require._eak_seen = registry; - Ember.__loader = { - define: define, - require: require, - registry: registry - }; - } else { - define = Ember.__loader.define; - require = Ember.__loader.require; - } -})(); -define("@ember/debug/index", ["exports", "@ember/-internals/browser-environment", "@ember/error", "@ember/debug/lib/deprecate", "@ember/debug/lib/testing", "@ember/debug/lib/warn", "@ember/debug/lib/capture-render-tree"], function (_exports, _browserEnvironment, _error, _deprecate2, _testing, _warn2, _captureRenderTree) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "registerDeprecationHandler", { - enumerable: true, - get: function () { - return _deprecate2.registerHandler; - } - }); - Object.defineProperty(_exports, "isTesting", { - enumerable: true, - get: function () { - return _testing.isTesting; - } - }); - Object.defineProperty(_exports, "setTesting", { - enumerable: true, - get: function () { - return _testing.setTesting; - } - }); - Object.defineProperty(_exports, "registerWarnHandler", { - enumerable: true, - get: function () { - return _warn2.registerHandler; - } - }); - Object.defineProperty(_exports, "captureRenderTree", { - enumerable: true, - get: function () { - return _captureRenderTree.default; - } - }); - _exports._warnIfUsingStrippedFeatureFlags = _exports.getDebugFunction = _exports.setDebugFunction = _exports.deprecateFunc = _exports.runInDebug = _exports.debugFreeze = _exports.debugSeal = _exports.deprecate = _exports.debug = _exports.warn = _exports.info = _exports.assert = void 0; - - // These are the default production build versions: - var noop = () => {}; - - var assert = noop; - _exports.assert = assert; - var info = noop; - _exports.info = info; - var warn = noop; - _exports.warn = warn; - var debug = noop; - _exports.debug = debug; - var deprecate = noop; - _exports.deprecate = deprecate; - var debugSeal = noop; - _exports.debugSeal = debugSeal; - var debugFreeze = noop; - _exports.debugFreeze = debugFreeze; - var runInDebug = noop; - _exports.runInDebug = runInDebug; - var setDebugFunction = noop; - _exports.setDebugFunction = setDebugFunction; - var getDebugFunction = noop; - _exports.getDebugFunction = getDebugFunction; - - var deprecateFunc = function () { - return arguments[arguments.length - 1]; - }; - - _exports.deprecateFunc = deprecateFunc; - - if (true - /* DEBUG */ - ) { - _exports.setDebugFunction = setDebugFunction = function (type, callback) { - switch (type) { - case 'assert': - return _exports.assert = assert = callback; - - case 'info': - return _exports.info = info = callback; - - case 'warn': - return _exports.warn = warn = callback; - - case 'debug': - return _exports.debug = debug = callback; - - case 'deprecate': - return _exports.deprecate = deprecate = callback; - - case 'debugSeal': - return _exports.debugSeal = debugSeal = callback; - - case 'debugFreeze': - return _exports.debugFreeze = debugFreeze = callback; - - case 'runInDebug': - return _exports.runInDebug = runInDebug = callback; - - case 'deprecateFunc': - return _exports.deprecateFunc = deprecateFunc = callback; - } - }; - - _exports.getDebugFunction = getDebugFunction = function (type) { - switch (type) { - case 'assert': - return assert; - - case 'info': - return info; - - case 'warn': - return warn; - - case 'debug': - return debug; - - case 'deprecate': - return deprecate; - - case 'debugSeal': - return debugSeal; - - case 'debugFreeze': - return debugFreeze; - - case 'runInDebug': - return runInDebug; - - case 'deprecateFunc': - return deprecateFunc; - } - }; - } - /** - @module @ember/debug - */ - - - if (true - /* DEBUG */ - ) { - /** - Verify that a certain expectation is met, or throw a exception otherwise. - This is useful for communicating assumptions in the code to other human - readers as well as catching bugs that accidentally violates these - expectations. - Assertions are removed from production builds, so they can be freely added - for documentation and debugging purposes without worries of incuring any - performance penalty. However, because of that, they should not be used for - checks that could reasonably fail during normal usage. Furthermore, care - should be taken to avoid accidentally relying on side-effects produced from - evaluating the condition itself, since the code will not run in production. - ```javascript - import { assert } from '@ember/debug'; - // Test for truthiness - assert('Must pass a string', typeof str === 'string'); - // Fail unconditionally - assert('This code path should never be run'); - ``` - @method assert - @static - @for @ember/debug - @param {String} description Describes the expectation. This will become the - text of the Error thrown if the assertion fails. - @param {any} condition Must be truthy for the assertion to pass. If - falsy, an exception will be thrown. - @public - @since 1.0.0 - */ - setDebugFunction('assert', function assert(desc, test) { - if (!test) { - throw new _error.default(`Assertion Failed: ${desc}`); - } - }); - /** - Display a debug notice. - Calls to this function are removed from production builds, so they can be - freely added for documentation and debugging purposes without worries of - incuring any performance penalty. - ```javascript - import { debug } from '@ember/debug'; - debug('I\'m a debug notice!'); - ``` - @method debug - @for @ember/debug - @static - @param {String} message A debug message to display. - @public - */ - - setDebugFunction('debug', function debug(message) { - /* eslint-disable no-console */ - if (console.debug) { - console.debug(`DEBUG: ${message}`); - } else { - console.log(`DEBUG: ${message}`); - } - /* eslint-ensable no-console */ - - }); - /** - Display an info notice. - Calls to this function are removed from production builds, so they can be - freely added for documentation and debugging purposes without worries of - incuring any performance penalty. - @method info - @private - */ - - setDebugFunction('info', function info() { - console.info(...arguments); - /* eslint-disable-line no-console */ - }); - /** - @module @ember/debug - @public - */ - - /** - Alias an old, deprecated method with its new counterpart. - Display a deprecation warning with the provided message and a stack trace - (Chrome and Firefox only) when the assigned method is called. - Calls to this function are removed from production builds, so they can be - freely added for documentation and debugging purposes without worries of - incuring any performance penalty. - ```javascript - import { deprecateFunc } from '@ember/debug'; - Ember.oldMethod = deprecateFunc('Please use the new, updated method', options, Ember.newMethod); - ``` - @method deprecateFunc - @static - @for @ember/debug - @param {String} message A description of the deprecation. - @param {Object} [options] The options object for `deprecate`. - @param {Function} func The new function called to replace its deprecated counterpart. - @return {Function} A new function that wraps the original function with a deprecation warning - @private - */ - - setDebugFunction('deprecateFunc', function deprecateFunc(...args) { - if (args.length === 3) { - var [message, options, func] = args; - return function (...args) { - deprecate(message, false, options); - return func.apply(this, args); - }; - } else { - var [_message, _func] = args; - return function () { - deprecate(_message); - return _func.apply(this, arguments); - }; - } - }); - /** - @module @ember/debug - @public - */ - - /** - Run a function meant for debugging. - Calls to this function are removed from production builds, so they can be - freely added for documentation and debugging purposes without worries of - incuring any performance penalty. - ```javascript - import Component from '@ember/component'; - import { runInDebug } from '@ember/debug'; - runInDebug(() => { - Component.reopen({ - didInsertElement() { - console.log("I'm happy"); - } - }); - }); - ``` - @method runInDebug - @for @ember/debug - @static - @param {Function} func The function to be executed. - @since 1.5.0 - @public - */ - - setDebugFunction('runInDebug', function runInDebug(func) { - func(); - }); - setDebugFunction('debugSeal', function debugSeal(obj) { - Object.seal(obj); - }); - setDebugFunction('debugFreeze', function debugFreeze(obj) { - // re-freezing an already frozen object introduces a significant - // performance penalty on Chrome (tested through 59). - // - // See: https://bugs.chromium.org/p/v8/issues/detail?id=6450 - if (!Object.isFrozen(obj)) { - Object.freeze(obj); - } - }); - setDebugFunction('deprecate', _deprecate2.default); - setDebugFunction('warn', _warn2.default); - } - - var _warnIfUsingStrippedFeatureFlags; - - _exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags; - - if (true - /* DEBUG */ - && !(0, _testing.isTesting)()) { - if (typeof window !== 'undefined' && (_browserEnvironment.isFirefox || _browserEnvironment.isChrome) && window.addEventListener) { - window.addEventListener('load', () => { - if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) { - var downloadURL; - - if (_browserEnvironment.isChrome) { - downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi'; - } else if (_browserEnvironment.isFirefox) { - downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/'; - } - - debug(`For more advanced debugging, install the Ember Inspector from ${downloadURL}`); - } - }, false); - } - } -}); -define("@ember/debug/lib/capture-render-tree", ["exports", "@glimmer/util"], function (_exports, _util) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = captureRenderTree; - - /** - @module @ember/debug - */ - - /** - Ember Inspector calls this function to capture the current render tree. - - In production mode, this requires turning on `ENV._DEBUG_RENDER_TREE` - before loading Ember. - - @private - @static - @method captureRenderTree - @for @ember/debug - @param app {ApplicationInstance} An `ApplicationInstance`. - @since 3.14.0 - */ - function captureRenderTree(app) { - var env = (0, _util.expect)(app.lookup('-environment:main'), 'BUG: owner is missing -environment:main'); - var rendererType = env.isInteractive ? 'renderer:-dom' : 'renderer:-inert'; - var renderer = (0, _util.expect)(app.lookup(rendererType), `BUG: owner is missing ${rendererType}`); - return renderer.debugRenderTree.capture(); - } -}); -define("@ember/debug/lib/deprecate", ["exports", "@ember/-internals/environment", "@ember/debug/index", "@ember/debug/lib/handlers"], function (_exports, _environment, _index, _handlers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.missingOptionsUntilDeprecation = _exports.missingOptionsIdDeprecation = _exports.missingOptionsDeprecation = _exports.registerHandler = _exports.default = void 0; - - /** - @module @ember/debug - @public - */ - - /** - Allows for runtime registration of handler functions that override the default deprecation behavior. - Deprecations are invoked by calls to [@ember/debug/deprecate](/ember/release/classes/@ember%2Fdebug/methods/deprecate?anchor=deprecate). - The following example demonstrates its usage by registering a handler that throws an error if the - message contains the word "should", otherwise defers to the default handler. - - ```javascript - import { registerDeprecationHandler } from '@ember/debug'; - - registerDeprecationHandler((message, options, next) => { - if (message.indexOf('should') !== -1) { - throw new Error(`Deprecation message with should: ${message}`); - } else { - // defer to whatever handler was registered before this one - next(message, options); - } - }); - ``` - - The handler function takes the following arguments: - - - - @public - @static - @method registerDeprecationHandler - @for @ember/debug - @param handler {Function} A function to handle deprecation calls. - @since 2.1.0 - */ - var registerHandler = () => {}; - - _exports.registerHandler = registerHandler; - var missingOptionsDeprecation; - _exports.missingOptionsDeprecation = missingOptionsDeprecation; - var missingOptionsIdDeprecation; - _exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation; - var missingOptionsUntilDeprecation; - _exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation; - - var deprecate = () => {}; - - if (true - /* DEBUG */ - ) { - _exports.registerHandler = registerHandler = function registerHandler(handler) { - (0, _handlers.registerHandler)('deprecate', handler); - }; - - var formatMessage = function formatMessage(_message, options) { - var message = _message; - - if (options && options.id) { - message = message + ` [deprecation id: ${options.id}]`; - } - - if (options && options.url) { - message += ` See ${options.url} for more details.`; - } - - return message; - }; - - registerHandler(function logDeprecationToConsole(message, options) { - var updatedMessage = formatMessage(message, options); - console.warn(`DEPRECATION: ${updatedMessage}`); // eslint-disable-line no-console - }); - var captureErrorForStack; - - if (new Error().stack) { - captureErrorForStack = () => new Error(); - } else { - captureErrorForStack = () => { - try { - __fail__.fail(); - } catch (e) { - return e; - } - }; - } - - registerHandler(function logDeprecationStackTrace(message, options, next) { - if (_environment.ENV.LOG_STACKTRACE_ON_DEPRECATION) { - var stackStr = ''; - var error = captureErrorForStack(); - var stack; - - if (error.stack) { - if (error['arguments']) { - // Chrome - stack = error.stack.replace(/^\s+at\s+/gm, '').replace(/^([^\(]+?)([\n$])/gm, '{anonymous}($1)$2').replace(/^Object.\s*\(([^\)]+)\)/gm, '{anonymous}($1)').split('\n'); - stack.shift(); - } else { - // Firefox - stack = error.stack.replace(/(?:\n@:0)?\s+$/m, '').replace(/^\(/gm, '{anonymous}(').split('\n'); - } - - stackStr = `\n ${stack.slice(2).join('\n ')}`; - } - - var updatedMessage = formatMessage(message, options); - console.warn(`DEPRECATION: ${updatedMessage}${stackStr}`); // eslint-disable-line no-console - } else { - next(message, options); - } - }); - registerHandler(function raiseOnDeprecation(message, options, next) { - if (_environment.ENV.RAISE_ON_DEPRECATION) { - var updatedMessage = formatMessage(message); - throw new Error(updatedMessage); - } else { - next(message, options); - } - }); - _exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `deprecate` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include `id` and `until` properties.'; - _exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `deprecate` you must provide `id` in options.'; - _exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation = 'When calling `deprecate` you must provide `until` in options.'; - /** - @module @ember/debug - @public - */ - - /** - Display a deprecation warning with the provided message and a stack trace - (Chrome and Firefox only). - * In a production build, this method is defined as an empty function (NOP). - Uses of this method in Ember itself are stripped from the ember.prod.js build. - @method deprecate - @for @ember/debug - @param {String} message A description of the deprecation. - @param {Boolean} test A boolean. If falsy, the deprecation will be displayed. - @param {Object} options - @param {String} options.id A unique id for this deprecation. The id can be - used by Ember debugging tools to change the behavior (raise, log or silence) - for that specific deprecation. The id should be namespaced by dots, e.g. - "view.helper.select". - @param {string} options.until The version of Ember when this deprecation - warning will be removed. - @param {String} [options.url] An optional url to the transition guide on the - emberjs.com website. - @static - @public - @since 1.0.0 - */ - - deprecate = function deprecate(message, test, options) { - (0, _index.assert)(missingOptionsDeprecation, Boolean(options && (options.id || options.until))); - (0, _index.assert)(missingOptionsIdDeprecation, Boolean(options.id)); - (0, _index.assert)(missingOptionsUntilDeprecation, Boolean(options.until)); - (0, _handlers.invoke)('deprecate', message, test, options); - }; - } - - var _default = deprecate; - _exports.default = _default; -}); -define("@ember/debug/lib/handlers", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.invoke = _exports.registerHandler = _exports.HANDLERS = void 0; - var HANDLERS = {}; - _exports.HANDLERS = HANDLERS; - - var registerHandler = () => {}; - - _exports.registerHandler = registerHandler; - - var invoke = () => {}; - - _exports.invoke = invoke; - - if (true - /* DEBUG */ - ) { - _exports.registerHandler = registerHandler = function registerHandler(type, callback) { - var nextHandler = HANDLERS[type] || (() => {}); - - HANDLERS[type] = (message, options) => { - callback(message, options, nextHandler); - }; - }; - - _exports.invoke = invoke = function invoke(type, message, test, options) { - if (test) { - return; - } - - var handlerForType = HANDLERS[type]; - - if (handlerForType) { - handlerForType(message, options); - } - }; - } -}); -define("@ember/debug/lib/testing", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.isTesting = isTesting; - _exports.setTesting = setTesting; - var testing = false; - - function isTesting() { - return testing; - } - - function setTesting(value) { - testing = Boolean(value); - } -}); -define("@ember/debug/lib/warn", ["exports", "@ember/debug/index", "@ember/debug/lib/handlers"], function (_exports, _index, _handlers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.missingOptionsDeprecation = _exports.missingOptionsIdDeprecation = _exports.registerHandler = _exports.default = void 0; - - var registerHandler = () => {}; - - _exports.registerHandler = registerHandler; - - var warn = () => {}; - - var missingOptionsDeprecation; - _exports.missingOptionsDeprecation = missingOptionsDeprecation; - var missingOptionsIdDeprecation; - /** - @module @ember/debug - */ - - _exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation; - - if (true - /* DEBUG */ - ) { - /** - Allows for runtime registration of handler functions that override the default warning behavior. - Warnings are invoked by calls made to [@ember/debug/warn](/ember/release/classes/@ember%2Fdebug/methods/warn?anchor=warn). - The following example demonstrates its usage by registering a handler that does nothing overriding Ember's - default warning behavior. - ```javascript - import { registerWarnHandler } from '@ember/debug'; - // next is not called, so no warnings get the default behavior - registerWarnHandler(() => {}); - ``` - The handler function takes the following arguments: - - @public - @static - @method registerWarnHandler - @for @ember/debug - @param handler {Function} A function to handle warnings. - @since 2.1.0 - */ - _exports.registerHandler = registerHandler = function registerHandler(handler) { - (0, _handlers.registerHandler)('warn', handler); - }; - - registerHandler(function logWarning(message) { - /* eslint-disable no-console */ - console.warn(`WARNING: ${message}`); - /* eslint-enable no-console */ - }); - _exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `warn` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include an `id` property.'; - _exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `warn` you must provide `id` in options.'; - /** - Display a warning with the provided message. - * In a production build, this method is defined as an empty function (NOP). - Uses of this method in Ember itself are stripped from the ember.prod.js build. - ```javascript - import { warn } from '@ember/debug'; - import tomsterCount from './tomster-counter'; // a module in my project - // Log a warning if we have more than 3 tomsters - warn('Too many tomsters!', tomsterCount <= 3, { - id: 'ember-debug.too-many-tomsters' - }); - ``` - @method warn - @for @ember/debug - @static - @param {String} message A warning to display. - @param {Boolean} test An optional boolean. If falsy, the warning - will be displayed. - @param {Object} options An object that can be used to pass a unique - `id` for this warning. The `id` can be used by Ember debugging tools - to change the behavior (raise, log, or silence) for that specific warning. - The `id` should be namespaced by dots, e.g. "ember-debug.feature-flag-with-features-stripped" - @public - @since 1.0.0 - */ - - warn = function warn(message, test, options) { - if (arguments.length === 2 && typeof test === 'object') { - options = test; - test = false; - } - - (0, _index.assert)(missingOptionsDeprecation, Boolean(options)); - (0, _index.assert)(missingOptionsIdDeprecation, Boolean(options && options.id)); - (0, _handlers.invoke)('warn', message, test, options); - }; - } - - var _default = warn; - _exports.default = _default; -}); -define("ember-testing/index", ["exports", "ember-testing/lib/test", "ember-testing/lib/adapters/adapter", "ember-testing/lib/setup_for_testing", "ember-testing/lib/adapters/qunit", "ember-testing/lib/support", "ember-testing/lib/ext/application", "ember-testing/lib/ext/rsvp", "ember-testing/lib/helpers", "ember-testing/lib/initializers"], function (_exports, _test, _adapter, _setup_for_testing, _qunit, _support, _application, _rsvp, _helpers, _initializers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "Test", { - enumerable: true, - get: function () { - return _test.default; - } - }); - Object.defineProperty(_exports, "Adapter", { - enumerable: true, - get: function () { - return _adapter.default; - } - }); - Object.defineProperty(_exports, "setupForTesting", { - enumerable: true, - get: function () { - return _setup_for_testing.default; - } - }); - Object.defineProperty(_exports, "QUnitAdapter", { - enumerable: true, - get: function () { - return _qunit.default; - } - }); -}); -define("ember-testing/lib/adapters/adapter", ["exports", "@ember/-internals/runtime"], function (_exports, _runtime) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - function K() { - return this; - } - /** - @module @ember/test - */ - - /** - The primary purpose of this class is to create hooks that can be implemented - by an adapter for various test frameworks. - - @class TestAdapter - @public - */ - - - var _default = _runtime.Object.extend({ - /** - This callback will be called whenever an async operation is about to start. - Override this to call your framework's methods that handle async - operations. - @public - @method asyncStart - */ - asyncStart: K, - - /** - This callback will be called whenever an async operation has completed. - @public - @method asyncEnd - */ - asyncEnd: K, - - /** - Override this method with your testing framework's false assertion. - This function is called whenever an exception occurs causing the testing - promise to fail. - QUnit example: - ```javascript - exception: function(error) { - ok(false, error); - }; - ``` - @public - @method exception - @param {String} error The exception to be raised. - */ - exception(error) { - throw error; - } - - }); - - _exports.default = _default; -}); -define("ember-testing/lib/adapters/qunit", ["exports", "@ember/-internals/utils", "ember-testing/lib/adapters/adapter"], function (_exports, _utils, _adapter) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - /* globals QUnit */ - - /** - @module ember - */ - - /** - This class implements the methods defined by TestAdapter for the - QUnit testing framework. - - @class QUnitAdapter - @namespace Ember.Test - @extends TestAdapter - @public - */ - var _default = _adapter.default.extend({ - init() { - this.doneCallbacks = []; - }, - - asyncStart() { - if (typeof QUnit.stop === 'function') { - // very old QUnit version - QUnit.stop(); - } else { - this.doneCallbacks.push(QUnit.config.current ? QUnit.config.current.assert.async() : null); - } - }, - - asyncEnd() { - // checking for QUnit.stop here (even though we _need_ QUnit.start) because - // QUnit.start() still exists in QUnit 2.x (it just throws an error when calling - // inside a test context) - if (typeof QUnit.stop === 'function') { - QUnit.start(); - } else { - var done = this.doneCallbacks.pop(); // This can be null if asyncStart() was called outside of a test - - if (done) { - done(); - } - } - }, - - exception(error) { - QUnit.config.current.assert.ok(false, (0, _utils.inspect)(error)); - } - - }); - - _exports.default = _default; -}); -define("ember-testing/lib/events", ["exports", "@ember/runloop", "@ember/polyfills", "ember-testing/lib/helpers/-is-form-control"], function (_exports, _runloop, _polyfills, _isFormControl) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.focus = focus; - _exports.fireEvent = fireEvent; - var DEFAULT_EVENT_OPTIONS = { - canBubble: true, - cancelable: true - }; - var KEYBOARD_EVENT_TYPES = ['keydown', 'keypress', 'keyup']; - var MOUSE_EVENT_TYPES = ['click', 'mousedown', 'mouseup', 'dblclick', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover']; - - function focus(el) { - if (!el) { - return; - } - - if (el.isContentEditable || (0, _isFormControl.default)(el)) { - var type = el.getAttribute('type'); - - if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') { - (0, _runloop.run)(null, function () { - var browserIsNotFocused = document.hasFocus && !document.hasFocus(); // makes `document.activeElement` be `element`. If the browser is focused, it also fires a focus event - - el.focus(); // Firefox does not trigger the `focusin` event if the window - // does not have focus. If the document does not have focus then - // fire `focusin` event as well. - - if (browserIsNotFocused) { - // if the browser is not focused the previous `el.focus()` didn't fire an event, so we simulate it - fireEvent(el, 'focus', { - bubbles: false - }); - fireEvent(el, 'focusin'); - } - }); - } - } - } - - function fireEvent(element, type, options = {}) { - if (!element) { - return; - } - - var event; - - if (KEYBOARD_EVENT_TYPES.indexOf(type) > -1) { - event = buildKeyboardEvent(type, options); - } else if (MOUSE_EVENT_TYPES.indexOf(type) > -1) { - var rect = element.getBoundingClientRect(); - var x = rect.left + 1; - var y = rect.top + 1; - var simulatedCoordinates = { - screenX: x + 5, - screenY: y + 95, - clientX: x, - clientY: y - }; - event = buildMouseEvent(type, (0, _polyfills.assign)(simulatedCoordinates, options)); - } else { - event = buildBasicEvent(type, options); - } - - element.dispatchEvent(event); - } - - function buildBasicEvent(type, options = {}) { - var event = document.createEvent('Events'); // Event.bubbles is read only - - var bubbles = options.bubbles !== undefined ? options.bubbles : true; - var cancelable = options.cancelable !== undefined ? options.cancelable : true; - delete options.bubbles; - delete options.cancelable; - event.initEvent(type, bubbles, cancelable); - (0, _polyfills.assign)(event, options); - return event; - } - - function buildMouseEvent(type, options = {}) { - var event; - - try { - event = document.createEvent('MouseEvents'); - var eventOpts = (0, _polyfills.assign)({}, DEFAULT_EVENT_OPTIONS, options); - event.initMouseEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget); - } catch (e) { - event = buildBasicEvent(type, options); - } - - return event; - } - - function buildKeyboardEvent(type, options = {}) { - var event; - - try { - event = document.createEvent('KeyEvents'); - var eventOpts = (0, _polyfills.assign)({}, DEFAULT_EVENT_OPTIONS, options); - event.initKeyEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode); - } catch (e) { - event = buildBasicEvent(type, options); - } - - return event; - } -}); -define("ember-testing/lib/ext/application", ["@ember/application", "ember-testing/lib/setup_for_testing", "ember-testing/lib/test/helpers", "ember-testing/lib/test/promise", "ember-testing/lib/test/run", "ember-testing/lib/test/on_inject_helpers", "ember-testing/lib/test/adapter"], function (_application, _setup_for_testing, _helpers, _promise, _run, _on_inject_helpers, _adapter) { - "use strict"; - - _application.default.reopen({ - /** - This property contains the testing helpers for the current application. These - are created once you call `injectTestHelpers` on your `Application` - instance. The included helpers are also available on the `window` object by - default, but can be used from this object on the individual application also. - @property testHelpers - @type {Object} - @default {} - @public - */ - testHelpers: {}, - - /** - This property will contain the original methods that were registered - on the `helperContainer` before `injectTestHelpers` is called. - When `removeTestHelpers` is called, these methods are restored to the - `helperContainer`. - @property originalMethods - @type {Object} - @default {} - @private - @since 1.3.0 - */ - originalMethods: {}, - - /** - This property indicates whether or not this application is currently in - testing mode. This is set when `setupForTesting` is called on the current - application. - @property testing - @type {Boolean} - @default false - @since 1.3.0 - @public - */ - testing: false, - - /** - This hook defers the readiness of the application, so that you can start - the app when your tests are ready to run. It also sets the router's - location to 'none', so that the window's location will not be modified - (preventing both accidental leaking of state between tests and interference - with your testing framework). `setupForTesting` should only be called after - setting a custom `router` class (for example `App.Router = Router.extend(`). - Example: - ``` - App.setupForTesting(); - ``` - @method setupForTesting - @public - */ - setupForTesting() { - (0, _setup_for_testing.default)(); - this.testing = true; - this.resolveRegistration('router:main').reopen({ - location: 'none' - }); - }, - - /** - This will be used as the container to inject the test helpers into. By - default the helpers are injected into `window`. - @property helperContainer - @type {Object} The object to be used for test helpers. - @default window - @since 1.2.0 - @private - */ - helperContainer: null, - - /** - This injects the test helpers into the `helperContainer` object. If an object is provided - it will be used as the helperContainer. If `helperContainer` is not set it will default - to `window`. If a function of the same name has already been defined it will be cached - (so that it can be reset if the helper is removed with `unregisterHelper` or - `removeTestHelpers`). - Any callbacks registered with `onInjectHelpers` will be called once the - helpers have been injected. - Example: - ``` - App.injectTestHelpers(); - ``` - @method injectTestHelpers - @public - */ - injectTestHelpers(helperContainer) { - if (helperContainer) { - this.helperContainer = helperContainer; - } else { - this.helperContainer = window; - } - - this.reopen({ - willDestroy() { - this._super(...arguments); - - this.removeTestHelpers(); - } - - }); - this.testHelpers = {}; - - for (var name in _helpers.helpers) { - this.originalMethods[name] = this.helperContainer[name]; - this.testHelpers[name] = this.helperContainer[name] = helper(this, name); - protoWrap(_promise.default.prototype, name, helper(this, name), _helpers.helpers[name].meta.wait); - } - - (0, _on_inject_helpers.invokeInjectHelpersCallbacks)(this); - }, - - /** - This removes all helpers that have been registered, and resets and functions - that were overridden by the helpers. - Example: - ```javascript - App.removeTestHelpers(); - ``` - @public - @method removeTestHelpers - */ - removeTestHelpers() { - if (!this.helperContainer) { - return; - } - - for (var name in _helpers.helpers) { - this.helperContainer[name] = this.originalMethods[name]; - delete _promise.default.prototype[name]; - delete this.testHelpers[name]; - delete this.originalMethods[name]; - } - } - - }); // This method is no longer needed - // But still here for backwards compatibility - // of helper chaining - - - function protoWrap(proto, name, callback, isAsync) { - proto[name] = function (...args) { - if (isAsync) { - return callback.apply(this, args); - } else { - return this.then(function () { - return callback.apply(this, args); - }); - } - }; - } - - function helper(app, name) { - var fn = _helpers.helpers[name].method; - var meta = _helpers.helpers[name].meta; - - if (!meta.wait) { - return (...args) => fn.apply(app, [app, ...args]); - } - - return (...args) => { - var lastPromise = (0, _run.default)(() => (0, _promise.resolve)((0, _promise.getLastPromise)())); // wait for last helper's promise to resolve and then - // execute. To be safe, we need to tell the adapter we're going - // asynchronous here, because fn may not be invoked before we - // return. - - (0, _adapter.asyncStart)(); - return lastPromise.then(() => fn.apply(app, [app, ...args])).finally(_adapter.asyncEnd); - }; - } -}); -define("ember-testing/lib/ext/rsvp", ["exports", "@ember/-internals/runtime", "@ember/runloop", "@ember/debug", "ember-testing/lib/test/adapter"], function (_exports, _runtime, _runloop, _debug, _adapter) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - _runtime.RSVP.configure('async', function (callback, promise) { - // if schedule will cause autorun, we need to inform adapter - if ((0, _debug.isTesting)() && !_runloop.backburner.currentInstance) { - (0, _adapter.asyncStart)(); - - _runloop.backburner.schedule('actions', () => { - (0, _adapter.asyncEnd)(); - callback(promise); - }); - } else { - _runloop.backburner.schedule('actions', () => callback(promise)); - } - }); - - var _default = _runtime.RSVP; - _exports.default = _default; -}); -define("ember-testing/lib/helpers", ["ember-testing/lib/test/helpers", "ember-testing/lib/helpers/and_then", "ember-testing/lib/helpers/click", "ember-testing/lib/helpers/current_path", "ember-testing/lib/helpers/current_route_name", "ember-testing/lib/helpers/current_url", "ember-testing/lib/helpers/fill_in", "ember-testing/lib/helpers/find", "ember-testing/lib/helpers/find_with_assert", "ember-testing/lib/helpers/key_event", "ember-testing/lib/helpers/pause_test", "ember-testing/lib/helpers/trigger_event", "ember-testing/lib/helpers/visit", "ember-testing/lib/helpers/wait"], function (_helpers, _and_then, _click, _current_path, _current_route_name, _current_url, _fill_in, _find, _find_with_assert, _key_event, _pause_test, _trigger_event, _visit, _wait) { - "use strict"; - - (0, _helpers.registerAsyncHelper)('visit', _visit.default); - (0, _helpers.registerAsyncHelper)('click', _click.default); - (0, _helpers.registerAsyncHelper)('keyEvent', _key_event.default); - (0, _helpers.registerAsyncHelper)('fillIn', _fill_in.default); - (0, _helpers.registerAsyncHelper)('wait', _wait.default); - (0, _helpers.registerAsyncHelper)('andThen', _and_then.default); - (0, _helpers.registerAsyncHelper)('pauseTest', _pause_test.pauseTest); - (0, _helpers.registerAsyncHelper)('triggerEvent', _trigger_event.default); - (0, _helpers.registerHelper)('find', _find.default); - (0, _helpers.registerHelper)('findWithAssert', _find_with_assert.default); - (0, _helpers.registerHelper)('currentRouteName', _current_route_name.default); - (0, _helpers.registerHelper)('currentPath', _current_path.default); - (0, _helpers.registerHelper)('currentURL', _current_url.default); - (0, _helpers.registerHelper)('resumeTest', _pause_test.resumeTest); -}); -define("ember-testing/lib/helpers/-is-form-control", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = isFormControl; - var FORM_CONTROL_TAGS = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA']; - /** - @private - @param {Element} element the element to check - @returns {boolean} `true` when the element is a form control, `false` otherwise - */ - - function isFormControl(element) { - var { - tagName, - type - } = element; - - if (type === 'hidden') { - return false; - } - - return FORM_CONTROL_TAGS.indexOf(tagName) > -1; - } -}); -define("ember-testing/lib/helpers/and_then", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = andThen; - - function andThen(app, callback) { - return app.testHelpers.wait(callback(app)); - } -}); -define("ember-testing/lib/helpers/click", ["exports", "ember-testing/lib/events"], function (_exports, _events) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = click; - - /** - @module ember - */ - - /** - Clicks an element and triggers any actions triggered by the element's `click` - event. - - Example: - - ```javascript - click('.some-jQuery-selector').then(function() { - // assert something - }); - ``` - - @method click - @param {String} selector jQuery selector for finding element on the DOM - @param {Object} context A DOM Element, Document, or jQuery to use as context - @return {RSVP.Promise} - @public - */ - function click(app, selector, context) { - var $el = app.testHelpers.findWithAssert(selector, context); - var el = $el[0]; - (0, _events.fireEvent)(el, 'mousedown'); - (0, _events.focus)(el); - (0, _events.fireEvent)(el, 'mouseup'); - (0, _events.fireEvent)(el, 'click'); - return app.testHelpers.wait(); - } -}); -define("ember-testing/lib/helpers/current_path", ["exports", "@ember/-internals/metal"], function (_exports, _metal) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = currentPath; - - /** - @module ember - */ - - /** - Returns the current path. - - Example: - - ```javascript - function validateURL() { - equal(currentPath(), 'some.path.index', "correct path was transitioned into."); - } - - click('#some-link-id').then(validateURL); - ``` - - @method currentPath - @return {Object} The currently active path. - @since 1.5.0 - @public - */ - function currentPath(app) { - var routingService = app.__container__.lookup('service:-routing'); - - return (0, _metal.get)(routingService, 'currentPath'); - } -}); -define("ember-testing/lib/helpers/current_route_name", ["exports", "@ember/-internals/metal"], function (_exports, _metal) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = currentRouteName; - - /** - @module ember - */ - - /** - Returns the currently active route name. - - Example: - - ```javascript - function validateRouteName() { - equal(currentRouteName(), 'some.path', "correct route was transitioned into."); - } - visit('/some/path').then(validateRouteName) - ``` - - @method currentRouteName - @return {Object} The name of the currently active route. - @since 1.5.0 - @public - */ - function currentRouteName(app) { - var routingService = app.__container__.lookup('service:-routing'); - - return (0, _metal.get)(routingService, 'currentRouteName'); - } -}); -define("ember-testing/lib/helpers/current_url", ["exports", "@ember/-internals/metal"], function (_exports, _metal) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = currentURL; - - /** - @module ember - */ - - /** - Returns the current URL. - - Example: - - ```javascript - function validateURL() { - equal(currentURL(), '/some/path', "correct URL was transitioned into."); - } - - click('#some-link-id').then(validateURL); - ``` - - @method currentURL - @return {Object} The currently active URL. - @since 1.5.0 - @public - */ - function currentURL(app) { - var router = app.__container__.lookup('router:main'); - - return (0, _metal.get)(router, 'location').getURL(); - } -}); -define("ember-testing/lib/helpers/fill_in", ["exports", "ember-testing/lib/events", "ember-testing/lib/helpers/-is-form-control"], function (_exports, _events, _isFormControl) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = fillIn; - - /** - @module ember - */ - - /** - Fills in an input element with some text. - - Example: - - ```javascript - fillIn('#email', 'you@example.com').then(function() { - // assert something - }); - ``` - - @method fillIn - @param {String} selector jQuery selector finding an input element on the DOM - to fill text with - @param {String} text text to place inside the input element - @return {RSVP.Promise} - @public - */ - function fillIn(app, selector, contextOrText, text) { - var $el, el, context; - - if (text === undefined) { - text = contextOrText; - } else { - context = contextOrText; - } - - $el = app.testHelpers.findWithAssert(selector, context); - el = $el[0]; - (0, _events.focus)(el); - - if ((0, _isFormControl.default)(el)) { - el.value = text; - } else { - el.innerHTML = text; - } - - (0, _events.fireEvent)(el, 'input'); - (0, _events.fireEvent)(el, 'change'); - return app.testHelpers.wait(); - } -}); -define("ember-testing/lib/helpers/find", ["exports", "@ember/-internals/metal", "@ember/debug", "@ember/-internals/views"], function (_exports, _metal, _debug, _views) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = find; - - /** - @module ember - */ - - /** - Finds an element in the context of the app's container element. A simple alias - for `app.$(selector)`. - - Example: - - ```javascript - var $el = find('.my-selector'); - ``` - - With the `context` param: - - ```javascript - var $el = find('.my-selector', '.parent-element-class'); - ``` - - @method find - @param {String} selector jQuery selector for element lookup - @param {String} [context] (optional) jQuery selector that will limit the selector - argument to find only within the context's children - @return {Object} DOM element representing the results of the query - @public - */ - function find(app, selector, context) { - if (_views.jQueryDisabled) { - (true && !(false) && (0, _debug.assert)('If jQuery is disabled, please import and use helpers from @ember/test-helpers [https://github.com/emberjs/ember-test-helpers]. Note: `find` is not an available helper.')); - } - - var $el; - context = context || (0, _metal.get)(app, 'rootElement'); - $el = app.$(selector, context); - return $el; - } -}); -define("ember-testing/lib/helpers/find_with_assert", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = findWithAssert; - - /** - @module ember - */ - - /** - Like `find`, but throws an error if the element selector returns no results. - - Example: - - ```javascript - var $el = findWithAssert('.doesnt-exist'); // throws error - ``` - - With the `context` param: - - ```javascript - var $el = findWithAssert('.selector-id', '.parent-element-class'); // assert will pass - ``` - - @method findWithAssert - @param {String} selector jQuery selector string for finding an element within - the DOM - @param {String} [context] (optional) jQuery selector that will limit the - selector argument to find only within the context's children - @return {Object} jQuery object representing the results of the query - @throws {Error} throws error if object returned has a length of 0 - @public - */ - function findWithAssert(app, selector, context) { - var $el = app.testHelpers.find(selector, context); - - if ($el.length === 0) { - throw new Error('Element ' + selector + ' not found.'); - } - - return $el; - } -}); -define("ember-testing/lib/helpers/key_event", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = keyEvent; - - /** - @module ember - */ - - /** - Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode - Example: - ```javascript - keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() { - // assert something - }); - ``` - @method keyEvent - @param {String} selector jQuery selector for finding element on the DOM - @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup` - @param {Number} keyCode the keyCode of the simulated key event - @return {RSVP.Promise} - @since 1.5.0 - @public - */ - function keyEvent(app, selector, contextOrType, typeOrKeyCode, keyCode) { - var context, type; - - if (keyCode === undefined) { - context = null; - keyCode = typeOrKeyCode; - type = contextOrType; - } else { - context = contextOrType; - type = typeOrKeyCode; - } - - return app.testHelpers.triggerEvent(selector, context, type, { - keyCode, - which: keyCode - }); - } -}); -define("ember-testing/lib/helpers/pause_test", ["exports", "@ember/-internals/runtime", "@ember/debug"], function (_exports, _runtime, _debug) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.resumeTest = resumeTest; - _exports.pauseTest = pauseTest; - - /** - @module ember - */ - var resume; - /** - Resumes a test paused by `pauseTest`. - - @method resumeTest - @return {void} - @public - */ - - function resumeTest() { - (true && !(resume) && (0, _debug.assert)('Testing has not been paused. There is nothing to resume.', resume)); - resume(); - resume = undefined; - } - /** - Pauses the current test - this is useful for debugging while testing or for test-driving. - It allows you to inspect the state of your application at any point. - Example (The test will pause before clicking the button): - - ```javascript - visit('/') - return pauseTest(); - click('.btn'); - ``` - - You may want to turn off the timeout before pausing. - - qunit (timeout available to use as of 2.4.0): - - ``` - visit('/'); - assert.timeout(0); - return pauseTest(); - click('.btn'); - ``` - - mocha (timeout happens automatically as of ember-mocha v0.14.0): - - ``` - visit('/'); - this.timeout(0); - return pauseTest(); - click('.btn'); - ``` - - - @since 1.9.0 - @method pauseTest - @return {Object} A promise that will never resolve - @public - */ - - - function pauseTest() { - (0, _debug.info)('Testing paused. Use `resumeTest()` to continue.'); - return new _runtime.RSVP.Promise(resolve => { - resume = resolve; - }, 'TestAdapter paused promise'); - } -}); -define("ember-testing/lib/helpers/trigger_event", ["exports", "ember-testing/lib/events"], function (_exports, _events) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = triggerEvent; - - /** - @module ember - */ - - /** - Triggers the given DOM event on the element identified by the provided selector. - Example: - ```javascript - triggerEvent('#some-elem-id', 'blur'); - ``` - This is actually used internally by the `keyEvent` helper like so: - ```javascript - triggerEvent('#some-elem-id', 'keypress', { keyCode: 13 }); - ``` - @method triggerEvent - @param {String} selector jQuery selector for finding element on the DOM - @param {String} [context] jQuery selector that will limit the selector - argument to find only within the context's children - @param {String} type The event type to be triggered. - @param {Object} [options] The options to be passed to jQuery.Event. - @return {RSVP.Promise} - @since 1.5.0 - @public - */ - function triggerEvent(app, selector, contextOrType, typeOrOptions, possibleOptions) { - var arity = arguments.length; - var context, type, options; - - if (arity === 3) { - // context and options are optional, so this is - // app, selector, type - context = null; - type = contextOrType; - options = {}; - } else if (arity === 4) { - // context and options are optional, so this is - if (typeof typeOrOptions === 'object') { - // either - // app, selector, type, options - context = null; - type = contextOrType; - options = typeOrOptions; - } else { - // or - // app, selector, context, type - context = contextOrType; - type = typeOrOptions; - options = {}; - } - } else { - context = contextOrType; - type = typeOrOptions; - options = possibleOptions; - } - - var $el = app.testHelpers.findWithAssert(selector, context); - var el = $el[0]; - (0, _events.fireEvent)(el, type, options); - return app.testHelpers.wait(); - } -}); -define("ember-testing/lib/helpers/visit", ["exports", "@ember/runloop"], function (_exports, _runloop) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = visit; - - /** - Loads a route, sets up any controllers, and renders any templates associated - with the route as though a real user had triggered the route change while - using your app. - - Example: - - ```javascript - visit('posts/index').then(function() { - // assert something - }); - ``` - - @method visit - @param {String} url the name of the route - @return {RSVP.Promise} - @public - */ - function visit(app, url) { - var router = app.__container__.lookup('router:main'); - - var shouldHandleURL = false; - app.boot().then(() => { - router.location.setURL(url); - - if (shouldHandleURL) { - (0, _runloop.run)(app.__deprecatedInstance__, 'handleURL', url); - } - }); - - if (app._readinessDeferrals > 0) { - router.initialURL = url; - (0, _runloop.run)(app, 'advanceReadiness'); - delete router.initialURL; - } else { - shouldHandleURL = true; - } - - return app.testHelpers.wait(); - } -}); -define("ember-testing/lib/helpers/wait", ["exports", "ember-testing/lib/test/waiters", "@ember/-internals/runtime", "@ember/runloop", "ember-testing/lib/test/pending_requests"], function (_exports, _waiters, _runtime, _runloop, _pending_requests) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = wait; - - /** - @module ember - */ - - /** - Causes the run loop to process any pending events. This is used to ensure that - any async operations from other helpers (or your assertions) have been processed. - - This is most often used as the return value for the helper functions (see 'click', - 'fillIn','visit',etc). However, there is a method to register a test helper which - utilizes this method without the need to actually call `wait()` in your helpers. - - The `wait` helper is built into `registerAsyncHelper` by default. You will not need - to `return app.testHelpers.wait();` - the wait behavior is provided for you. - - Example: - - ```javascript - import { registerAsyncHelper } from '@ember/test'; - - registerAsyncHelper('loginUser', function(app, username, password) { - visit('secured/path/here') - .fillIn('#username', username) - .fillIn('#password', password) - .click('.submit'); - }); - ``` - - @method wait - @param {Object} value The value to be returned. - @return {RSVP.Promise} Promise that resolves to the passed value. - @public - @since 1.0.0 - */ - function wait(app, value) { - return new _runtime.RSVP.Promise(function (resolve) { - var router = app.__container__.lookup('router:main'); // Every 10ms, poll for the async thing to have finished - - - var watcher = setInterval(() => { - // 1. If the router is loading, keep polling - var routerIsLoading = router._routerMicrolib && Boolean(router._routerMicrolib.activeTransition); - - if (routerIsLoading) { - return; - } // 2. If there are pending Ajax requests, keep polling - - - if ((0, _pending_requests.pendingRequests)()) { - return; - } // 3. If there are scheduled timers or we are inside of a run loop, keep polling - - - if ((0, _runloop.hasScheduledTimers)() || (0, _runloop.getCurrentRunLoop)()) { - return; - } - - if ((0, _waiters.checkWaiters)()) { - return; - } // Stop polling - - - clearInterval(watcher); // Synchronously resolve the promise - - (0, _runloop.run)(null, resolve, value); - }, 10); - }); - } -}); -define("ember-testing/lib/initializers", ["@ember/application"], function (_application) { - "use strict"; - - var name = 'deferReadiness in `testing` mode'; - (0, _application.onLoad)('Ember.Application', function (Application) { - if (!Application.initializers[name]) { - Application.initializer({ - name: name, - - initialize(application) { - if (application.testing) { - application.deferReadiness(); - } - } - - }); - } - }); -}); -define("ember-testing/lib/setup_for_testing", ["exports", "@ember/debug", "@ember/-internals/views", "ember-testing/lib/test/adapter", "ember-testing/lib/test/pending_requests", "ember-testing/lib/adapters/adapter", "ember-testing/lib/adapters/qunit"], function (_exports, _debug, _views, _adapter, _pending_requests, _adapter2, _qunit) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = setupForTesting; - - /* global self */ - - /** - Sets Ember up for testing. This is useful to perform - basic setup steps in order to unit test. - - Use `App.setupForTesting` to perform integration tests (full - application testing). - - @method setupForTesting - @namespace Ember - @since 1.5.0 - @private - */ - function setupForTesting() { - (0, _debug.setTesting)(true); - var adapter = (0, _adapter.getAdapter)(); // if adapter is not manually set default to QUnit - - if (!adapter) { - (0, _adapter.setAdapter)(typeof self.QUnit === 'undefined' ? _adapter2.default.create() : _qunit.default.create()); - } - - if (!_views.jQueryDisabled) { - (0, _views.jQuery)(document).off('ajaxSend', _pending_requests.incrementPendingRequests); - (0, _views.jQuery)(document).off('ajaxComplete', _pending_requests.decrementPendingRequests); - (0, _pending_requests.clearPendingRequests)(); - (0, _views.jQuery)(document).on('ajaxSend', _pending_requests.incrementPendingRequests); - (0, _views.jQuery)(document).on('ajaxComplete', _pending_requests.decrementPendingRequests); - } - } -}); -define("ember-testing/lib/support", ["@ember/debug", "@ember/-internals/views", "@ember/-internals/browser-environment"], function (_debug, _views, _browserEnvironment) { - "use strict"; - - /** - @module ember - */ - var $ = _views.jQuery; - /** - This method creates a checkbox and triggers the click event to fire the - passed in handler. It is used to correct for a bug in older versions - of jQuery (e.g 1.8.3). - - @private - @method testCheckboxClick - */ - - function testCheckboxClick(handler) { - var input = document.createElement('input'); - $(input).attr('type', 'checkbox').css({ - position: 'absolute', - left: '-1000px', - top: '-1000px' - }).appendTo('body').on('click', handler).trigger('click').remove(); - } - - if (_browserEnvironment.hasDOM && !_views.jQueryDisabled) { - $(function () { - /* - Determine whether a checkbox checked using jQuery's "click" method will have - the correct value for its checked property. - If we determine that the current jQuery version exhibits this behavior, - patch it to work correctly as in the commit for the actual fix: - https://github.com/jquery/jquery/commit/1fb2f92. - */ - testCheckboxClick(function () { - if (!this.checked && !$.event.special.click) { - $.event.special.click = { - // For checkbox, fire native event so checked state will be right - trigger() { - if (this.nodeName === 'INPUT' && this.type === 'checkbox' && this.click) { - this.click(); - return false; - } - } - - }; - } - }); // Try again to verify that the patch took effect or blow up. - - testCheckboxClick(function () { - (true && (0, _debug.warn)("clicked checkboxes should be checked! the jQuery patch didn't work", this.checked, { - id: 'ember-testing.test-checkbox-click' - })); - }); - }); - } -}); -define("ember-testing/lib/test", ["exports", "ember-testing/lib/test/helpers", "ember-testing/lib/test/on_inject_helpers", "ember-testing/lib/test/promise", "ember-testing/lib/test/waiters", "ember-testing/lib/test/adapter"], function (_exports, _helpers, _on_inject_helpers, _promise, _waiters, _adapter) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - /** - @module ember - */ - - /** - This is a container for an assortment of testing related functionality: - - * Choose your default test adapter (for your framework of choice). - * Register/Unregister additional test helpers. - * Setup callbacks to be fired when the test helpers are injected into - your application. - - @class Test - @namespace Ember - @public - */ - var Test = { - /** - Hash containing all known test helpers. - @property _helpers - @private - @since 1.7.0 - */ - _helpers: _helpers.helpers, - registerHelper: _helpers.registerHelper, - registerAsyncHelper: _helpers.registerAsyncHelper, - unregisterHelper: _helpers.unregisterHelper, - onInjectHelpers: _on_inject_helpers.onInjectHelpers, - Promise: _promise.default, - promise: _promise.promise, - resolve: _promise.resolve, - registerWaiter: _waiters.registerWaiter, - unregisterWaiter: _waiters.unregisterWaiter, - checkWaiters: _waiters.checkWaiters - }; - /** - Used to allow ember-testing to communicate with a specific testing - framework. - - You can manually set it before calling `App.setupForTesting()`. - - Example: - - ```javascript - Ember.Test.adapter = MyCustomAdapter.create() - ``` - - If you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`. - - @public - @for Ember.Test - @property adapter - @type {Class} The adapter to be used. - @default Ember.Test.QUnitAdapter - */ - - Object.defineProperty(Test, 'adapter', { - get: _adapter.getAdapter, - set: _adapter.setAdapter - }); - var _default = Test; - _exports.default = _default; -}); -define("ember-testing/lib/test/adapter", ["exports", "@ember/-internals/error-handling"], function (_exports, _errorHandling) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.getAdapter = getAdapter; - _exports.setAdapter = setAdapter; - _exports.asyncStart = asyncStart; - _exports.asyncEnd = asyncEnd; - var adapter; - - function getAdapter() { - return adapter; - } - - function setAdapter(value) { - adapter = value; - - if (value && typeof value.exception === 'function') { - (0, _errorHandling.setDispatchOverride)(adapterDispatch); - } else { - (0, _errorHandling.setDispatchOverride)(null); - } - } - - function asyncStart() { - if (adapter) { - adapter.asyncStart(); - } - } - - function asyncEnd() { - if (adapter) { - adapter.asyncEnd(); - } - } - - function adapterDispatch(error) { - adapter.exception(error); - console.error(error.stack); // eslint-disable-line no-console - } -}); -define("ember-testing/lib/test/helpers", ["exports", "ember-testing/lib/test/promise"], function (_exports, _promise) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.registerHelper = registerHelper; - _exports.registerAsyncHelper = registerAsyncHelper; - _exports.unregisterHelper = unregisterHelper; - _exports.helpers = void 0; - var helpers = {}; - /** - @module @ember/test - */ - - /** - `registerHelper` is used to register a test helper that will be injected - when `App.injectTestHelpers` is called. - - The helper method will always be called with the current Application as - the first parameter. - - For example: - - ```javascript - import { registerHelper } from '@ember/test'; - import { run } from '@ember/runloop'; - - registerHelper('boot', function(app) { - run(app, app.advanceReadiness); - }); - ``` - - This helper can later be called without arguments because it will be - called with `app` as the first parameter. - - ```javascript - import Application from '@ember/application'; - - App = Application.create(); - App.injectTestHelpers(); - boot(); - ``` - - @public - @for @ember/test - @static - @method registerHelper - @param {String} name The name of the helper method to add. - @param {Function} helperMethod - @param options {Object} - */ - - _exports.helpers = helpers; - - function registerHelper(name, helperMethod) { - helpers[name] = { - method: helperMethod, - meta: { - wait: false - } - }; - } - /** - `registerAsyncHelper` is used to register an async test helper that will be injected - when `App.injectTestHelpers` is called. - - The helper method will always be called with the current Application as - the first parameter. - - For example: - - ```javascript - import { registerAsyncHelper } from '@ember/test'; - import { run } from '@ember/runloop'; - - registerAsyncHelper('boot', function(app) { - run(app, app.advanceReadiness); - }); - ``` - - The advantage of an async helper is that it will not run - until the last async helper has completed. All async helpers - after it will wait for it complete before running. - - - For example: - - ```javascript - import { registerAsyncHelper } from '@ember/test'; - - registerAsyncHelper('deletePost', function(app, postId) { - click('.delete-' + postId); - }); - - // ... in your test - visit('/post/2'); - deletePost(2); - visit('/post/3'); - deletePost(3); - ``` - - @public - @for @ember/test - @method registerAsyncHelper - @param {String} name The name of the helper method to add. - @param {Function} helperMethod - @since 1.2.0 - */ - - - function registerAsyncHelper(name, helperMethod) { - helpers[name] = { - method: helperMethod, - meta: { - wait: true - } - }; - } - /** - Remove a previously added helper method. - - Example: - - ```javascript - import { unregisterHelper } from '@ember/test'; - - unregisterHelper('wait'); - ``` - - @public - @method unregisterHelper - @static - @for @ember/test - @param {String} name The helper to remove. - */ - - - function unregisterHelper(name) { - delete helpers[name]; - delete _promise.default.prototype[name]; - } -}); -define("ember-testing/lib/test/on_inject_helpers", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.onInjectHelpers = onInjectHelpers; - _exports.invokeInjectHelpersCallbacks = invokeInjectHelpersCallbacks; - _exports.callbacks = void 0; - var callbacks = []; - /** - Used to register callbacks to be fired whenever `App.injectTestHelpers` - is called. - - The callback will receive the current application as an argument. - - Example: - - ```javascript - import $ from 'jquery'; - - Ember.Test.onInjectHelpers(function() { - $(document).ajaxSend(function() { - Test.pendingRequests++; - }); - - $(document).ajaxComplete(function() { - Test.pendingRequests--; - }); - }); - ``` - - @public - @for Ember.Test - @method onInjectHelpers - @param {Function} callback The function to be called. - */ - - _exports.callbacks = callbacks; - - function onInjectHelpers(callback) { - callbacks.push(callback); - } - - function invokeInjectHelpersCallbacks(app) { - for (var i = 0; i < callbacks.length; i++) { - callbacks[i](app); - } - } -}); -define("ember-testing/lib/test/pending_requests", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.pendingRequests = pendingRequests; - _exports.clearPendingRequests = clearPendingRequests; - _exports.incrementPendingRequests = incrementPendingRequests; - _exports.decrementPendingRequests = decrementPendingRequests; - var requests = []; - - function pendingRequests() { - return requests.length; - } - - function clearPendingRequests() { - requests.length = 0; - } - - function incrementPendingRequests(_, xhr) { - requests.push(xhr); - } - - function decrementPendingRequests(_, xhr) { - setTimeout(function () { - for (var i = 0; i < requests.length; i++) { - if (xhr === requests[i]) { - requests.splice(i, 1); - break; - } - } - }, 0); - } -}); -define("ember-testing/lib/test/promise", ["exports", "@ember/-internals/runtime", "ember-testing/lib/test/run"], function (_exports, _runtime, _run) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.promise = promise; - _exports.resolve = resolve; - _exports.getLastPromise = getLastPromise; - _exports.default = void 0; - var lastPromise; - - class TestPromise extends _runtime.RSVP.Promise { - constructor() { - super(...arguments); - lastPromise = this; - } - - then(_onFulfillment, ...args) { - var onFulfillment = typeof _onFulfillment === 'function' ? result => isolate(_onFulfillment, result) : undefined; - return super.then(onFulfillment, ...args); - } - - } - /** - This returns a thenable tailored for testing. It catches failed - `onSuccess` callbacks and invokes the `Ember.Test.adapter.exception` - callback in the last chained then. - - This method should be returned by async helpers such as `wait`. - - @public - @for Ember.Test - @method promise - @param {Function} resolver The function used to resolve the promise. - @param {String} label An optional string for identifying the promise. - */ - - - _exports.default = TestPromise; - - function promise(resolver, label) { - var fullLabel = `Ember.Test.promise: ${label || ''}`; - return new TestPromise(resolver, fullLabel); - } - /** - Replacement for `Ember.RSVP.resolve` - The only difference is this uses - an instance of `Ember.Test.Promise` - - @public - @for Ember.Test - @method resolve - @param {Mixed} The value to resolve - @since 1.2.0 - */ - - - function resolve(result, label) { - return TestPromise.resolve(result, label); - } - - function getLastPromise() { - return lastPromise; - } // This method isolates nested async methods - // so that they don't conflict with other last promises. - // - // 1. Set `Ember.Test.lastPromise` to null - // 2. Invoke method - // 3. Return the last promise created during method - - - function isolate(onFulfillment, result) { - // Reset lastPromise for nested helpers - lastPromise = null; - var value = onFulfillment(result); - var promise = lastPromise; - lastPromise = null; // If the method returned a promise - // return that promise. If not, - // return the last async helper's promise - - if (value && value instanceof TestPromise || !promise) { - return value; - } else { - return (0, _run.default)(() => resolve(promise).then(() => value)); - } - } -}); -define("ember-testing/lib/test/run", ["exports", "@ember/runloop"], function (_exports, _runloop) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = run; - - function run(fn) { - if (!(0, _runloop.getCurrentRunLoop)()) { - return (0, _runloop.run)(fn); - } else { - return fn(); - } - } -}); -define("ember-testing/lib/test/waiters", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.registerWaiter = registerWaiter; - _exports.unregisterWaiter = unregisterWaiter; - _exports.checkWaiters = checkWaiters; - - /** - @module @ember/test - */ - var contexts = []; - var callbacks = []; - /** - This allows ember-testing to play nicely with other asynchronous - events, such as an application that is waiting for a CSS3 - transition or an IndexDB transaction. The waiter runs periodically - after each async helper (i.e. `click`, `andThen`, `visit`, etc) has executed, - until the returning result is truthy. After the waiters finish, the next async helper - is executed and the process repeats. - - For example: - - ```javascript - import { registerWaiter } from '@ember/test'; - - registerWaiter(function() { - return myPendingTransactions() === 0; - }); - ``` - The `context` argument allows you to optionally specify the `this` - with which your callback will be invoked. - - For example: - - ```javascript - import { registerWaiter } from '@ember/test'; - - registerWaiter(MyDB, MyDB.hasPendingTransactions); - ``` - - @public - @for @ember/test - @static - @method registerWaiter - @param {Object} context (optional) - @param {Function} callback - @since 1.2.0 - */ - - function registerWaiter(context, callback) { - if (arguments.length === 1) { - callback = context; - context = null; - } - - if (indexOf(context, callback) > -1) { - return; - } - - contexts.push(context); - callbacks.push(callback); - } - /** - `unregisterWaiter` is used to unregister a callback that was - registered with `registerWaiter`. - - @public - @for @ember/test - @static - @method unregisterWaiter - @param {Object} context (optional) - @param {Function} callback - @since 1.2.0 - */ - - - function unregisterWaiter(context, callback) { - if (!callbacks.length) { - return; - } - - if (arguments.length === 1) { - callback = context; - context = null; - } - - var i = indexOf(context, callback); - - if (i === -1) { - return; - } - - contexts.splice(i, 1); - callbacks.splice(i, 1); - } - /** - Iterates through each registered test waiter, and invokes - its callback. If any waiter returns false, this method will return - true indicating that the waiters have not settled yet. - - This is generally used internally from the acceptance/integration test - infrastructure. - - @public - @for @ember/test - @static - @method checkWaiters - */ - - - function checkWaiters() { - if (!callbacks.length) { - return false; - } - - for (var i = 0; i < callbacks.length; i++) { - var context = contexts[i]; - var callback = callbacks[i]; - - if (!callback.call(context)) { - return true; - } - } - - return false; - } - - function indexOf(context, callback) { - for (var i = 0; i < callbacks.length; i++) { - if (callbacks[i] === callback && contexts[i] === context) { - return i; - } - } - - return -1; - } -}); - - var testing = require('ember-testing'); - Ember.Test = testing.Test; - Ember.Test.Adapter = testing.Adapter; - Ember.Test.QUnitAdapter = testing.QUnitAdapter; - Ember.setupForTesting = testing.setupForTesting; - -}()); - -/* globals require, Ember, jQuery */ -(() => { - if (typeof jQuery !== 'undefined') { - let _Ember; - - if (typeof Ember !== 'undefined') { - _Ember = Ember; - } else { - _Ember = require('ember').default; - } - - let pendingRequests; - - if (Ember.__loader.registry['ember-testing/test/pending_requests']) { - // Ember <= 3.1 - pendingRequests = Ember.__loader.require('ember-testing/test/pending_requests'); - } else if (Ember.__loader.registry['ember-testing/lib/test/pending_requests']) { - // Ember >= 3.2 - pendingRequests = Ember.__loader.require('ember-testing/lib/test/pending_requests'); - } - - if (pendingRequests) { - // This exists to ensure that the AJAX listeners setup by Ember itself - // (which as of 2.17 are not properly torn down) get cleared and released - // when the application is destroyed. Without this, any AJAX requests - // that happen _between_ acceptance tests will always share - // `pendingRequests`. - _Ember.Application.reopen({ - willDestroy() { - jQuery(document).off('ajaxSend', pendingRequests.incrementPendingRequests); - jQuery(document).off('ajaxComplete', pendingRequests.decrementPendingRequests); - pendingRequests.clearPendingRequests(); - - this._super(...arguments); - } - - }); - } - } -})(); -/*! - * QUnit 2.12.0 - * https://qunitjs.com/ - * - * Copyright OpenJS Foundation and other contributors - * Released under the MIT license - * https://jquery.org/license - * - * Date: 2020-11-09T00:20Z - */ -(function (global$1) { - 'use strict'; - - function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } - - var global__default = /*#__PURE__*/_interopDefaultLegacy(global$1); - - var window$1 = global__default['default'].window; - var self$1 = global__default['default'].self; - var console = global__default['default'].console; - var setTimeout$1 = global__default['default'].setTimeout; - var clearTimeout = global__default['default'].clearTimeout; - var document$1 = window$1 && window$1.document; - var navigator = window$1 && window$1.navigator; - var localSessionStorage = function () { - var x = "qunit-test-string"; - - try { - global__default['default'].sessionStorage.setItem(x, x); - global__default['default'].sessionStorage.removeItem(x); - return global__default['default'].sessionStorage; - } catch (e) { - return undefined; - } - }(); // Support IE 9-10: Fallback for fuzzysort.js used by /reporter/html.js - - if (!global__default['default'].Map) { - global__default['default'].Map = function StringMap() { - var store = Object.create(null); - - this.get = function (strKey) { - return store[strKey]; - }; - - this.set = function (strKey, val) { - store[strKey] = val; - return this; - }; - - this.clear = function () { - store = Object.create(null); - }; - }; - } - - function _typeof(obj) { - "@babel/helpers - typeof"; - - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function (obj) { - return typeof obj; - }; - } else { - _typeof = function (obj) { - return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; - }; - } - - return _typeof(obj); - } - - function _classCallCheck(instance, Constructor) { - if (!(instance instanceof Constructor)) { - throw new TypeError("Cannot call a class as a function"); - } - } - - function _defineProperties(target, props) { - for (var i = 0; i < props.length; i++) { - var descriptor = props[i]; - descriptor.enumerable = descriptor.enumerable || false; - descriptor.configurable = true; - if ("value" in descriptor) descriptor.writable = true; - Object.defineProperty(target, descriptor.key, descriptor); - } - } - - function _createClass(Constructor, protoProps, staticProps) { - if (protoProps) _defineProperties(Constructor.prototype, protoProps); - if (staticProps) _defineProperties(Constructor, staticProps); - return Constructor; - } - - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } - - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } - - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); - } - - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } - - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; - - for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; - - return arr2; - } - - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - function _createForOfIteratorHelper(o, allowArrayLike) { - var it; - - if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { - if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { - if (it) o = it; - var i = 0; - - var F = function () {}; - - return { - s: F, - n: function () { - if (i >= o.length) return { - done: true - }; - return { - done: false, - value: o[i++] - }; - }, - e: function (e) { - throw e; - }, - f: F - }; - } - - throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } - - var normalCompletion = true, - didErr = false, - err; - return { - s: function () { - it = o[Symbol.iterator](); - }, - n: function () { - var step = it.next(); - normalCompletion = step.done; - return step; - }, - e: function (e) { - didErr = true; - err = e; - }, - f: function () { - try { - if (!normalCompletion && it.return != null) it.return(); - } finally { - if (didErr) throw err; - } - } - }; - } - - // This allows support for IE 9, which doesn't have a console - // object if the developer tools are not open. - - var Logger = { - warn: console ? console.warn.bind(console) : function () {} - }; - - var toString = Object.prototype.toString; - var hasOwn = Object.prototype.hasOwnProperty; - var now = Date.now || function () { - return new Date().getTime(); - }; - var nativePerf = getNativePerf(); - - function getNativePerf() { - if (window$1 && typeof window$1.performance !== "undefined" && typeof window$1.performance.mark === "function" && typeof window$1.performance.measure === "function") { - return window$1.performance; - } else { - return undefined; - } - } - - var performance = { - now: nativePerf ? nativePerf.now.bind(nativePerf) : now, - measure: nativePerf ? function (comment, startMark, endMark) { - // `performance.measure` may fail if the mark could not be found. - // reasons a specific mark could not be found include: outside code invoking `performance.clearMarks()` - try { - nativePerf.measure(comment, startMark, endMark); - } catch (ex) { - Logger.warn("performance.measure could not be executed because of ", ex.message); - } - } : function () {}, - mark: nativePerf ? nativePerf.mark.bind(nativePerf) : function () {} - }; // Returns a new Array with the elements that are in a but not in b - - function diff(a, b) { - var i, - j, - result = a.slice(); - - for (i = 0; i < result.length; i++) { - for (j = 0; j < b.length; j++) { - if (result[i] === b[j]) { - result.splice(i, 1); - i--; - break; - } - } - } - - return result; - } - /** - * Determines whether an element exists in a given array or not. - * - * @method inArray - * @param {Any} elem - * @param {Array} array - * @return {Boolean} - */ - - function inArray(elem, array) { - return array.indexOf(elem) !== -1; - } - /** - * Makes a clone of an object using only Array or Object as base, - * and copies over the own enumerable properties. - * - * @param {Object} obj - * @return {Object} New object with only the own properties (recursively). - */ - - function objectValues(obj) { - var key, - val, - vals = is("array", obj) ? [] : {}; - - for (key in obj) { - if (hasOwn.call(obj, key)) { - val = obj[key]; - vals[key] = val === Object(val) ? objectValues(val) : val; - } - } - - return vals; - } - function extend(a, b, undefOnly) { - for (var prop in b) { - if (hasOwn.call(b, prop)) { - if (b[prop] === undefined) { - delete a[prop]; - } else if (!(undefOnly && typeof a[prop] !== "undefined")) { - a[prop] = b[prop]; - } - } - } - - return a; - } - function objectType(obj) { - if (typeof obj === "undefined") { - return "undefined"; - } // Consider: typeof null === object - - - if (obj === null) { - return "null"; - } - - var match = toString.call(obj).match(/^\[object\s(.*)\]$/), - type = match && match[1]; - - switch (type) { - case "Number": - if (isNaN(obj)) { - return "nan"; - } - - return "number"; - - case "String": - case "Boolean": - case "Array": - case "Set": - case "Map": - case "Date": - case "RegExp": - case "Function": - case "Symbol": - return type.toLowerCase(); - - default: - return _typeof(obj); - } - } // Safe object type checking - - function is(type, obj) { - return objectType(obj) === type; - } // Based on Java's String.hashCode, a simple but not - // rigorously collision resistant hashing function - - function generateHash(module, testName) { - var str = module + "\x1C" + testName; - var hash = 0; - - for (var i = 0; i < str.length; i++) { - hash = (hash << 5) - hash + str.charCodeAt(i); - hash |= 0; - } // Convert the possibly negative integer hash code into an 8 character hex string, which isn't - // strictly necessary but increases user understanding that the id is a SHA-like hash - - - var hex = (0x100000000 + hash).toString(16); - - if (hex.length < 8) { - hex = "0000000" + hex; - } - - return hex.slice(-8); - } - - // Authors: Philippe Rathé , David Chan - - var equiv = (function () { - // Value pairs queued for comparison. Used for breadth-first processing order, recursion - // detection and avoiding repeated comparison (see below for details). - // Elements are { a: val, b: val }. - var pairs = []; - - var getProto = Object.getPrototypeOf || function (obj) { - return obj.__proto__; - }; - - function useStrictEquality(a, b) { - // This only gets called if a and b are not strict equal, and is used to compare on - // the primitive values inside object wrappers. For example: - // `var i = 1;` - // `var j = new Number(1);` - // Neither a nor b can be null, as a !== b and they have the same type. - if (_typeof(a) === "object") { - a = a.valueOf(); - } - - if (_typeof(b) === "object") { - b = b.valueOf(); - } - - return a === b; - } - - function compareConstructors(a, b) { - var protoA = getProto(a); - var protoB = getProto(b); // Comparing constructors is more strict than using `instanceof` - - if (a.constructor === b.constructor) { - return true; - } // Ref #851 - // If the obj prototype descends from a null constructor, treat it - // as a null prototype. - - - if (protoA && protoA.constructor === null) { - protoA = null; - } - - if (protoB && protoB.constructor === null) { - protoB = null; - } // Allow objects with no prototype to be equivalent to - // objects with Object as their constructor. - - - if (protoA === null && protoB === Object.prototype || protoB === null && protoA === Object.prototype) { - return true; - } - - return false; - } - - function getRegExpFlags(regexp) { - return "flags" in regexp ? regexp.flags : regexp.toString().match(/[gimuy]*$/)[0]; - } - - function isContainer(val) { - return ["object", "array", "map", "set"].indexOf(objectType(val)) !== -1; - } - - function breadthFirstCompareChild(a, b) { - // If a is a container not reference-equal to b, postpone the comparison to the - // end of the pairs queue -- unless (a, b) has been seen before, in which case skip - // over the pair. - if (a === b) { - return true; - } - - if (!isContainer(a)) { - return typeEquiv(a, b); - } - - if (pairs.every(function (pair) { - return pair.a !== a || pair.b !== b; - })) { - // Not yet started comparing this pair - pairs.push({ - a: a, - b: b - }); - } - - return true; - } - - var callbacks = { - "string": useStrictEquality, - "boolean": useStrictEquality, - "number": useStrictEquality, - "null": useStrictEquality, - "undefined": useStrictEquality, - "symbol": useStrictEquality, - "date": useStrictEquality, - "nan": function nan() { - return true; - }, - "regexp": function regexp(a, b) { - return a.source === b.source && // Include flags in the comparison - getRegExpFlags(a) === getRegExpFlags(b); - }, - // abort (identical references / instance methods were skipped earlier) - "function": function _function() { - return false; - }, - "array": function array(a, b) { - var i, len; - len = a.length; - - if (len !== b.length) { - // Safe and faster - return false; - } - - for (i = 0; i < len; i++) { - // Compare non-containers; queue non-reference-equal containers - if (!breadthFirstCompareChild(a[i], b[i])) { - return false; - } - } - - return true; - }, - // Define sets a and b to be equivalent if for each element aVal in a, there - // is some element bVal in b such that aVal and bVal are equivalent. Element - // repetitions are not counted, so these are equivalent: - // a = new Set( [ {}, [], [] ] ); - // b = new Set( [ {}, {}, [] ] ); - "set": function set(a, b) { - var innerEq, - outerEq = true; - - if (a.size !== b.size) { - // This optimization has certain quirks because of the lack of - // repetition counting. For instance, adding the same - // (reference-identical) element to two equivalent sets can - // make them non-equivalent. - return false; - } - - a.forEach(function (aVal) { - // Short-circuit if the result is already known. (Using for...of - // with a break clause would be cleaner here, but it would cause - // a syntax error on older Javascript implementations even if - // Set is unused) - if (!outerEq) { - return; - } - - innerEq = false; - b.forEach(function (bVal) { - var parentPairs; // Likewise, short-circuit if the result is already known - - if (innerEq) { - return; - } // Swap out the global pairs list, as the nested call to - // innerEquiv will clobber its contents - - - parentPairs = pairs; - - if (innerEquiv(bVal, aVal)) { - innerEq = true; - } // Replace the global pairs list - - - pairs = parentPairs; - }); - - if (!innerEq) { - outerEq = false; - } - }); - return outerEq; - }, - // Define maps a and b to be equivalent if for each key-value pair (aKey, aVal) - // in a, there is some key-value pair (bKey, bVal) in b such that - // [ aKey, aVal ] and [ bKey, bVal ] are equivalent. Key repetitions are not - // counted, so these are equivalent: - // a = new Map( [ [ {}, 1 ], [ {}, 1 ], [ [], 1 ] ] ); - // b = new Map( [ [ {}, 1 ], [ [], 1 ], [ [], 1 ] ] ); - "map": function map(a, b) { - var innerEq, - outerEq = true; - - if (a.size !== b.size) { - // This optimization has certain quirks because of the lack of - // repetition counting. For instance, adding the same - // (reference-identical) key-value pair to two equivalent maps - // can make them non-equivalent. - return false; - } - - a.forEach(function (aVal, aKey) { - // Short-circuit if the result is already known. (Using for...of - // with a break clause would be cleaner here, but it would cause - // a syntax error on older Javascript implementations even if - // Map is unused) - if (!outerEq) { - return; - } - - innerEq = false; - b.forEach(function (bVal, bKey) { - var parentPairs; // Likewise, short-circuit if the result is already known - - if (innerEq) { - return; - } // Swap out the global pairs list, as the nested call to - // innerEquiv will clobber its contents - - - parentPairs = pairs; - - if (innerEquiv([bVal, bKey], [aVal, aKey])) { - innerEq = true; - } // Replace the global pairs list - - - pairs = parentPairs; - }); - - if (!innerEq) { - outerEq = false; - } - }); - return outerEq; - }, - "object": function object(a, b) { - var i, - aProperties = [], - bProperties = []; - - if (compareConstructors(a, b) === false) { - return false; - } // Be strict: don't ensure hasOwnProperty and go deep - - - for (i in a) { - // Collect a's properties - aProperties.push(i); // Skip OOP methods that look the same - - if (a.constructor !== Object && typeof a.constructor !== "undefined" && typeof a[i] === "function" && typeof b[i] === "function" && a[i].toString() === b[i].toString()) { - continue; - } // Compare non-containers; queue non-reference-equal containers - - - if (!breadthFirstCompareChild(a[i], b[i])) { - return false; - } - } - - for (i in b) { - // Collect b's properties - bProperties.push(i); - } // Ensures identical properties name - - - return typeEquiv(aProperties.sort(), bProperties.sort()); - } - }; - - function typeEquiv(a, b) { - var type = objectType(a); // Callbacks for containers will append to the pairs queue to achieve breadth-first - // search order. The pairs queue is also used to avoid reprocessing any pair of - // containers that are reference-equal to a previously visited pair (a special case - // this being recursion detection). - // - // Because of this approach, once typeEquiv returns a false value, it should not be - // called again without clearing the pair queue else it may wrongly report a visited - // pair as being equivalent. - - return objectType(b) === type && callbacks[type](a, b); - } - - function innerEquiv(a, b) { - var i, pair; // We're done when there's nothing more to compare - - if (arguments.length < 2) { - return true; - } // Clear the global pair queue and add the top-level values being compared - - - pairs = [{ - a: a, - b: b - }]; - - for (i = 0; i < pairs.length; i++) { - pair = pairs[i]; // Perform type-specific comparison on any pairs that are not strictly - // equal. For container types, that comparison will postpone comparison - // of any sub-container pair to the end of the pair queue. This gives - // breadth-first search order. It also avoids the reprocessing of - // reference-equal siblings, cousins etc, which can have a significant speed - // impact when comparing a container of small objects each of which has a - // reference to the same (singleton) large object. - - if (pair.a !== pair.b && !typeEquiv(pair.a, pair.b)) { - return false; - } - } // ...across all consecutive argument pairs - - - return arguments.length === 2 || innerEquiv.apply(this, [].slice.call(arguments, 1)); - } - - return function () { - var result = innerEquiv.apply(void 0, arguments); // Release any retained objects - - pairs.length = 0; - return result; - }; - })(); - - /** - * Config object: Maintain internal state - * Later exposed as QUnit.config - * `config` initialized at top of scope - */ - - var config = { - // The queue of tests to run - queue: [], - // Block until document ready - blocking: true, - // By default, run previously failed tests first - // very useful in combination with "Hide passed tests" checked - reorder: true, - // By default, modify document.title when suite is done - altertitle: true, - // HTML Reporter: collapse every test except the first failing test - // If false, all failing tests will be expanded - collapse: true, - // By default, scroll to top of the page when suite is done - scrolltop: true, - // Depth up-to which object will be dumped - maxDepth: 5, - // When enabled, all tests must call expect() - requireExpects: false, - // Placeholder for user-configurable form-exposed URL parameters - urlConfig: [], - // Set of all modules. - modules: [], - // The first unnamed module - currentModule: { - name: "", - tests: [], - childModules: [], - testsRun: 0, - unskippedTestsRun: 0, - hooks: { - before: [], - beforeEach: [], - afterEach: [], - after: [] - } - }, - callbacks: {}, - // The storage module to use for reordering tests - storage: localSessionStorage - }; // take a predefined QUnit.config and extend the defaults - - var globalConfig = window$1 && window$1.QUnit && window$1.QUnit.config; // only extend the global config if there is no QUnit overload - - if (window$1 && window$1.QUnit && !window$1.QUnit.version) { - extend(config, globalConfig); - } // Push a loose unnamed module to the modules collection - - - config.modules.push(config.currentModule); - - // https://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html - - var dump = (function () { - function quote(str) { - return "\"" + str.toString().replace(/\\/g, "\\\\").replace(/"/g, "\\\"") + "\""; - } - - function literal(o) { - return o + ""; - } - - function join(pre, arr, post) { - var s = dump.separator(), - base = dump.indent(), - inner = dump.indent(1); - - if (arr.join) { - arr = arr.join("," + s + inner); - } - - if (!arr) { - return pre + post; - } - - return [pre, inner + arr, base + post].join(s); - } - - function array(arr, stack) { - var i = arr.length, - ret = new Array(i); - - if (dump.maxDepth && dump.depth > dump.maxDepth) { - return "[object Array]"; - } - - this.up(); - - while (i--) { - ret[i] = this.parse(arr[i], undefined, stack); - } - - this.down(); - return join("[", ret, "]"); - } - - function isArray(obj) { - return (//Native Arrays - toString.call(obj) === "[object Array]" || // NodeList objects - typeof obj.length === "number" && obj.item !== undefined && (obj.length ? obj.item(0) === obj[0] : obj.item(0) === null && obj[0] === undefined) - ); - } - - var reName = /^function (\w+)/, - dump = { - // The objType is used mostly internally, you can fix a (custom) type in advance - parse: function parse(obj, objType, stack) { - stack = stack || []; - var res, - parser, - parserType, - objIndex = stack.indexOf(obj); - - if (objIndex !== -1) { - return "recursion(".concat(objIndex - stack.length, ")"); - } - - objType = objType || this.typeOf(obj); - parser = this.parsers[objType]; - parserType = _typeof(parser); - - if (parserType === "function") { - stack.push(obj); - res = parser.call(this, obj, stack); - stack.pop(); - return res; - } - - return parserType === "string" ? parser : this.parsers.error; - }, - typeOf: function typeOf(obj) { - var type; - - if (obj === null) { - type = "null"; - } else if (typeof obj === "undefined") { - type = "undefined"; - } else if (is("regexp", obj)) { - type = "regexp"; - } else if (is("date", obj)) { - type = "date"; - } else if (is("function", obj)) { - type = "function"; - } else if (obj.setInterval !== undefined && obj.document !== undefined && obj.nodeType === undefined) { - type = "window"; - } else if (obj.nodeType === 9) { - type = "document"; - } else if (obj.nodeType) { - type = "node"; - } else if (isArray(obj)) { - type = "array"; - } else if (obj.constructor === Error.prototype.constructor) { - type = "error"; - } else { - type = _typeof(obj); - } - - return type; - }, - separator: function separator() { - if (this.multiline) { - return this.HTML ? "
" : "\n"; - } else { - return this.HTML ? " " : " "; - } - }, - // Extra can be a number, shortcut for increasing-calling-decreasing - indent: function indent(extra) { - if (!this.multiline) { - return ""; - } - - var chr = this.indentChar; - - if (this.HTML) { - chr = chr.replace(/\t/g, " ").replace(/ /g, " "); - } - - return new Array(this.depth + (extra || 0)).join(chr); - }, - up: function up(a) { - this.depth += a || 1; - }, - down: function down(a) { - this.depth -= a || 1; - }, - setParser: function setParser(name, parser) { - this.parsers[name] = parser; - }, - // The next 3 are exposed so you can use them - quote: quote, - literal: literal, - join: join, - depth: 1, - maxDepth: config.maxDepth, - // This is the list of parsers, to modify them, use dump.setParser - parsers: { - window: "[Window]", - document: "[Document]", - error: function error(_error) { - return "Error(\"" + _error.message + "\")"; - }, - unknown: "[Unknown]", - "null": "null", - "undefined": "undefined", - "function": function _function(fn) { - var ret = "function", - // Functions never have name in IE - name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1]; - - if (name) { - ret += " " + name; - } - - ret += "("; - ret = [ret, dump.parse(fn, "functionArgs"), "){"].join(""); - return join(ret, dump.parse(fn, "functionCode"), "}"); - }, - array: array, - nodelist: array, - "arguments": array, - object: function object(map, stack) { - var keys, - key, - val, - i, - nonEnumerableProperties, - ret = []; - - if (dump.maxDepth && dump.depth > dump.maxDepth) { - return "[object Object]"; - } - - dump.up(); - keys = []; - - for (key in map) { - keys.push(key); - } // Some properties are not always enumerable on Error objects. - - - nonEnumerableProperties = ["message", "name"]; - - for (i in nonEnumerableProperties) { - key = nonEnumerableProperties[i]; - - if (key in map && !inArray(key, keys)) { - keys.push(key); - } - } - - keys.sort(); - - for (i = 0; i < keys.length; i++) { - key = keys[i]; - val = map[key]; - ret.push(dump.parse(key, "key") + ": " + dump.parse(val, undefined, stack)); - } - - dump.down(); - return join("{", ret, "}"); - }, - node: function node(_node) { - var len, - i, - val, - open = dump.HTML ? "<" : "<", - close = dump.HTML ? ">" : ">", - tag = _node.nodeName.toLowerCase(), - ret = open + tag, - attrs = _node.attributes; - - if (attrs) { - for (i = 0, len = attrs.length; i < len; i++) { - val = attrs[i].nodeValue; // IE6 includes all attributes in .attributes, even ones not explicitly - // set. Those have values like undefined, null, 0, false, "" or - // "inherit". - - if (val && val !== "inherit") { - ret += " " + attrs[i].nodeName + "=" + dump.parse(val, "attribute"); - } - } - } - - ret += close; // Show content of TextNode or CDATASection - - if (_node.nodeType === 3 || _node.nodeType === 4) { - ret += _node.nodeValue; - } - - return ret + open + "/" + tag + close; - }, - // Function calls it internally, it's the arguments part of the function - functionArgs: function functionArgs(fn) { - var args, - l = fn.length; - - if (!l) { - return ""; - } - - args = new Array(l); - - while (l--) { - // 97 is 'a' - args[l] = String.fromCharCode(97 + l); - } - - return " " + args.join(", ") + " "; - }, - // Object calls it internally, the key part of an item in a map - key: quote, - // Function calls it internally, it's the content of the function - functionCode: "[code]", - // Node calls it internally, it's a html attribute value - attribute: quote, - string: quote, - date: quote, - regexp: literal, - number: literal, - "boolean": literal, - symbol: function symbol(sym) { - return sym.toString(); - } - }, - // If true, entities are escaped ( <, >, \t, space and \n ) - HTML: false, - // Indentation unit - indentChar: " ", - // If true, items in a collection, are separated by a \n, else just a space. - multiline: true - }; - return dump; - })(); - - var SuiteReport = /*#__PURE__*/function () { - function SuiteReport(name, parentSuite) { - _classCallCheck(this, SuiteReport); - - this.name = name; - this.fullName = parentSuite ? parentSuite.fullName.concat(name) : []; - this.tests = []; - this.childSuites = []; - - if (parentSuite) { - parentSuite.pushChildSuite(this); - } - } - - _createClass(SuiteReport, [{ - key: "start", - value: function start(recordTime) { - if (recordTime) { - this._startTime = performance.now(); - var suiteLevel = this.fullName.length; - performance.mark("qunit_suite_".concat(suiteLevel, "_start")); - } - - return { - name: this.name, - fullName: this.fullName.slice(), - tests: this.tests.map(function (test) { - return test.start(); - }), - childSuites: this.childSuites.map(function (suite) { - return suite.start(); - }), - testCounts: { - total: this.getTestCounts().total - } - }; - } - }, { - key: "end", - value: function end(recordTime) { - if (recordTime) { - this._endTime = performance.now(); - var suiteLevel = this.fullName.length; - var suiteName = this.fullName.join(" – "); - performance.mark("qunit_suite_".concat(suiteLevel, "_end")); - performance.measure(suiteLevel === 0 ? "QUnit Test Run" : "QUnit Test Suite: ".concat(suiteName), "qunit_suite_".concat(suiteLevel, "_start"), "qunit_suite_".concat(suiteLevel, "_end")); - } - - return { - name: this.name, - fullName: this.fullName.slice(), - tests: this.tests.map(function (test) { - return test.end(); - }), - childSuites: this.childSuites.map(function (suite) { - return suite.end(); - }), - testCounts: this.getTestCounts(), - runtime: this.getRuntime(), - status: this.getStatus() - }; - } - }, { - key: "pushChildSuite", - value: function pushChildSuite(suite) { - this.childSuites.push(suite); - } - }, { - key: "pushTest", - value: function pushTest(test) { - this.tests.push(test); - } - }, { - key: "getRuntime", - value: function getRuntime() { - return this._endTime - this._startTime; - } - }, { - key: "getTestCounts", - value: function getTestCounts() { - var counts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : { - passed: 0, - failed: 0, - skipped: 0, - todo: 0, - total: 0 - }; - counts = this.tests.reduce(function (counts, test) { - if (test.valid) { - counts[test.getStatus()]++; - counts.total++; - } - - return counts; - }, counts); - return this.childSuites.reduce(function (counts, suite) { - return suite.getTestCounts(counts); - }, counts); - } - }, { - key: "getStatus", - value: function getStatus() { - var _this$getTestCounts = this.getTestCounts(), - total = _this$getTestCounts.total, - failed = _this$getTestCounts.failed, - skipped = _this$getTestCounts.skipped, - todo = _this$getTestCounts.todo; - - if (failed) { - return "failed"; - } else { - if (skipped === total) { - return "skipped"; - } else if (todo === total) { - return "todo"; - } else { - return "passed"; - } - } - } - }]); - - return SuiteReport; - }(); - - var focused = false; - var moduleStack = []; - - function isParentModuleInQueue() { - var modulesInQueue = config.modules.map(function (module) { - return module.moduleId; - }); - return moduleStack.some(function (module) { - return modulesInQueue.includes(module.moduleId); - }); - } - - function createModule(name, testEnvironment, modifiers) { - var parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null; - var moduleName = parentModule !== null ? [parentModule.name, name].join(" > ") : name; - var parentSuite = parentModule ? parentModule.suiteReport : globalSuite; - var skip = parentModule !== null && parentModule.skip || modifiers.skip; - var todo = parentModule !== null && parentModule.todo || modifiers.todo; - var module = { - name: moduleName, - parentModule: parentModule, - tests: [], - moduleId: generateHash(moduleName), - testsRun: 0, - unskippedTestsRun: 0, - childModules: [], - suiteReport: new SuiteReport(name, parentSuite), - // Pass along `skip` and `todo` properties from parent module, in case - // there is one, to childs. And use own otherwise. - // This property will be used to mark own tests and tests of child suites - // as either `skipped` or `todo`. - skip: skip, - todo: skip ? false : todo - }; - var env = {}; - - if (parentModule) { - parentModule.childModules.push(module); - extend(env, parentModule.testEnvironment); - } - - extend(env, testEnvironment); - module.testEnvironment = env; - config.modules.push(module); - return module; - } - - function processModule(name, options, executeNow) { - var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; - - if (objectType(options) === "function") { - executeNow = options; - options = undefined; - } - - var module = createModule(name, options, modifiers); // Move any hooks to a 'hooks' object - - var testEnvironment = module.testEnvironment; - var hooks = module.hooks = {}; - setHookFromEnvironment(hooks, testEnvironment, "before"); - setHookFromEnvironment(hooks, testEnvironment, "beforeEach"); - setHookFromEnvironment(hooks, testEnvironment, "afterEach"); - setHookFromEnvironment(hooks, testEnvironment, "after"); - var moduleFns = { - before: setHookFunction(module, "before"), - beforeEach: setHookFunction(module, "beforeEach"), - afterEach: setHookFunction(module, "afterEach"), - after: setHookFunction(module, "after") - }; - var currentModule = config.currentModule; - - if (objectType(executeNow) === "function") { - moduleStack.push(module); - config.currentModule = module; - executeNow.call(module.testEnvironment, moduleFns); - moduleStack.pop(); - module = module.parentModule || currentModule; - } - - config.currentModule = module; - - function setHookFromEnvironment(hooks, environment, name) { - var potentialHook = environment[name]; - hooks[name] = typeof potentialHook === "function" ? [potentialHook] : []; - delete environment[name]; - } - - function setHookFunction(module, hookName) { - return function setHook(callback) { - module.hooks[hookName].push(callback); - }; - } - } - - function module$1(name, options, executeNow) { - if (focused && !isParentModuleInQueue()) { - return; - } - - processModule(name, options, executeNow); - } - - module$1.only = function () { - if (!focused) { - config.modules.length = 0; - config.queue.length = 0; - } - - processModule.apply(void 0, arguments); - focused = true; - }; - - module$1.skip = function (name, options, executeNow) { - if (focused) { - return; - } - - processModule(name, options, executeNow, { - skip: true - }); - }; - - module$1.todo = function (name, options, executeNow) { - if (focused) { - return; - } - - processModule(name, options, executeNow, { - todo: true - }); - }; - - var LISTENERS = Object.create(null); - var SUPPORTED_EVENTS = ["runStart", "suiteStart", "testStart", "assertion", "testEnd", "suiteEnd", "runEnd"]; - /** - * Emits an event with the specified data to all currently registered listeners. - * Callbacks will fire in the order in which they are registered (FIFO). This - * function is not exposed publicly; it is used by QUnit internals to emit - * logging events. - * - * @private - * @method emit - * @param {String} eventName - * @param {Object} data - * @return {Void} - */ - - function emit(eventName, data) { - if (objectType(eventName) !== "string") { - throw new TypeError("eventName must be a string when emitting an event"); - } // Clone the callbacks in case one of them registers a new callback - - - var originalCallbacks = LISTENERS[eventName]; - var callbacks = originalCallbacks ? _toConsumableArray(originalCallbacks) : []; - - for (var i = 0; i < callbacks.length; i++) { - callbacks[i](data); - } - } - /** - * Registers a callback as a listener to the specified event. - * - * @public - * @method on - * @param {String} eventName - * @param {Function} callback - * @return {Void} - */ - - function on(eventName, callback) { - if (objectType(eventName) !== "string") { - throw new TypeError("eventName must be a string when registering a listener"); - } else if (!inArray(eventName, SUPPORTED_EVENTS)) { - var events = SUPPORTED_EVENTS.join(", "); - throw new Error("\"".concat(eventName, "\" is not a valid event; must be one of: ").concat(events, ".")); - } else if (objectType(callback) !== "function") { - throw new TypeError("callback must be a function when registering a listener"); - } - - if (!LISTENERS[eventName]) { - LISTENERS[eventName] = []; - } // Don't register the same callback more than once - - - if (!inArray(callback, LISTENERS[eventName])) { - LISTENERS[eventName].push(callback); - } - } - - var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {}; - - function createCommonjsModule(fn, basedir, module) { - return module = { - path: basedir, - exports: {}, - require: function (path, base) { - return commonjsRequire(path, (base === undefined || base === null) ? module.path : base); - } - }, fn(module, module.exports), module.exports; - } - - function commonjsRequire () { - throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs'); - } - - var es6Promise = createCommonjsModule(function (module, exports) { - /*! - * @overview es6-promise - a tiny implementation of Promises/A+. - * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald) - * @license Licensed under MIT license - * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE - * @version v4.2.8+1e68dce6 - */ - (function (global, factory) { - module.exports = factory() ; - })(commonjsGlobal, function () { - - function objectOrFunction(x) { - var type = typeof x; - return x !== null && (type === 'object' || type === 'function'); - } - - function isFunction(x) { - return typeof x === 'function'; - } - - var _isArray = void 0; - - if (Array.isArray) { - _isArray = Array.isArray; - } else { - _isArray = function (x) { - return Object.prototype.toString.call(x) === '[object Array]'; - }; - } - - var isArray = _isArray; - var len = 0; - var vertxNext = void 0; - var customSchedulerFn = void 0; - - var asap = function asap(callback, arg) { - queue[len] = callback; - queue[len + 1] = arg; - len += 2; - - if (len === 2) { - // If len is 2, that means that we need to schedule an async flush. - // If additional callbacks are queued before the queue is flushed, they - // will be processed by this flush that we are scheduling. - if (customSchedulerFn) { - customSchedulerFn(flush); - } else { - scheduleFlush(); - } - } - }; - - function setScheduler(scheduleFn) { - customSchedulerFn = scheduleFn; - } - - function setAsap(asapFn) { - asap = asapFn; - } - - var browserWindow = typeof window !== 'undefined' ? window : undefined; - var browserGlobal = browserWindow || {}; - var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver; - var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; // test for web worker but not in IE10 - - var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; // node - - function useNextTick() { - // node version 0.10.x displays a deprecation warning when nextTick is used recursively - // see https://github.com/cujojs/when/issues/410 for details - return function () { - return process.nextTick(flush); - }; - } // vertx - - - function useVertxTimer() { - if (typeof vertxNext !== 'undefined') { - return function () { - vertxNext(flush); - }; - } - - return useSetTimeout(); - } - - function useMutationObserver() { - var iterations = 0; - var observer = new BrowserMutationObserver(flush); - var node = document.createTextNode(''); - observer.observe(node, { - characterData: true - }); - return function () { - node.data = iterations = ++iterations % 2; - }; - } // web worker - - - function useMessageChannel() { - var channel = new MessageChannel(); - channel.port1.onmessage = flush; - return function () { - return channel.port2.postMessage(0); - }; - } - - function useSetTimeout() { - // Store setTimeout reference so es6-promise will be unaffected by - // other code modifying setTimeout (like sinon.useFakeTimers()) - var globalSetTimeout = setTimeout; - return function () { - return globalSetTimeout(flush, 1); - }; - } - - var queue = new Array(1000); - - function flush() { - for (var i = 0; i < len; i += 2) { - var callback = queue[i]; - var arg = queue[i + 1]; - callback(arg); - queue[i] = undefined; - queue[i + 1] = undefined; - } - - len = 0; - } - - function attemptVertx() { - try { - var vertx = Function('return this')().require('vertx'); - - vertxNext = vertx.runOnLoop || vertx.runOnContext; - return useVertxTimer(); - } catch (e) { - return useSetTimeout(); - } - } - - var scheduleFlush = void 0; // Decide what async method to use to triggering processing of queued callbacks: - - if (isNode) { - scheduleFlush = useNextTick(); - } else if (BrowserMutationObserver) { - scheduleFlush = useMutationObserver(); - } else if (isWorker) { - scheduleFlush = useMessageChannel(); - } else if (browserWindow === undefined && typeof commonjsRequire === 'function') { - scheduleFlush = attemptVertx(); - } else { - scheduleFlush = useSetTimeout(); - } - - function then(onFulfillment, onRejection) { - var parent = this; - var child = new this.constructor(noop); - - if (child[PROMISE_ID] === undefined) { - makePromise(child); - } - - var _state = parent._state; - - if (_state) { - var callback = arguments[_state - 1]; - asap(function () { - return invokeCallback(_state, child, callback, parent._result); - }); - } else { - subscribe(parent, child, onFulfillment, onRejection); - } - - return child; - } - /** - `Promise.resolve` returns a promise that will become resolved with the - passed `value`. It is shorthand for the following: - - ```javascript - let promise = new Promise(function(resolve, reject){ - resolve(1); - }); - - promise.then(function(value){ - // value === 1 - }); - ``` - - Instead of writing the above, your code now simply becomes the following: - - ```javascript - let promise = Promise.resolve(1); - - promise.then(function(value){ - // value === 1 - }); - ``` - - @method resolve - @static - @param {Any} value value that the returned promise will be resolved with - Useful for tooling. - @return {Promise} a promise that will become fulfilled with the given - `value` - */ - - - function resolve$1(object) { - /*jshint validthis:true */ - var Constructor = this; - - if (object && typeof object === 'object' && object.constructor === Constructor) { - return object; - } - - var promise = new Constructor(noop); - resolve(promise, object); - return promise; - } - - var PROMISE_ID = Math.random().toString(36).substring(2); - - function noop() {} - - var PENDING = void 0; - var FULFILLED = 1; - var REJECTED = 2; - - function selfFulfillment() { - return new TypeError("You cannot resolve a promise with itself"); - } - - function cannotReturnOwn() { - return new TypeError('A promises callback cannot return that same promise.'); - } - - function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) { - try { - then$$1.call(value, fulfillmentHandler, rejectionHandler); - } catch (e) { - return e; - } - } - - function handleForeignThenable(promise, thenable, then$$1) { - asap(function (promise) { - var sealed = false; - var error = tryThen(then$$1, thenable, function (value) { - if (sealed) { - return; - } - - sealed = true; - - if (thenable !== value) { - resolve(promise, value); - } else { - fulfill(promise, value); - } - }, function (reason) { - if (sealed) { - return; - } - - sealed = true; - reject(promise, reason); - }, 'Settle: ' + (promise._label || ' unknown promise')); - - if (!sealed && error) { - sealed = true; - reject(promise, error); - } - }, promise); - } - - function handleOwnThenable(promise, thenable) { - if (thenable._state === FULFILLED) { - fulfill(promise, thenable._result); - } else if (thenable._state === REJECTED) { - reject(promise, thenable._result); - } else { - subscribe(thenable, undefined, function (value) { - return resolve(promise, value); - }, function (reason) { - return reject(promise, reason); - }); - } - } - - function handleMaybeThenable(promise, maybeThenable, then$$1) { - if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) { - handleOwnThenable(promise, maybeThenable); - } else { - if (then$$1 === undefined) { - fulfill(promise, maybeThenable); - } else if (isFunction(then$$1)) { - handleForeignThenable(promise, maybeThenable, then$$1); - } else { - fulfill(promise, maybeThenable); - } - } - } - - function resolve(promise, value) { - if (promise === value) { - reject(promise, selfFulfillment()); - } else if (objectOrFunction(value)) { - var then$$1 = void 0; - - try { - then$$1 = value.then; - } catch (error) { - reject(promise, error); - return; - } - - handleMaybeThenable(promise, value, then$$1); - } else { - fulfill(promise, value); - } - } - - function publishRejection(promise) { - if (promise._onerror) { - promise._onerror(promise._result); - } - - publish(promise); - } - - function fulfill(promise, value) { - if (promise._state !== PENDING) { - return; - } - - promise._result = value; - promise._state = FULFILLED; - - if (promise._subscribers.length !== 0) { - asap(publish, promise); - } - } - - function reject(promise, reason) { - if (promise._state !== PENDING) { - return; - } - - promise._state = REJECTED; - promise._result = reason; - asap(publishRejection, promise); - } - - function subscribe(parent, child, onFulfillment, onRejection) { - var _subscribers = parent._subscribers; - var length = _subscribers.length; - parent._onerror = null; - _subscribers[length] = child; - _subscribers[length + FULFILLED] = onFulfillment; - _subscribers[length + REJECTED] = onRejection; - - if (length === 0 && parent._state) { - asap(publish, parent); - } - } - - function publish(promise) { - var subscribers = promise._subscribers; - var settled = promise._state; - - if (subscribers.length === 0) { - return; - } - - var child = void 0, - callback = void 0, - detail = promise._result; - - for (var i = 0; i < subscribers.length; i += 3) { - child = subscribers[i]; - callback = subscribers[i + settled]; - - if (child) { - invokeCallback(settled, child, callback, detail); - } else { - callback(detail); - } - } - - promise._subscribers.length = 0; - } - - function invokeCallback(settled, promise, callback, detail) { - var hasCallback = isFunction(callback), - value = void 0, - error = void 0, - succeeded = true; - - if (hasCallback) { - try { - value = callback(detail); - } catch (e) { - succeeded = false; - error = e; - } - - if (promise === value) { - reject(promise, cannotReturnOwn()); - return; - } - } else { - value = detail; - } - - if (promise._state !== PENDING) ; else if (hasCallback && succeeded) { - resolve(promise, value); - } else if (succeeded === false) { - reject(promise, error); - } else if (settled === FULFILLED) { - fulfill(promise, value); - } else if (settled === REJECTED) { - reject(promise, value); - } - } - - function initializePromise(promise, resolver) { - try { - resolver(function resolvePromise(value) { - resolve(promise, value); - }, function rejectPromise(reason) { - reject(promise, reason); - }); - } catch (e) { - reject(promise, e); - } - } - - var id = 0; - - function nextId() { - return id++; - } - - function makePromise(promise) { - promise[PROMISE_ID] = id++; - promise._state = undefined; - promise._result = undefined; - promise._subscribers = []; - } - - function validationError() { - return new Error('Array Methods must be provided an Array'); - } - - var Enumerator = function () { - function Enumerator(Constructor, input) { - this._instanceConstructor = Constructor; - this.promise = new Constructor(noop); - - if (!this.promise[PROMISE_ID]) { - makePromise(this.promise); - } - - if (isArray(input)) { - this.length = input.length; - this._remaining = input.length; - this._result = new Array(this.length); - - if (this.length === 0) { - fulfill(this.promise, this._result); - } else { - this.length = this.length || 0; - - this._enumerate(input); - - if (this._remaining === 0) { - fulfill(this.promise, this._result); - } - } - } else { - reject(this.promise, validationError()); - } - } - - Enumerator.prototype._enumerate = function _enumerate(input) { - for (var i = 0; this._state === PENDING && i < input.length; i++) { - this._eachEntry(input[i], i); - } - }; - - Enumerator.prototype._eachEntry = function _eachEntry(entry, i) { - var c = this._instanceConstructor; - var resolve$$1 = c.resolve; - - if (resolve$$1 === resolve$1) { - var _then = void 0; - - var error = void 0; - var didError = false; - - try { - _then = entry.then; - } catch (e) { - didError = true; - error = e; - } - - if (_then === then && entry._state !== PENDING) { - this._settledAt(entry._state, i, entry._result); - } else if (typeof _then !== 'function') { - this._remaining--; - this._result[i] = entry; - } else if (c === Promise$1) { - var promise = new c(noop); - - if (didError) { - reject(promise, error); - } else { - handleMaybeThenable(promise, entry, _then); - } - - this._willSettleAt(promise, i); - } else { - this._willSettleAt(new c(function (resolve$$1) { - return resolve$$1(entry); - }), i); - } - } else { - this._willSettleAt(resolve$$1(entry), i); - } - }; - - Enumerator.prototype._settledAt = function _settledAt(state, i, value) { - var promise = this.promise; - - if (promise._state === PENDING) { - this._remaining--; - - if (state === REJECTED) { - reject(promise, value); - } else { - this._result[i] = value; - } - } - - if (this._remaining === 0) { - fulfill(promise, this._result); - } - }; - - Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) { - var enumerator = this; - subscribe(promise, undefined, function (value) { - return enumerator._settledAt(FULFILLED, i, value); - }, function (reason) { - return enumerator._settledAt(REJECTED, i, reason); - }); - }; - - return Enumerator; - }(); - /** - `Promise.all` accepts an array of promises, and returns a new promise which - is fulfilled with an array of fulfillment values for the passed promises, or - rejected with the reason of the first passed promise to be rejected. It casts all - elements of the passed iterable to promises as it runs this algorithm. - - Example: - - ```javascript - let promise1 = resolve(1); - let promise2 = resolve(2); - let promise3 = resolve(3); - let promises = [ promise1, promise2, promise3 ]; - - Promise.all(promises).then(function(array){ - // The array here would be [ 1, 2, 3 ]; - }); - ``` - - If any of the `promises` given to `all` are rejected, the first promise - that is rejected will be given as an argument to the returned promises's - rejection handler. For example: - - Example: - - ```javascript - let promise1 = resolve(1); - let promise2 = reject(new Error("2")); - let promise3 = reject(new Error("3")); - let promises = [ promise1, promise2, promise3 ]; - - Promise.all(promises).then(function(array){ - // Code here never runs because there are rejected promises! - }, function(error) { - // error.message === "2" - }); - ``` - - @method all - @static - @param {Array} entries array of promises - @param {String} label optional string for labeling the promise. - Useful for tooling. - @return {Promise} promise that is fulfilled when all `promises` have been - fulfilled, or rejected if any of them become rejected. - @static - */ - - - function all(entries) { - return new Enumerator(this, entries).promise; - } - /** - `Promise.race` returns a new promise which is settled in the same way as the - first passed promise to settle. - - Example: - - ```javascript - let promise1 = new Promise(function(resolve, reject){ - setTimeout(function(){ - resolve('promise 1'); - }, 200); - }); - - let promise2 = new Promise(function(resolve, reject){ - setTimeout(function(){ - resolve('promise 2'); - }, 100); - }); - - Promise.race([promise1, promise2]).then(function(result){ - // result === 'promise 2' because it was resolved before promise1 - // was resolved. - }); - ``` - - `Promise.race` is deterministic in that only the state of the first - settled promise matters. For example, even if other promises given to the - `promises` array argument are resolved, but the first settled promise has - become rejected before the other promises became fulfilled, the returned - promise will become rejected: - - ```javascript - let promise1 = new Promise(function(resolve, reject){ - setTimeout(function(){ - resolve('promise 1'); - }, 200); - }); - - let promise2 = new Promise(function(resolve, reject){ - setTimeout(function(){ - reject(new Error('promise 2')); - }, 100); - }); - - Promise.race([promise1, promise2]).then(function(result){ - // Code here never runs - }, function(reason){ - // reason.message === 'promise 2' because promise 2 became rejected before - // promise 1 became fulfilled - }); - ``` - - An example real-world use case is implementing timeouts: - - ```javascript - Promise.race([ajax('foo.json'), timeout(5000)]) - ``` - - @method race - @static - @param {Array} promises array of promises to observe - Useful for tooling. - @return {Promise} a promise which settles in the same way as the first passed - promise to settle. - */ - - - function race(entries) { - /*jshint validthis:true */ - var Constructor = this; - - if (!isArray(entries)) { - return new Constructor(function (_, reject) { - return reject(new TypeError('You must pass an array to race.')); - }); - } else { - return new Constructor(function (resolve, reject) { - var length = entries.length; - - for (var i = 0; i < length; i++) { - Constructor.resolve(entries[i]).then(resolve, reject); - } - }); - } - } - /** - `Promise.reject` returns a promise rejected with the passed `reason`. - It is shorthand for the following: - - ```javascript - let promise = new Promise(function(resolve, reject){ - reject(new Error('WHOOPS')); - }); - - promise.then(function(value){ - // Code here doesn't run because the promise is rejected! - }, function(reason){ - // reason.message === 'WHOOPS' - }); - ``` - - Instead of writing the above, your code now simply becomes the following: - - ```javascript - let promise = Promise.reject(new Error('WHOOPS')); - - promise.then(function(value){ - // Code here doesn't run because the promise is rejected! - }, function(reason){ - // reason.message === 'WHOOPS' - }); - ``` - - @method reject - @static - @param {Any} reason value that the returned promise will be rejected with. - Useful for tooling. - @return {Promise} a promise rejected with the given `reason`. - */ - - - function reject$1(reason) { - /*jshint validthis:true */ - var Constructor = this; - var promise = new Constructor(noop); - reject(promise, reason); - return promise; - } - - function needsResolver() { - throw new TypeError('You must pass a resolver function as the first argument to the promise constructor'); - } - - function needsNew() { - throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function."); - } - /** - Promise objects represent the eventual result of an asynchronous operation. The - primary way of interacting with a promise is through its `then` method, which - registers callbacks to receive either a promise's eventual value or the reason - why the promise cannot be fulfilled. - - Terminology - ----------- - - - `promise` is an object or function with a `then` method whose behavior conforms to this specification. - - `thenable` is an object or function that defines a `then` method. - - `value` is any legal JavaScript value (including undefined, a thenable, or a promise). - - `exception` is a value that is thrown using the throw statement. - - `reason` is a value that indicates why a promise was rejected. - - `settled` the final resting state of a promise, fulfilled or rejected. - - A promise can be in one of three states: pending, fulfilled, or rejected. - - Promises that are fulfilled have a fulfillment value and are in the fulfilled - state. Promises that are rejected have a rejection reason and are in the - rejected state. A fulfillment value is never a thenable. - - Promises can also be said to *resolve* a value. If this value is also a - promise, then the original promise's settled state will match the value's - settled state. So a promise that *resolves* a promise that rejects will - itself reject, and a promise that *resolves* a promise that fulfills will - itself fulfill. - - - Basic Usage: - ------------ - - ```js - let promise = new Promise(function(resolve, reject) { - // on success - resolve(value); - - // on failure - reject(reason); - }); - - promise.then(function(value) { - // on fulfillment - }, function(reason) { - // on rejection - }); - ``` - - Advanced Usage: - --------------- - - Promises shine when abstracting away asynchronous interactions such as - `XMLHttpRequest`s. - - ```js - function getJSON(url) { - return new Promise(function(resolve, reject){ - let xhr = new XMLHttpRequest(); - - xhr.open('GET', url); - xhr.onreadystatechange = handler; - xhr.responseType = 'json'; - xhr.setRequestHeader('Accept', 'application/json'); - xhr.send(); - - function handler() { - if (this.readyState === this.DONE) { - if (this.status === 200) { - resolve(this.response); - } else { - reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']')); - } - } - }; - }); - } - - getJSON('/posts.json').then(function(json) { - // on fulfillment - }, function(reason) { - // on rejection - }); - ``` - - Unlike callbacks, promises are great composable primitives. - - ```js - Promise.all([ - getJSON('/posts'), - getJSON('/comments') - ]).then(function(values){ - values[0] // => postsJSON - values[1] // => commentsJSON - - return values; - }); - ``` - - @class Promise - @param {Function} resolver - Useful for tooling. - @constructor - */ - - - var Promise$1 = function () { - function Promise(resolver) { - this[PROMISE_ID] = nextId(); - this._result = this._state = undefined; - this._subscribers = []; - - if (noop !== resolver) { - typeof resolver !== 'function' && needsResolver(); - this instanceof Promise ? initializePromise(this, resolver) : needsNew(); - } - } - /** - The primary way of interacting with a promise is through its `then` method, - which registers callbacks to receive either a promise's eventual value or the - reason why the promise cannot be fulfilled. - ```js - findUser().then(function(user){ - // user is available - }, function(reason){ - // user is unavailable, and you are given the reason why - }); - ``` - Chaining - -------- - The return value of `then` is itself a promise. This second, 'downstream' - promise is resolved with the return value of the first promise's fulfillment - or rejection handler, or rejected if the handler throws an exception. - ```js - findUser().then(function (user) { - return user.name; - }, function (reason) { - return 'default name'; - }).then(function (userName) { - // If `findUser` fulfilled, `userName` will be the user's name, otherwise it - // will be `'default name'` - }); - findUser().then(function (user) { - throw new Error('Found user, but still unhappy'); - }, function (reason) { - throw new Error('`findUser` rejected and we're unhappy'); - }).then(function (value) { - // never reached - }, function (reason) { - // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'. - // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'. - }); - ``` - If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream. - ```js - findUser().then(function (user) { - throw new PedagogicalException('Upstream error'); - }).then(function (value) { - // never reached - }).then(function (value) { - // never reached - }, function (reason) { - // The `PedgagocialException` is propagated all the way down to here - }); - ``` - Assimilation - ------------ - Sometimes the value you want to propagate to a downstream promise can only be - retrieved asynchronously. This can be achieved by returning a promise in the - fulfillment or rejection handler. The downstream promise will then be pending - until the returned promise is settled. This is called *assimilation*. - ```js - findUser().then(function (user) { - return findCommentsByAuthor(user); - }).then(function (comments) { - // The user's comments are now available - }); - ``` - If the assimliated promise rejects, then the downstream promise will also reject. - ```js - findUser().then(function (user) { - return findCommentsByAuthor(user); - }).then(function (comments) { - // If `findCommentsByAuthor` fulfills, we'll have the value here - }, function (reason) { - // If `findCommentsByAuthor` rejects, we'll have the reason here - }); - ``` - Simple Example - -------------- - Synchronous Example - ```javascript - let result; - try { - result = findResult(); - // success - } catch(reason) { - // failure - } - ``` - Errback Example - ```js - findResult(function(result, err){ - if (err) { - // failure - } else { - // success - } - }); - ``` - Promise Example; - ```javascript - findResult().then(function(result){ - // success - }, function(reason){ - // failure - }); - ``` - Advanced Example - -------------- - Synchronous Example - ```javascript - let author, books; - try { - author = findAuthor(); - books = findBooksByAuthor(author); - // success - } catch(reason) { - // failure - } - ``` - Errback Example - ```js - function foundBooks(books) { - } - function failure(reason) { - } - findAuthor(function(author, err){ - if (err) { - failure(err); - // failure - } else { - try { - findBoooksByAuthor(author, function(books, err) { - if (err) { - failure(err); - } else { - try { - foundBooks(books); - } catch(reason) { - failure(reason); - } - } - }); - } catch(error) { - failure(err); - } - // success - } - }); - ``` - Promise Example; - ```javascript - findAuthor(). - then(findBooksByAuthor). - then(function(books){ - // found books - }).catch(function(reason){ - // something went wrong - }); - ``` - @method then - @param {Function} onFulfilled - @param {Function} onRejected - Useful for tooling. - @return {Promise} - */ - - /** - `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same - as the catch block of a try/catch statement. - ```js - function findAuthor(){ - throw new Error('couldn't find that author'); - } - // synchronous - try { - findAuthor(); - } catch(reason) { - // something went wrong - } - // async with promises - findAuthor().catch(function(reason){ - // something went wrong - }); - ``` - @method catch - @param {Function} onRejection - Useful for tooling. - @return {Promise} - */ - - - Promise.prototype.catch = function _catch(onRejection) { - return this.then(null, onRejection); - }; - /** - `finally` will be invoked regardless of the promise's fate just as native - try/catch/finally behaves - - Synchronous example: - - ```js - findAuthor() { - if (Math.random() > 0.5) { - throw new Error(); - } - return new Author(); - } - - try { - return findAuthor(); // succeed or fail - } catch(error) { - return findOtherAuther(); - } finally { - // always runs - // doesn't affect the return value - } - ``` - - Asynchronous example: - - ```js - findAuthor().catch(function(reason){ - return findOtherAuther(); - }).finally(function(){ - // author was either found, or not - }); - ``` - - @method finally - @param {Function} callback - @return {Promise} - */ - - - Promise.prototype.finally = function _finally(callback) { - var promise = this; - var constructor = promise.constructor; - - if (isFunction(callback)) { - return promise.then(function (value) { - return constructor.resolve(callback()).then(function () { - return value; - }); - }, function (reason) { - return constructor.resolve(callback()).then(function () { - throw reason; - }); - }); - } - - return promise.then(callback, callback); - }; - - return Promise; - }(); - - Promise$1.prototype.then = then; - Promise$1.all = all; - Promise$1.race = race; - Promise$1.resolve = resolve$1; - Promise$1.reject = reject$1; - Promise$1._setScheduler = setScheduler; - Promise$1._setAsap = setAsap; - Promise$1._asap = asap; - /*global self*/ - - function polyfill() { - var local = void 0; - - if (typeof commonjsGlobal !== 'undefined') { - local = commonjsGlobal; - } else if (typeof self !== 'undefined') { - local = self; - } else { - try { - local = Function('return this')(); - } catch (e) { - throw new Error('polyfill failed because global object is unavailable in this environment'); - } - } - - var P = local.Promise; - - if (P) { - var promiseToString = null; - - try { - promiseToString = Object.prototype.toString.call(P.resolve()); - } catch (e) {// silently ignored - } - - if (promiseToString === '[object Promise]' && !P.cast) { - return; - } - } - - local.Promise = Promise$1; - } // Strange compat.. - - - Promise$1.polyfill = polyfill; - Promise$1.Promise = Promise$1; - return Promise$1; - }); - }); - - var Promise$1 = typeof Promise !== "undefined" ? Promise : es6Promise; - - function registerLoggingCallbacks(obj) { - var i, - l, - key, - callbackNames = ["begin", "done", "log", "testStart", "testDone", "moduleStart", "moduleDone"]; - - function registerLoggingCallback(key) { - var loggingCallback = function loggingCallback(callback) { - if (objectType(callback) !== "function") { - throw new Error("QUnit logging methods require a callback function as their first parameters."); - } - - config.callbacks[key].push(callback); - }; - - return loggingCallback; - } - - for (i = 0, l = callbackNames.length; i < l; i++) { - key = callbackNames[i]; // Initialize key collection of logging callback - - if (objectType(config.callbacks[key]) === "undefined") { - config.callbacks[key] = []; - } - - obj[key] = registerLoggingCallback(key); - } - } - function runLoggingCallbacks(key, args) { - var callbacks = config.callbacks[key]; // Handling 'log' callbacks separately. Unlike the other callbacks, - // the log callback is not controlled by the processing queue, - // but rather used by asserts. Hence to promisfy the 'log' callback - // would mean promisfying each step of a test - - if (key === "log") { - callbacks.map(function (callback) { - return callback(args); - }); - return; - } // ensure that each callback is executed serially - - - return callbacks.reduce(function (promiseChain, callback) { - return promiseChain.then(function () { - return Promise$1.resolve(callback(args)); - }); - }, Promise$1.resolve([])); - } - - // Doesn't support IE9, it will return undefined on these browsers - // See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack - var fileName = (sourceFromStacktrace(0) || "").replace(/(:\d+)+\)?/, "").replace(/.+\//, ""); - function extractStacktrace(e, offset) { - offset = offset === undefined ? 4 : offset; - var stack, include, i; - - if (e && e.stack) { - stack = e.stack.split("\n"); - - if (/^error$/i.test(stack[0])) { - stack.shift(); - } - - if (fileName) { - include = []; - - for (i = offset; i < stack.length; i++) { - if (stack[i].indexOf(fileName) !== -1) { - break; - } - - include.push(stack[i]); - } - - if (include.length) { - return include.join("\n"); - } - } - - return stack[offset]; - } - } - function sourceFromStacktrace(offset) { - var error = new Error(); // Support: Safari <=7 only, IE <=10 - 11 only - // Not all browsers generate the `stack` property for `new Error()`, see also #636 - - if (!error.stack) { - try { - throw error; - } catch (err) { - error = err; - } - } - - return extractStacktrace(error, offset); - } - - var priorityCount = 0; - var unitSampler; // This is a queue of functions that are tasks within a single test. - // After tests are dequeued from config.queue they are expanded into - // a set of tasks in this queue. - - var taskQueue = []; - /** - * Advances the taskQueue to the next task. If the taskQueue is empty, - * process the testQueue - */ - - function advance() { - advanceTaskQueue(); - - if (!taskQueue.length && !config.blocking && !config.current) { - advanceTestQueue(); - } - } - /** - * Advances the taskQueue with an increased depth - */ - - - function advanceTaskQueue() { - var start = now(); - config.depth = (config.depth || 0) + 1; - processTaskQueue(start); - config.depth--; - } - /** - * Process the first task on the taskQueue as a promise. - * Each task is a function returned by https://github.com/qunitjs/qunit/blob/master/src/test.js#L381 - */ - - - function processTaskQueue(start) { - if (taskQueue.length && !config.blocking) { - var elapsedTime = now() - start; - - if (!setTimeout$1 || config.updateRate <= 0 || elapsedTime < config.updateRate) { - var task = taskQueue.shift(); - Promise$1.resolve(task()).then(function () { - if (!taskQueue.length) { - advance(); - } else { - processTaskQueue(start); - } - }); - } else { - setTimeout$1(advance); - } - } - } - /** - * Advance the testQueue to the next test to process. Call done() if testQueue completes. - */ - - - function advanceTestQueue() { - if (!config.blocking && !config.queue.length && config.depth === 0) { - done(); - return; - } - - var testTasks = config.queue.shift(); - addToTaskQueue(testTasks()); - - if (priorityCount > 0) { - priorityCount--; - } - - advance(); - } - /** - * Enqueue the tasks for a test into the task queue. - * @param {Array} tasksArray - */ - - - function addToTaskQueue(tasksArray) { - taskQueue.push.apply(taskQueue, _toConsumableArray(tasksArray)); - } - /** - * Return the number of tasks remaining in the task queue to be processed. - * @return {Number} - */ - - - function taskQueueLength() { - return taskQueue.length; - } - /** - * Adds a test to the TestQueue for execution. - * @param {Function} testTasksFunc - * @param {Boolean} prioritize - * @param {String} seed - */ - - - function addToTestQueue(testTasksFunc, prioritize, seed) { - if (prioritize) { - config.queue.splice(priorityCount++, 0, testTasksFunc); - } else if (seed) { - if (!unitSampler) { - unitSampler = unitSamplerGenerator(seed); - } // Insert into a random position after all prioritized items - - - var index = Math.floor(unitSampler() * (config.queue.length - priorityCount + 1)); - config.queue.splice(priorityCount + index, 0, testTasksFunc); - } else { - config.queue.push(testTasksFunc); - } - } - /** - * Creates a seeded "sample" generator which is used for randomizing tests. - */ - - - function unitSamplerGenerator(seed) { - // 32-bit xorshift, requires only a nonzero seed - // https://excamera.com/sphinx/article-xorshift.html - var sample = parseInt(generateHash(seed), 16) || -1; - return function () { - sample ^= sample << 13; - sample ^= sample >>> 17; - sample ^= sample << 5; // ECMAScript has no unsigned number type - - if (sample < 0) { - sample += 0x100000000; - } - - return sample / 0x100000000; - }; - } - /** - * This function is called when the ProcessingQueue is done processing all - * items. It handles emitting the final run events. - */ - - - function done() { - var storage = config.storage; - ProcessingQueue.finished = true; - var runtime = now() - config.started; - var passed = config.stats.all - config.stats.bad; - - if (config.stats.testCount === 0) { - if (config.filter && config.filter.length) { - throw new Error("No tests matched the filter \"".concat(config.filter, "\".")); - } - - if (config.module && config.module.length) { - throw new Error("No tests matched the module \"".concat(config.module, "\".")); - } - - if (config.moduleId && config.moduleId.length) { - throw new Error("No tests matched the moduleId \"".concat(config.moduleId, "\".")); - } - - if (config.testId && config.testId.length) { - throw new Error("No tests matched the testId \"".concat(config.testId, "\".")); - } - - throw new Error("No tests were run."); - } - - emit("runEnd", globalSuite.end(true)); - runLoggingCallbacks("done", { - passed: passed, - failed: config.stats.bad, - total: config.stats.all, - runtime: runtime - }).then(function () { - // Clear own storage items if all tests passed - if (storage && config.stats.bad === 0) { - for (var i = storage.length - 1; i >= 0; i--) { - var key = storage.key(i); - - if (key.indexOf("qunit-test-") === 0) { - storage.removeItem(key); - } - } - } - }); - } - - var ProcessingQueue = { - finished: false, - add: addToTestQueue, - advance: advance, - taskCount: taskQueueLength - }; - - var TestReport = /*#__PURE__*/function () { - function TestReport(name, suite, options) { - _classCallCheck(this, TestReport); - - this.name = name; - this.suiteName = suite.name; - this.fullName = suite.fullName.concat(name); - this.runtime = 0; - this.assertions = []; - this.skipped = !!options.skip; - this.todo = !!options.todo; - this.valid = options.valid; - this._startTime = 0; - this._endTime = 0; - suite.pushTest(this); - } - - _createClass(TestReport, [{ - key: "start", - value: function start(recordTime) { - if (recordTime) { - this._startTime = performance.now(); - performance.mark("qunit_test_start"); - } - - return { - name: this.name, - suiteName: this.suiteName, - fullName: this.fullName.slice() - }; - } - }, { - key: "end", - value: function end(recordTime) { - if (recordTime) { - this._endTime = performance.now(); - - if (performance) { - performance.mark("qunit_test_end"); - var testName = this.fullName.join(" – "); - performance.measure("QUnit Test: ".concat(testName), "qunit_test_start", "qunit_test_end"); - } - } - - return extend(this.start(), { - runtime: this.getRuntime(), - status: this.getStatus(), - errors: this.getFailedAssertions(), - assertions: this.getAssertions() - }); - } - }, { - key: "pushAssertion", - value: function pushAssertion(assertion) { - this.assertions.push(assertion); - } - }, { - key: "getRuntime", - value: function getRuntime() { - return this._endTime - this._startTime; - } - }, { - key: "getStatus", - value: function getStatus() { - if (this.skipped) { - return "skipped"; - } - - var testPassed = this.getFailedAssertions().length > 0 ? this.todo : !this.todo; - - if (!testPassed) { - return "failed"; - } else if (this.todo) { - return "todo"; - } else { - return "passed"; - } - } - }, { - key: "getFailedAssertions", - value: function getFailedAssertions() { - return this.assertions.filter(function (assertion) { - return !assertion.passed; - }); - } - }, { - key: "getAssertions", - value: function getAssertions() { - return this.assertions.slice(); - } // Remove actual and expected values from assertions. This is to prevent - // leaking memory throughout a test suite. - - }, { - key: "slimAssertions", - value: function slimAssertions() { - this.assertions = this.assertions.map(function (assertion) { - delete assertion.actual; - delete assertion.expected; - return assertion; - }); - } - }]); - - return TestReport; - }(); - - var focused$1 = false; - function Test(settings) { - var i, l; - ++Test.count; - this.expected = null; - this.assertions = []; - this.semaphore = 0; - this.module = config.currentModule; - this.steps = []; - this.timeout = undefined; - this.errorForStack = new Error(); // If a module is skipped, all its tests and the tests of the child suites - // should be treated as skipped even if they are defined as `only` or `todo`. - // As for `todo` module, all its tests will be treated as `todo` except for - // tests defined as `skip` which will be left intact. - // - // So, if a test is defined as `todo` and is inside a skipped module, we should - // then treat that test as if was defined as `skip`. - - if (this.module.skip) { - settings.skip = true; - settings.todo = false; // Skipped tests should be left intact - } else if (this.module.todo && !settings.skip) { - settings.todo = true; - } - - extend(this, settings); - this.testReport = new TestReport(settings.testName, this.module.suiteReport, { - todo: settings.todo, - skip: settings.skip, - valid: this.valid() - }); // Register unique strings - - for (i = 0, l = this.module.tests; i < l.length; i++) { - if (this.module.tests[i].name === this.testName) { - this.testName += " "; - } - } - - this.testId = generateHash(this.module.name, this.testName); - this.module.tests.push({ - name: this.testName, - testId: this.testId, - skip: !!settings.skip - }); - - if (settings.skip) { - // Skipped tests will fully ignore any sent callback - this.callback = function () {}; - - this.async = false; - this.expected = 0; - } else { - if (typeof this.callback !== "function") { - var method = this.todo ? "todo" : "test"; // eslint-disable-next-line max-len - - throw new TypeError("You must provide a function as a test callback to QUnit.".concat(method, "(\"").concat(settings.testName, "\")")); - } - - this.assert = new Assert(this); - } - } - Test.count = 0; - - function getNotStartedModules(startModule) { - var module = startModule, - modules = []; - - while (module && module.testsRun === 0) { - modules.push(module); - module = module.parentModule; - } // The above push modules from the child to the parent - // return a reversed order with the top being the top most parent module - - - return modules.reverse(); - } - - Test.prototype = { - // generating a stack trace can be expensive, so using a getter defers this until we need it - get stack() { - return extractStacktrace(this.errorForStack, 2); - }, - - before: function before() { - var _this = this; - - var module = this.module, - notStartedModules = getNotStartedModules(module); // ensure the callbacks are executed serially for each module - - var callbackPromises = notStartedModules.reduce(function (promiseChain, startModule) { - return promiseChain.then(function () { - startModule.stats = { - all: 0, - bad: 0, - started: now() - }; - emit("suiteStart", startModule.suiteReport.start(true)); - return runLoggingCallbacks("moduleStart", { - name: startModule.name, - tests: startModule.tests - }); - }); - }, Promise$1.resolve([])); - return callbackPromises.then(function () { - config.current = _this; - _this.testEnvironment = extend({}, module.testEnvironment); - _this.started = now(); - emit("testStart", _this.testReport.start(true)); - return runLoggingCallbacks("testStart", { - name: _this.testName, - module: module.name, - testId: _this.testId, - previousFailure: _this.previousFailure - }).then(function () { - if (!config.pollution) { - saveGlobal(); - } - }); - }); - }, - run: function run() { - var promise; - config.current = this; - this.callbackStarted = now(); - - if (config.notrycatch) { - runTest(this); - return; - } - - try { - runTest(this); - } catch (e) { - this.pushFailure("Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + (e.message || e), extractStacktrace(e, 0)); // Else next test will carry the responsibility - - saveGlobal(); // Restart the tests if they're blocking - - if (config.blocking) { - internalRecover(this); - } - } - - function runTest(test) { - promise = test.callback.call(test.testEnvironment, test.assert); - test.resolvePromise(promise); // If the test has a "lock" on it, but the timeout is 0, then we push a - // failure as the test should be synchronous. - - if (test.timeout === 0 && test.semaphore !== 0) { - pushFailure("Test did not finish synchronously even though assert.timeout( 0 ) was used.", sourceFromStacktrace(2)); - } - } - }, - after: function after() { - checkPollution(); - }, - queueHook: function queueHook(hook, hookName, hookOwner) { - var _this2 = this; - - var callHook = function callHook() { - var promise = hook.call(_this2.testEnvironment, _this2.assert); - - _this2.resolvePromise(promise, hookName); - }; - - var runHook = function runHook() { - if (hookName === "before") { - if (hookOwner.unskippedTestsRun !== 0) { - return; - } - - _this2.preserveEnvironment = true; - } // The 'after' hook should only execute when there are not tests left and - // when the 'after' and 'finish' tasks are the only tasks left to process - - - if (hookName === "after" && hookOwner.unskippedTestsRun !== numberOfUnskippedTests(hookOwner) - 1 && (config.queue.length > 0 || ProcessingQueue.taskCount() > 2)) { - return; - } - - config.current = _this2; - - if (config.notrycatch) { - callHook(); - return; - } - - try { - callHook(); - } catch (error) { - _this2.pushFailure(hookName + " failed on " + _this2.testName + ": " + (error.message || error), extractStacktrace(error, 0)); - } - }; - - return runHook; - }, - // Currently only used for module level hooks, can be used to add global level ones - hooks: function hooks(handler) { - var hooks = []; - - function processHooks(test, module) { - if (module.parentModule) { - processHooks(test, module.parentModule); - } - - if (module.hooks[handler].length) { - for (var i = 0; i < module.hooks[handler].length; i++) { - hooks.push(test.queueHook(module.hooks[handler][i], handler, module)); - } - } - } // Hooks are ignored on skipped tests - - - if (!this.skip) { - processHooks(this, this.module); - } - - return hooks; - }, - finish: function finish() { - config.current = this; // Release the test callback to ensure that anything referenced has been - // released to be garbage collected. - - this.callback = undefined; - - if (this.steps.length) { - var stepsList = this.steps.join(", "); - this.pushFailure("Expected assert.verifySteps() to be called before end of test " + "after using assert.step(). Unverified steps: ".concat(stepsList), this.stack); - } - - if (config.requireExpects && this.expected === null) { - this.pushFailure("Expected number of assertions to be defined, but expect() was " + "not called.", this.stack); - } else if (this.expected !== null && this.expected !== this.assertions.length) { - this.pushFailure("Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack); - } else if (this.expected === null && !this.assertions.length) { - this.pushFailure("Expected at least one assertion, but none were run - call " + "expect(0) to accept zero assertions.", this.stack); - } - - var i, - module = this.module, - moduleName = module.name, - testName = this.testName, - skipped = !!this.skip, - todo = !!this.todo, - bad = 0, - storage = config.storage; - this.runtime = now() - this.started; - config.stats.all += this.assertions.length; - config.stats.testCount += 1; - module.stats.all += this.assertions.length; - - for (i = 0; i < this.assertions.length; i++) { - if (!this.assertions[i].result) { - bad++; - config.stats.bad++; - module.stats.bad++; - } - } - - notifyTestsRan(module, skipped); // Store result when possible - - if (storage) { - if (bad) { - storage.setItem("qunit-test-" + moduleName + "-" + testName, bad); - } else { - storage.removeItem("qunit-test-" + moduleName + "-" + testName); - } - } // After emitting the js-reporters event we cleanup the assertion data to - // avoid leaking it. It is not used by the legacy testDone callbacks. - - - emit("testEnd", this.testReport.end(true)); - this.testReport.slimAssertions(); - var test = this; - return runLoggingCallbacks("testDone", { - name: testName, - module: moduleName, - skipped: skipped, - todo: todo, - failed: bad, - passed: this.assertions.length - bad, - total: this.assertions.length, - runtime: skipped ? 0 : this.runtime, - // HTML Reporter use - assertions: this.assertions, - testId: this.testId, - - // Source of Test - // generating stack trace is expensive, so using a getter will help defer this until we need it - get source() { - return test.stack; - } - - }).then(function () { - if (module.testsRun === numberOfTests(module)) { - var completedModules = [module]; // Check if the parent modules, iteratively, are done. If that the case, - // we emit the `suiteEnd` event and trigger `moduleDone` callback. - - var parent = module.parentModule; - - while (parent && parent.testsRun === numberOfTests(parent)) { - completedModules.push(parent); - parent = parent.parentModule; - } - - return completedModules.reduce(function (promiseChain, completedModule) { - return promiseChain.then(function () { - return logSuiteEnd(completedModule); - }); - }, Promise$1.resolve([])); - } - }).then(function () { - config.current = undefined; - }); - - function logSuiteEnd(module) { - // Reset `module.hooks` to ensure that anything referenced in these hooks - // has been released to be garbage collected. - module.hooks = {}; - emit("suiteEnd", module.suiteReport.end(true)); - return runLoggingCallbacks("moduleDone", { - name: module.name, - tests: module.tests, - failed: module.stats.bad, - passed: module.stats.all - module.stats.bad, - total: module.stats.all, - runtime: now() - module.stats.started - }); - } - }, - preserveTestEnvironment: function preserveTestEnvironment() { - if (this.preserveEnvironment) { - this.module.testEnvironment = this.testEnvironment; - this.testEnvironment = extend({}, this.module.testEnvironment); - } - }, - queue: function queue() { - var test = this; - - if (!this.valid()) { - return; - } - - function runTest() { - return [function () { - return test.before(); - }].concat(_toConsumableArray(test.hooks("before")), [function () { - test.preserveTestEnvironment(); - }], _toConsumableArray(test.hooks("beforeEach")), [function () { - test.run(); - }], _toConsumableArray(test.hooks("afterEach").reverse()), _toConsumableArray(test.hooks("after").reverse()), [function () { - test.after(); - }, function () { - return test.finish(); - }]); - } - - var previousFailCount = config.storage && +config.storage.getItem("qunit-test-" + this.module.name + "-" + this.testName); // Prioritize previously failed tests, detected from storage - - var prioritize = config.reorder && !!previousFailCount; - this.previousFailure = !!previousFailCount; - ProcessingQueue.add(runTest, prioritize, config.seed); // If the queue has already finished, we manually process the new test - - if (ProcessingQueue.finished) { - ProcessingQueue.advance(); - } - }, - pushResult: function pushResult(resultInfo) { - if (this !== config.current) { - throw new Error("Assertion occurred after test had finished."); - } // Destructure of resultInfo = { result, actual, expected, message, negative } - - - var source, - details = { - module: this.module.name, - name: this.testName, - result: resultInfo.result, - message: resultInfo.message, - actual: resultInfo.actual, - testId: this.testId, - negative: resultInfo.negative || false, - runtime: now() - this.started, - todo: !!this.todo - }; - - if (hasOwn.call(resultInfo, "expected")) { - details.expected = resultInfo.expected; - } - - if (!resultInfo.result) { - source = resultInfo.source || sourceFromStacktrace(); - - if (source) { - details.source = source; - } - } - - this.logAssertion(details); - this.assertions.push({ - result: !!resultInfo.result, - message: resultInfo.message - }); - }, - pushFailure: function pushFailure(message, source, actual) { - if (!(this instanceof Test)) { - throw new Error("pushFailure() assertion outside test context, was " + sourceFromStacktrace(2)); - } - - this.pushResult({ - result: false, - message: message || "error", - actual: actual || null, - source: source - }); - }, - - /** - * Log assertion details using both the old QUnit.log interface and - * QUnit.on( "assertion" ) interface. - * - * @private - */ - logAssertion: function logAssertion(details) { - runLoggingCallbacks("log", details); - var assertion = { - passed: details.result, - actual: details.actual, - expected: details.expected, - message: details.message, - stack: details.source, - todo: details.todo - }; - this.testReport.pushAssertion(assertion); - emit("assertion", assertion); - }, - resolvePromise: function resolvePromise(promise, phase) { - var then, - resume, - message, - test = this; - - if (promise != null) { - then = promise.then; - - if (objectType(then) === "function") { - resume = internalStop(test); - - if (config.notrycatch) { - then.call(promise, function () { - resume(); - }); - } else { - then.call(promise, function () { - resume(); - }, function (error) { - message = "Promise rejected " + (!phase ? "during" : phase.replace(/Each$/, "")) + " \"" + test.testName + "\": " + (error && error.message || error); - test.pushFailure(message, extractStacktrace(error, 0)); // Else next test will carry the responsibility - - saveGlobal(); // Unblock - - internalRecover(test); - }); - } - } - } - }, - valid: function valid() { - var filter = config.filter, - regexFilter = /^(!?)\/([\w\W]*)\/(i?$)/.exec(filter), - module = config.module && config.module.toLowerCase(), - fullName = this.module.name + ": " + this.testName; - - function moduleChainNameMatch(testModule) { - var testModuleName = testModule.name ? testModule.name.toLowerCase() : null; - - if (testModuleName === module) { - return true; - } else if (testModule.parentModule) { - return moduleChainNameMatch(testModule.parentModule); - } else { - return false; - } - } - - function moduleChainIdMatch(testModule) { - return inArray(testModule.moduleId, config.moduleId) || testModule.parentModule && moduleChainIdMatch(testModule.parentModule); - } // Internally-generated tests are always valid - - - if (this.callback && this.callback.validTest) { - return true; - } - - if (config.moduleId && config.moduleId.length > 0 && !moduleChainIdMatch(this.module)) { - return false; - } - - if (config.testId && config.testId.length > 0 && !inArray(this.testId, config.testId)) { - return false; - } - - if (module && !moduleChainNameMatch(this.module)) { - return false; - } - - if (!filter) { - return true; - } - - return regexFilter ? this.regexFilter(!!regexFilter[1], regexFilter[2], regexFilter[3], fullName) : this.stringFilter(filter, fullName); - }, - regexFilter: function regexFilter(exclude, pattern, flags, fullName) { - var regex = new RegExp(pattern, flags); - var match = regex.test(fullName); - return match !== exclude; - }, - stringFilter: function stringFilter(filter, fullName) { - filter = filter.toLowerCase(); - fullName = fullName.toLowerCase(); - var include = filter.charAt(0) !== "!"; - - if (!include) { - filter = filter.slice(1); - } // If the filter matches, we need to honour include - - - if (fullName.indexOf(filter) !== -1) { - return include; - } // Otherwise, do the opposite - - - return !include; - } - }; - function pushFailure() { - if (!config.current) { - throw new Error("pushFailure() assertion outside test context, in " + sourceFromStacktrace(2)); - } // Gets current test obj - - - var currentTest = config.current; - return currentTest.pushFailure.apply(currentTest, arguments); - } - - function saveGlobal() { - config.pollution = []; - - if (config.noglobals) { - for (var key in global__default['default']) { - if (hasOwn.call(global__default['default'], key)) { - // In Opera sometimes DOM element ids show up here, ignore them - if (/^qunit-test-output/.test(key)) { - continue; - } - - config.pollution.push(key); - } - } - } - } - - function checkPollution() { - var newGlobals, - deletedGlobals, - old = config.pollution; - saveGlobal(); - newGlobals = diff(config.pollution, old); - - if (newGlobals.length > 0) { - pushFailure("Introduced global variable(s): " + newGlobals.join(", ")); - } - - deletedGlobals = diff(old, config.pollution); - - if (deletedGlobals.length > 0) { - pushFailure("Deleted global variable(s): " + deletedGlobals.join(", ")); - } - } // Will be exposed as QUnit.test - - - function test(testName, callback) { - if (focused$1) { - return; - } - - var newTest = new Test({ - testName: testName, - callback: callback - }); - newTest.queue(); - } - extend(test, { - todo: function todo(testName, callback) { - if (focused$1) { - return; - } - - var newTest = new Test({ - testName: testName, - callback: callback, - todo: true - }); - newTest.queue(); - }, - skip: function skip(testName) { - if (focused$1) { - return; - } - - var test = new Test({ - testName: testName, - skip: true - }); - test.queue(); - }, - only: function only(testName, callback) { - if (!focused$1) { - config.queue.length = 0; - focused$1 = true; - } - - var newTest = new Test({ - testName: testName, - callback: callback - }); - newTest.queue(); - } - }); // Resets config.timeout with a new timeout duration. - - function resetTestTimeout(timeoutDuration) { - clearTimeout(config.timeout); - config.timeout = setTimeout$1(config.timeoutHandler(timeoutDuration), timeoutDuration); - } // Put a hold on processing and return a function that will release it. - - function internalStop(test) { - var released = false; - test.semaphore += 1; - config.blocking = true; // Set a recovery timeout, if so configured. - - if (setTimeout$1) { - var timeoutDuration; - - if (typeof test.timeout === "number") { - timeoutDuration = test.timeout; - } else if (typeof config.testTimeout === "number") { - timeoutDuration = config.testTimeout; - } - - if (typeof timeoutDuration === "number" && timeoutDuration > 0) { - clearTimeout(config.timeout); - - config.timeoutHandler = function (timeout) { - return function () { - pushFailure("Test took longer than ".concat(timeout, "ms; test timed out."), sourceFromStacktrace(2)); - released = true; - internalRecover(test); - }; - }; - - config.timeout = setTimeout$1(config.timeoutHandler(timeoutDuration), timeoutDuration); - } - } - - return function resume() { - if (released) { - return; - } - - released = true; - test.semaphore -= 1; - internalStart(test); - }; - } // Forcefully release all processing holds. - - function internalRecover(test) { - test.semaphore = 0; - internalStart(test); - } // Release a processing hold, scheduling a resumption attempt if no holds remain. - - - function internalStart(test) { - // If semaphore is non-numeric, throw error - if (isNaN(test.semaphore)) { - test.semaphore = 0; - pushFailure("Invalid value on test.semaphore", sourceFromStacktrace(2)); - return; - } // Don't start until equal number of stop-calls - - - if (test.semaphore > 0) { - return; - } // Throw an Error if start is called more often than stop - - - if (test.semaphore < 0) { - test.semaphore = 0; - pushFailure("Tried to restart test while already started (test's semaphore was 0 already)", sourceFromStacktrace(2)); - return; - } // Add a slight delay to allow more assertions etc. - - - if (setTimeout$1) { - if (config.timeout) { - clearTimeout(config.timeout); - } - - config.timeout = setTimeout$1(function () { - if (test.semaphore > 0) { - return; - } - - if (config.timeout) { - clearTimeout(config.timeout); - } - - begin(); - }); - } else { - begin(); - } - } - - function collectTests(module) { - var tests = [].concat(module.tests); - - var modules = _toConsumableArray(module.childModules); // Do a breadth-first traversal of the child modules - - - while (modules.length) { - var nextModule = modules.shift(); - tests.push.apply(tests, nextModule.tests); - modules.push.apply(modules, _toConsumableArray(nextModule.childModules)); - } - - return tests; - } - - function numberOfTests(module) { - return collectTests(module).length; - } - - function numberOfUnskippedTests(module) { - return collectTests(module).filter(function (test) { - return !test.skip; - }).length; - } - - function notifyTestsRan(module, skipped) { - module.testsRun++; - - if (!skipped) { - module.unskippedTestsRun++; - } - - while (module = module.parentModule) { - module.testsRun++; - - if (!skipped) { - module.unskippedTestsRun++; - } - } - } - - var Assert = /*#__PURE__*/function () { - function Assert(testContext) { - _classCallCheck(this, Assert); - - this.test = testContext; - } // Assert helpers - - - _createClass(Assert, [{ - key: "timeout", - value: function timeout(duration) { - if (typeof duration !== "number") { - throw new Error("You must pass a number as the duration to assert.timeout"); - } - - this.test.timeout = duration; // If a timeout has been set, clear it and reset with the new duration - - if (config.timeout) { - clearTimeout(config.timeout); - - if (config.timeoutHandler && this.test.timeout > 0) { - resetTestTimeout(this.test.timeout); - } - } - } // Documents a "step", which is a string value, in a test as a passing assertion - - }, { - key: "step", - value: function step(message) { - var assertionMessage = message; - var result = !!message; - this.test.steps.push(message); - - if (objectType(message) === "undefined" || message === "") { - assertionMessage = "You must provide a message to assert.step"; - } else if (objectType(message) !== "string") { - assertionMessage = "You must provide a string value to assert.step"; - result = false; - } - - this.pushResult({ - result: result, - message: assertionMessage - }); - } // Verifies the steps in a test match a given array of string values - - }, { - key: "verifySteps", - value: function verifySteps(steps, message) { - // Since the steps array is just string values, we can clone with slice - var actualStepsClone = this.test.steps.slice(); - this.deepEqual(actualStepsClone, steps, message); - this.test.steps.length = 0; - } // Specify the number of expected assertions to guarantee that failed test - // (no assertions are run at all) don't slip through. - - }, { - key: "expect", - value: function expect(asserts) { - if (arguments.length === 1) { - this.test.expected = asserts; - } else { - return this.test.expected; - } - } // Put a hold on processing and return a function that will release it a maximum of once. - - }, { - key: "async", - value: function async(count) { - var test = this.test; - var popped = false, - acceptCallCount = count; - - if (typeof acceptCallCount === "undefined") { - acceptCallCount = 1; - } - - var resume = internalStop(test); - return function done() { - if (config.current !== test) { - throw Error("assert.async callback called after test finished."); - } - - if (popped) { - test.pushFailure("Too many calls to the `assert.async` callback", sourceFromStacktrace(2)); - return; - } - - acceptCallCount -= 1; - - if (acceptCallCount > 0) { - return; - } - - popped = true; - resume(); - }; - } // Exports test.push() to the user API - // Alias of pushResult. - - }, { - key: "push", - value: function push(result, actual, expected, message, negative) { - Logger.warn("assert.push is deprecated and will be removed in QUnit 3.0." + " Please use assert.pushResult instead (https://api.qunitjs.com/assert/pushResult)."); - var currentAssert = this instanceof Assert ? this : config.current.assert; - return currentAssert.pushResult({ - result: result, - actual: actual, - expected: expected, - message: message, - negative: negative - }); - } - }, { - key: "pushResult", - value: function pushResult(resultInfo) { - // Destructure of resultInfo = { result, actual, expected, message, negative } - var assert = this; - var currentTest = assert instanceof Assert && assert.test || config.current; // Backwards compatibility fix. - // Allows the direct use of global exported assertions and QUnit.assert.* - // Although, it's use is not recommended as it can leak assertions - // to other tests from async tests, because we only get a reference to the current test, - // not exactly the test where assertion were intended to be called. - - if (!currentTest) { - throw new Error("assertion outside test context, in " + sourceFromStacktrace(2)); - } - - if (!(assert instanceof Assert)) { - assert = currentTest.assert; - } - - return assert.test.pushResult(resultInfo); - } - }, { - key: "ok", - value: function ok(result, message) { - if (!message) { - message = result ? "okay" : "failed, expected argument to be truthy, was: ".concat(dump.parse(result)); - } - - this.pushResult({ - result: !!result, - actual: result, - expected: true, - message: message - }); - } - }, { - key: "notOk", - value: function notOk(result, message) { - if (!message) { - message = !result ? "okay" : "failed, expected argument to be falsy, was: ".concat(dump.parse(result)); - } - - this.pushResult({ - result: !result, - actual: result, - expected: false, - message: message - }); - } - }, { - key: "true", - value: function _true(result, message) { - this.pushResult({ - result: result === true, - actual: result, - expected: true, - message: message - }); - } - }, { - key: "false", - value: function _false(result, message) { - this.pushResult({ - result: result === false, - actual: result, - expected: false, - message: message - }); - } - }, { - key: "equal", - value: function equal(actual, expected, message) { - // eslint-disable-next-line eqeqeq - var result = expected == actual; - this.pushResult({ - result: result, - actual: actual, - expected: expected, - message: message - }); - } - }, { - key: "notEqual", - value: function notEqual(actual, expected, message) { - // eslint-disable-next-line eqeqeq - var result = expected != actual; - this.pushResult({ - result: result, - actual: actual, - expected: expected, - message: message, - negative: true - }); - } - }, { - key: "propEqual", - value: function propEqual(actual, expected, message) { - actual = objectValues(actual); - expected = objectValues(expected); - this.pushResult({ - result: equiv(actual, expected), - actual: actual, - expected: expected, - message: message - }); - } - }, { - key: "notPropEqual", - value: function notPropEqual(actual, expected, message) { - actual = objectValues(actual); - expected = objectValues(expected); - this.pushResult({ - result: !equiv(actual, expected), - actual: actual, - expected: expected, - message: message, - negative: true - }); - } - }, { - key: "deepEqual", - value: function deepEqual(actual, expected, message) { - this.pushResult({ - result: equiv(actual, expected), - actual: actual, - expected: expected, - message: message - }); - } - }, { - key: "notDeepEqual", - value: function notDeepEqual(actual, expected, message) { - this.pushResult({ - result: !equiv(actual, expected), - actual: actual, - expected: expected, - message: message, - negative: true - }); - } - }, { - key: "strictEqual", - value: function strictEqual(actual, expected, message) { - this.pushResult({ - result: expected === actual, - actual: actual, - expected: expected, - message: message - }); - } - }, { - key: "notStrictEqual", - value: function notStrictEqual(actual, expected, message) { - this.pushResult({ - result: expected !== actual, - actual: actual, - expected: expected, - message: message, - negative: true - }); - } - }, { - key: "throws", - value: function throws(block, expected, message) { - var actual, - result = false; - var currentTest = this instanceof Assert && this.test || config.current; // 'expected' is optional unless doing string comparison - - if (objectType(expected) === "string") { - if (message == null) { - message = expected; - expected = null; - } else { - throw new Error("throws/raises does not accept a string value for the expected argument.\n" + "Use a non-string object value (e.g. regExp) instead if it's necessary."); - } - } - - currentTest.ignoreGlobalErrors = true; - - try { - block.call(currentTest.testEnvironment); - } catch (e) { - actual = e; - } - - currentTest.ignoreGlobalErrors = false; - - if (actual) { - var expectedType = objectType(expected); // We don't want to validate thrown error - - if (!expected) { - result = true; // Expected is a regexp - } else if (expectedType === "regexp") { - result = expected.test(errorString(actual)); // Log the string form of the regexp - - expected = String(expected); // Expected is a constructor, maybe an Error constructor. - // Note the extra check on its prototype - this is an implicit - // requirement of "instanceof", else it will throw a TypeError. - } else if (expectedType === "function" && expected.prototype !== undefined && actual instanceof expected) { - result = true; // Expected is an Error object - } else if (expectedType === "object") { - result = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message; // Log the string form of the Error object - - expected = errorString(expected); // Expected is a validation function which returns true if validation passed - } else if (expectedType === "function" && expected.call({}, actual) === true) { - expected = null; - result = true; - } - } - - currentTest.assert.pushResult({ - result: result, - // undefined if it didn't throw - actual: actual && errorString(actual), - expected: expected, - message: message - }); - } - }, { - key: "rejects", - value: function rejects(promise, expected, message) { - var result = false; - var currentTest = this instanceof Assert && this.test || config.current; // 'expected' is optional unless doing string comparison - - if (objectType(expected) === "string") { - if (message === undefined) { - message = expected; - expected = undefined; - } else { - message = "assert.rejects does not accept a string value for the expected " + "argument.\nUse a non-string object value (e.g. validator function) instead " + "if necessary."; - currentTest.assert.pushResult({ - result: false, - message: message - }); - return; - } - } - - var then = promise && promise.then; - - if (objectType(then) !== "function") { - var _message = "The value provided to `assert.rejects` in " + "\"" + currentTest.testName + "\" was not a promise."; - - currentTest.assert.pushResult({ - result: false, - message: _message, - actual: promise - }); - return; - } - - var done = this.async(); - return then.call(promise, function handleFulfillment() { - var message = "The promise returned by the `assert.rejects` callback in " + "\"" + currentTest.testName + "\" did not reject."; - currentTest.assert.pushResult({ - result: false, - message: message, - actual: promise - }); - done(); - }, function handleRejection(actual) { - var expectedType = objectType(expected); // We don't want to validate - - if (expected === undefined) { - result = true; // Expected is a regexp - } else if (expectedType === "regexp") { - result = expected.test(errorString(actual)); // Log the string form of the regexp - - expected = String(expected); // Expected is a constructor, maybe an Error constructor - } else if (expectedType === "function" && actual instanceof expected) { - result = true; // Expected is an Error object - } else if (expectedType === "object") { - result = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message; // Log the string form of the Error object - - expected = errorString(expected); // Expected is a validation function which returns true if validation passed - } else { - if (expectedType === "function") { - result = expected.call({}, actual) === true; - expected = null; // Expected is some other invalid type - } else { - result = false; - message = "invalid expected value provided to `assert.rejects` " + "callback in \"" + currentTest.testName + "\": " + expectedType + "."; - } - } - - currentTest.assert.pushResult({ - result: result, - // leave rejection value of undefined as-is - actual: actual && errorString(actual), - expected: expected, - message: message - }); - done(); - }); - } - }]); - - return Assert; - }(); // Provide an alternative to assert.throws(), for environments that consider throws a reserved word - // Known to us are: Closure Compiler, Narwhal - // eslint-disable-next-line dot-notation - - - Assert.prototype.raises = Assert.prototype["throws"]; - /** - * Converts an error into a simple string for comparisons. - * - * @param {Error|Object} error - * @return {String} - */ - - function errorString(error) { - var resultErrorString = error.toString(); // If the error wasn't a subclass of Error but something like - // an object literal with name and message properties... - - if (resultErrorString.substring(0, 7) === "[object") { - var name = error.name ? error.name.toString() : "Error"; - var message = error.message ? error.message.toString() : ""; - - if (name && message) { - return "".concat(name, ": ").concat(message); - } else if (name) { - return name; - } else if (message) { - return message; - } else { - return "Error"; - } - } else { - return resultErrorString; - } - } - - /* global module, exports, define */ - function exportQUnit(QUnit) { - if (window$1 && document$1) { - // QUnit may be defined when it is preconfigured but then only QUnit and QUnit.config may be defined. - if (window$1.QUnit && window$1.QUnit.version) { - throw new Error("QUnit has already been defined."); - } - - window$1.QUnit = QUnit; - } // For nodejs - - - if (typeof module !== "undefined" && module && module.exports) { - module.exports = QUnit; // For consistency with CommonJS environments' exports - - module.exports.QUnit = QUnit; - } // For CommonJS with exports, but without module.exports, like Rhino - - - if (typeof exports !== "undefined" && exports) { - exports.QUnit = QUnit; - } - - if (typeof define === "function" && define.amd) { - define(function () { - return QUnit; - }); - QUnit.config.autostart = false; - } // For Web/Service Workers - - - if (self$1 && self$1.WorkerGlobalScope && self$1 instanceof self$1.WorkerGlobalScope) { - self$1.QUnit = QUnit; - } - } - - // error handling should be suppressed and false otherwise. - // In this case, we will only suppress further error handling if the - // "ignoreGlobalErrors" configuration option is enabled. - - function onError(error) { - for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { - args[_key - 1] = arguments[_key]; - } - - if (config.current) { - if (config.current.ignoreGlobalErrors) { - return true; - } - - pushFailure.apply(void 0, [error.message, error.stacktrace || error.fileName + ":" + error.lineNumber].concat(args)); - } else { - test("global failure", extend(function () { - pushFailure.apply(void 0, [error.message, error.stacktrace || error.fileName + ":" + error.lineNumber].concat(args)); - }, { - validTest: true - })); - } - - return false; - } - - function onUnhandledRejection(reason) { - var resultInfo = { - result: false, - message: reason.message || "error", - actual: reason, - source: reason.stack || sourceFromStacktrace(3) - }; - var currentTest = config.current; - - if (currentTest) { - currentTest.assert.pushResult(resultInfo); - } else { - test("global failure", extend(function (assert) { - assert.pushResult(resultInfo); - }, { - validTest: true - })); - } - } - - var QUnit = {}; - var globalSuite = new SuiteReport(); // The initial "currentModule" represents the global (or top-level) module that - // is not explicitly defined by the user, therefore we add the "globalSuite" to - // it since each module has a suiteReport associated with it. - - config.currentModule.suiteReport = globalSuite; - var globalStartCalled = false; - var runStarted = false; // Figure out if we're running the tests from a server or not - - QUnit.isLocal = window$1 && window$1.location && window$1.location.protocol === "file:"; // Expose the current QUnit version - - QUnit.version = "2.12.0"; - - extend(QUnit, { - on: on, - module: module$1, - test: test, - // alias other test flavors for easy access - todo: test.todo, - skip: test.skip, - only: test.only, - start: function start(count) { - var globalStartAlreadyCalled = globalStartCalled; - - if (!config.current) { - globalStartCalled = true; - - if (runStarted) { - throw new Error("Called start() while test already started running"); - } else if (globalStartAlreadyCalled || count > 1) { - throw new Error("Called start() outside of a test context too many times"); - } else if (config.autostart) { - throw new Error("Called start() outside of a test context when " + "QUnit.config.autostart was true"); - } else if (!config.pageLoaded) { - // The page isn't completely loaded yet, so we set autostart and then - // load if we're in Node or wait for the browser's load event. - config.autostart = true; // Starts from Node even if .load was not previously called. We still return - // early otherwise we'll wind up "beginning" twice. - - if (!document$1) { - QUnit.load(); - } - - return; - } - } else { - throw new Error("QUnit.start cannot be called inside a test context."); - } - - scheduleBegin(); - }, - config: config, - is: is, - objectType: objectType, - extend: function extend$1() { - Logger.warn("QUnit.extend is deprecated and will be removed in QUnit 3.0." + " Please use Object.assign instead."); // delegate to utility implementation, which does not warn and can be used elsewhere internally - - for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { - args[_key] = arguments[_key]; - } - - return extend.apply(this, args); - }, - load: function load() { - config.pageLoaded = true; // Initialize the configuration options - - extend(config, { - stats: { - all: 0, - bad: 0, - testCount: 0 - }, - started: 0, - updateRate: 1000, - autostart: true, - filter: "" - }, true); - - if (!runStarted) { - config.blocking = false; - - if (config.autostart) { - scheduleBegin(); - } - } - }, - stack: function stack(offset) { - offset = (offset || 0) + 2; - return sourceFromStacktrace(offset); - }, - onError: onError, - onUnhandledRejection: onUnhandledRejection - }); - - QUnit.pushFailure = pushFailure; - QUnit.assert = Assert.prototype; - QUnit.equiv = equiv; - QUnit.dump = dump; - registerLoggingCallbacks(QUnit); - - function scheduleBegin() { - runStarted = true; // Add a slight delay to allow definition of more modules and tests. - - if (setTimeout$1) { - setTimeout$1(function () { - begin(); - }); - } else { - begin(); - } - } - - function unblockAndAdvanceQueue() { - config.blocking = false; - ProcessingQueue.advance(); - } - - function begin() { - var i, - l, - modulesLog = []; // If the test run hasn't officially begun yet - - if (!config.started) { - // Record the time of the test run's beginning - config.started = now(); // Delete the loose unnamed module if unused. - - if (config.modules[0].name === "" && config.modules[0].tests.length === 0) { - config.modules.shift(); - } // Avoid unnecessary information by not logging modules' test environments - - - for (i = 0, l = config.modules.length; i < l; i++) { - modulesLog.push({ - name: config.modules[i].name, - tests: config.modules[i].tests - }); - } // The test run is officially beginning now - - - emit("runStart", globalSuite.start(true)); - runLoggingCallbacks("begin", { - totalTests: Test.count, - modules: modulesLog - }).then(unblockAndAdvanceQueue); - } else { - unblockAndAdvanceQueue(); - } - } - exportQUnit(QUnit); - - (function () { - if (!window$1 || !document$1) { - return; - } - - var config = QUnit.config, - hasOwn = Object.prototype.hasOwnProperty; // Stores fixture HTML for resetting later - - function storeFixture() { - // Avoid overwriting user-defined values - if (hasOwn.call(config, "fixture")) { - return; - } - - var fixture = document$1.getElementById("qunit-fixture"); - - if (fixture) { - config.fixture = fixture.cloneNode(true); - } - } - - QUnit.begin(storeFixture); // Resets the fixture DOM element if available. - - function resetFixture() { - if (config.fixture == null) { - return; - } - - var fixture = document$1.getElementById("qunit-fixture"); - - var resetFixtureType = _typeof(config.fixture); - - if (resetFixtureType === "string") { - // support user defined values for `config.fixture` - var newFixture = document$1.createElement("div"); - newFixture.setAttribute("id", "qunit-fixture"); - newFixture.innerHTML = config.fixture; - fixture.parentNode.replaceChild(newFixture, fixture); - } else { - var clonedFixture = config.fixture.cloneNode(true); - fixture.parentNode.replaceChild(clonedFixture, fixture); - } - } - - QUnit.testStart(resetFixture); - })(); - - (function () { - // Only interact with URLs via window.location - var location = typeof window$1 !== "undefined" && window$1.location; - - if (!location) { - return; - } - - var urlParams = getUrlParams(); - QUnit.urlParams = urlParams; // Match module/test by inclusion in an array - - QUnit.config.moduleId = [].concat(urlParams.moduleId || []); - QUnit.config.testId = [].concat(urlParams.testId || []); // Exact case-insensitive match of the module name - - QUnit.config.module = urlParams.module; // Regular expression or case-insenstive substring match against "moduleName: testName" - - QUnit.config.filter = urlParams.filter; // Test order randomization - - if (urlParams.seed === true) { - // Generate a random seed if the option is specified without a value - QUnit.config.seed = Math.random().toString(36).slice(2); - } else if (urlParams.seed) { - QUnit.config.seed = urlParams.seed; - } // Add URL-parameter-mapped config values with UI form rendering data - - - QUnit.config.urlConfig.push({ - id: "hidepassed", - label: "Hide passed tests", - tooltip: "Only show tests and assertions that fail. Stored as query-strings." - }, { - id: "noglobals", - label: "Check for Globals", - tooltip: "Enabling this will test if any test introduces new properties on the " + "global object (`window` in Browsers). Stored as query-strings." - }, { - id: "notrycatch", - label: "No try-catch", - tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging " + "exceptions in IE reasonable. Stored as query-strings." - }); - QUnit.begin(function () { - var i, - option, - urlConfig = QUnit.config.urlConfig; - - for (i = 0; i < urlConfig.length; i++) { - // Options can be either strings or objects with nonempty "id" properties - option = QUnit.config.urlConfig[i]; - - if (typeof option !== "string") { - option = option.id; - } - - if (QUnit.config[option] === undefined) { - QUnit.config[option] = urlParams[option]; - } - } - }); - - function getUrlParams() { - var i, param, name, value; - var urlParams = Object.create(null); - var params = location.search.slice(1).split("&"); - var length = params.length; - - for (i = 0; i < length; i++) { - if (params[i]) { - param = params[i].split("="); - name = decodeQueryParam(param[0]); // Allow just a key to turn on a flag, e.g., test.html?noglobals - - value = param.length === 1 || decodeQueryParam(param.slice(1).join("=")); - - if (name in urlParams) { - urlParams[name] = [].concat(urlParams[name], value); - } else { - urlParams[name] = value; - } - } - } - - return urlParams; - } - - function decodeQueryParam(param) { - return decodeURIComponent(param.replace(/\+/g, "%20")); - } - })(); - - var fuzzysort = createCommonjsModule(function (module) { - - (function (root, UMD) { - if ( module.exports) module.exports = UMD();else root.fuzzysort = UMD(); - })(commonjsGlobal, function UMD() { - function fuzzysortNew(instanceOptions) { - var fuzzysort = { - single: function (search, target, options) { - if (!search) return null; - if (!isObj(search)) search = fuzzysort.getPreparedSearch(search); - if (!target) return null; - if (!isObj(target)) target = fuzzysort.getPrepared(target); - var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true; - var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo; - return algorithm(search, target, search[0]); // var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991 - // var result = algorithm(search, target, search[0]) - // if(result === null) return null - // if(result.score < threshold) return null - // return result - }, - go: function (search, targets, options) { - if (!search) return noResults; - search = fuzzysort.prepareSearch(search); - var searchLowerCode = search[0]; - var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991; - var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991; - var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true; - var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo; - var resultsLen = 0; - var limitedCount = 0; - var targetsLen = targets.length; // This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys] - // options.keys - - if (options && options.keys) { - var scoreFn = options.scoreFn || defaultScoreFn; - var keys = options.keys; - var keysLen = keys.length; - - for (var i = targetsLen - 1; i >= 0; --i) { - var obj = targets[i]; - var objResults = new Array(keysLen); - - for (var keyI = keysLen - 1; keyI >= 0; --keyI) { - var key = keys[keyI]; - var target = getValue(obj, key); - - if (!target) { - objResults[keyI] = null; - continue; - } - - if (!isObj(target)) target = fuzzysort.getPrepared(target); - objResults[keyI] = algorithm(search, target, searchLowerCode); - } - - objResults.obj = obj; // before scoreFn so scoreFn can use it - - var score = scoreFn(objResults); - if (score === null) continue; - if (score < threshold) continue; - objResults.score = score; - - if (resultsLen < limit) { - q.add(objResults); - ++resultsLen; - } else { - ++limitedCount; - if (score > q.peek().score) q.replaceTop(objResults); - } - } // options.key - - } else if (options && options.key) { - var key = options.key; - - for (var i = targetsLen - 1; i >= 0; --i) { - var obj = targets[i]; - var target = getValue(obj, key); - if (!target) continue; - if (!isObj(target)) target = fuzzysort.getPrepared(target); - var result = algorithm(search, target, searchLowerCode); - if (result === null) continue; - if (result.score < threshold) continue; // have to clone result so duplicate targets from different obj can each reference the correct obj - - result = { - target: result.target, - _targetLowerCodes: null, - _nextBeginningIndexes: null, - score: result.score, - indexes: result.indexes, - obj: obj - }; // hidden - - if (resultsLen < limit) { - q.add(result); - ++resultsLen; - } else { - ++limitedCount; - if (result.score > q.peek().score) q.replaceTop(result); - } - } // no keys - - } else { - for (var i = targetsLen - 1; i >= 0; --i) { - var target = targets[i]; - if (!target) continue; - if (!isObj(target)) target = fuzzysort.getPrepared(target); - var result = algorithm(search, target, searchLowerCode); - if (result === null) continue; - if (result.score < threshold) continue; - - if (resultsLen < limit) { - q.add(result); - ++resultsLen; - } else { - ++limitedCount; - if (result.score > q.peek().score) q.replaceTop(result); - } - } - } - - if (resultsLen === 0) return noResults; - var results = new Array(resultsLen); - - for (var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll(); - - results.total = resultsLen + limitedCount; - return results; - }, - goAsync: function (search, targets, options) { - var canceled = false; - var p = new Promise(function (resolve, reject) { - if (!search) return resolve(noResults); - search = fuzzysort.prepareSearch(search); - var searchLowerCode = search[0]; - var q = fastpriorityqueue(); - var iCurrent = targets.length - 1; - var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991; - var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991; - var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true; - var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo; - var resultsLen = 0; - var limitedCount = 0; - - function step() { - if (canceled) return reject('canceled'); - var startMs = Date.now(); // This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys] - // options.keys - - if (options && options.keys) { - var scoreFn = options.scoreFn || defaultScoreFn; - var keys = options.keys; - var keysLen = keys.length; - - for (; iCurrent >= 0; --iCurrent) { - var obj = targets[iCurrent]; - var objResults = new Array(keysLen); - - for (var keyI = keysLen - 1; keyI >= 0; --keyI) { - var key = keys[keyI]; - var target = getValue(obj, key); - - if (!target) { - objResults[keyI] = null; - continue; - } - - if (!isObj(target)) target = fuzzysort.getPrepared(target); - objResults[keyI] = algorithm(search, target, searchLowerCode); - } - - objResults.obj = obj; // before scoreFn so scoreFn can use it - - var score = scoreFn(objResults); - if (score === null) continue; - if (score < threshold) continue; - objResults.score = score; - - if (resultsLen < limit) { - q.add(objResults); - ++resultsLen; - } else { - ++limitedCount; - if (score > q.peek().score) q.replaceTop(objResults); - } - - if (iCurrent % 1000 - /*itemsPerCheck*/ - === 0) { - if (Date.now() - startMs >= 10 - /*asyncInterval*/ - ) { - isNode ? setImmediate(step) : setTimeout(step); - return; - } - } - } // options.key - - } else if (options && options.key) { - var key = options.key; - - for (; iCurrent >= 0; --iCurrent) { - var obj = targets[iCurrent]; - var target = getValue(obj, key); - if (!target) continue; - if (!isObj(target)) target = fuzzysort.getPrepared(target); - var result = algorithm(search, target, searchLowerCode); - if (result === null) continue; - if (result.score < threshold) continue; // have to clone result so duplicate targets from different obj can each reference the correct obj - - result = { - target: result.target, - _targetLowerCodes: null, - _nextBeginningIndexes: null, - score: result.score, - indexes: result.indexes, - obj: obj - }; // hidden - - if (resultsLen < limit) { - q.add(result); - ++resultsLen; - } else { - ++limitedCount; - if (result.score > q.peek().score) q.replaceTop(result); - } - - if (iCurrent % 1000 - /*itemsPerCheck*/ - === 0) { - if (Date.now() - startMs >= 10 - /*asyncInterval*/ - ) { - isNode ? setImmediate(step) : setTimeout(step); - return; - } - } - } // no keys - - } else { - for (; iCurrent >= 0; --iCurrent) { - var target = targets[iCurrent]; - if (!target) continue; - if (!isObj(target)) target = fuzzysort.getPrepared(target); - var result = algorithm(search, target, searchLowerCode); - if (result === null) continue; - if (result.score < threshold) continue; - - if (resultsLen < limit) { - q.add(result); - ++resultsLen; - } else { - ++limitedCount; - if (result.score > q.peek().score) q.replaceTop(result); - } - - if (iCurrent % 1000 - /*itemsPerCheck*/ - === 0) { - if (Date.now() - startMs >= 10 - /*asyncInterval*/ - ) { - isNode ? setImmediate(step) : setTimeout(step); - return; - } - } - } - } - - if (resultsLen === 0) return resolve(noResults); - var results = new Array(resultsLen); - - for (var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll(); - - results.total = resultsLen + limitedCount; - resolve(results); - } - - isNode ? setImmediate(step) : step(); - }); - - p.cancel = function () { - canceled = true; - }; - - return p; - }, - highlight: function (result, hOpen, hClose) { - if (result === null) return null; - if (hOpen === undefined) hOpen = ''; - if (hClose === undefined) hClose = ''; - var highlighted = ''; - var matchesIndex = 0; - var opened = false; - var target = result.target; - var targetLen = target.length; - var matchesBest = result.indexes; - - for (var i = 0; i < targetLen; ++i) { - var char = target[i]; - - if (matchesBest[matchesIndex] === i) { - ++matchesIndex; - - if (!opened) { - opened = true; - highlighted += hOpen; - } - - if (matchesIndex === matchesBest.length) { - highlighted += char + hClose + target.substr(i + 1); - break; - } - } else { - if (opened) { - opened = false; - highlighted += hClose; - } - } - - highlighted += char; - } - - return highlighted; - }, - prepare: function (target) { - if (!target) return; - return { - target: target, - _targetLowerCodes: fuzzysort.prepareLowerCodes(target), - _nextBeginningIndexes: null, - score: null, - indexes: null, - obj: null - }; // hidden - }, - prepareSlow: function (target) { - if (!target) return; - return { - target: target, - _targetLowerCodes: fuzzysort.prepareLowerCodes(target), - _nextBeginningIndexes: fuzzysort.prepareNextBeginningIndexes(target), - score: null, - indexes: null, - obj: null - }; // hidden - }, - prepareSearch: function (search) { - if (!search) return; - return fuzzysort.prepareLowerCodes(search); - }, - // Below this point is only internal code - // Below this point is only internal code - // Below this point is only internal code - // Below this point is only internal code - getPrepared: function (target) { - if (target.length > 999) return fuzzysort.prepare(target); // don't cache huge targets - - var targetPrepared = preparedCache.get(target); - if (targetPrepared !== undefined) return targetPrepared; - targetPrepared = fuzzysort.prepare(target); - preparedCache.set(target, targetPrepared); - return targetPrepared; - }, - getPreparedSearch: function (search) { - if (search.length > 999) return fuzzysort.prepareSearch(search); // don't cache huge searches - - var searchPrepared = preparedSearchCache.get(search); - if (searchPrepared !== undefined) return searchPrepared; - searchPrepared = fuzzysort.prepareSearch(search); - preparedSearchCache.set(search, searchPrepared); - return searchPrepared; - }, - algorithm: function (searchLowerCodes, prepared, searchLowerCode) { - var targetLowerCodes = prepared._targetLowerCodes; - var searchLen = searchLowerCodes.length; - var targetLen = targetLowerCodes.length; - var searchI = 0; // where we at - - var targetI = 0; // where you at - - var typoSimpleI = 0; - var matchesSimpleLen = 0; // very basic fuzzy match; to remove non-matching targets ASAP! - // walk through target. find sequential matches. - // if all chars aren't found then exit - - for (;;) { - var isMatch = searchLowerCode === targetLowerCodes[targetI]; - - if (isMatch) { - matchesSimple[matchesSimpleLen++] = targetI; - ++searchI; - if (searchI === searchLen) break; - searchLowerCode = searchLowerCodes[typoSimpleI === 0 ? searchI : typoSimpleI === searchI ? searchI + 1 : typoSimpleI === searchI - 1 ? searchI - 1 : searchI]; - } - - ++targetI; - - if (targetI >= targetLen) { - // Failed to find searchI - // Check for typo or exit - // we go as far as possible before trying to transpose - // then we transpose backwards until we reach the beginning - for (;;) { - if (searchI <= 1) return null; // not allowed to transpose first char - - if (typoSimpleI === 0) { - // we haven't tried to transpose yet - --searchI; - var searchLowerCodeNew = searchLowerCodes[searchI]; - if (searchLowerCode === searchLowerCodeNew) continue; // doesn't make sense to transpose a repeat char - - typoSimpleI = searchI; - } else { - if (typoSimpleI === 1) return null; // reached the end of the line for transposing - - --typoSimpleI; - searchI = typoSimpleI; - searchLowerCode = searchLowerCodes[searchI + 1]; - var searchLowerCodeNew = searchLowerCodes[searchI]; - if (searchLowerCode === searchLowerCodeNew) continue; // doesn't make sense to transpose a repeat char - } - - matchesSimpleLen = searchI; - targetI = matchesSimple[matchesSimpleLen - 1] + 1; - break; - } - } - } - - var searchI = 0; - var typoStrictI = 0; - var successStrict = false; - var matchesStrictLen = 0; - var nextBeginningIndexes = prepared._nextBeginningIndexes; - if (nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target); - var firstPossibleI = targetI = matchesSimple[0] === 0 ? 0 : nextBeginningIndexes[matchesSimple[0] - 1]; // Our target string successfully matched all characters in sequence! - // Let's try a more advanced and strict test to improve the score - // only count it as a match if it's consecutive or a beginning character! - - if (targetI !== targetLen) for (;;) { - if (targetI >= targetLen) { - // We failed to find a good spot for this search char, go back to the previous search char and force it forward - if (searchI <= 0) { - // We failed to push chars forward for a better match - // transpose, starting from the beginning - ++typoStrictI; - if (typoStrictI > searchLen - 2) break; - if (searchLowerCodes[typoStrictI] === searchLowerCodes[typoStrictI + 1]) continue; // doesn't make sense to transpose a repeat char - - targetI = firstPossibleI; - continue; - } - - --searchI; - var lastMatch = matchesStrict[--matchesStrictLen]; - targetI = nextBeginningIndexes[lastMatch]; - } else { - var isMatch = searchLowerCodes[typoStrictI === 0 ? searchI : typoStrictI === searchI ? searchI + 1 : typoStrictI === searchI - 1 ? searchI - 1 : searchI] === targetLowerCodes[targetI]; - - if (isMatch) { - matchesStrict[matchesStrictLen++] = targetI; - ++searchI; - - if (searchI === searchLen) { - successStrict = true; - break; - } - - ++targetI; - } else { - targetI = nextBeginningIndexes[targetI]; - } - } - } - { - // tally up the score & keep track of matches for highlighting later - if (successStrict) { - var matchesBest = matchesStrict; - var matchesBestLen = matchesStrictLen; - } else { - var matchesBest = matchesSimple; - var matchesBestLen = matchesSimpleLen; - } - - var score = 0; - var lastTargetI = -1; - - for (var i = 0; i < searchLen; ++i) { - var targetI = matchesBest[i]; // score only goes down if they're not consecutive - - if (lastTargetI !== targetI - 1) score -= targetI; - lastTargetI = targetI; - } - - if (!successStrict) { - score *= 1000; - if (typoSimpleI !== 0) score += -20; - /*typoPenalty*/ - } else { - if (typoStrictI !== 0) score += -20; - /*typoPenalty*/ - } - - score -= targetLen - searchLen; - prepared.score = score; - prepared.indexes = new Array(matchesBestLen); - - for (var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i]; - - return prepared; - } - }, - algorithmNoTypo: function (searchLowerCodes, prepared, searchLowerCode) { - var targetLowerCodes = prepared._targetLowerCodes; - var searchLen = searchLowerCodes.length; - var targetLen = targetLowerCodes.length; - var searchI = 0; // where we at - - var targetI = 0; // where you at - - var matchesSimpleLen = 0; // very basic fuzzy match; to remove non-matching targets ASAP! - // walk through target. find sequential matches. - // if all chars aren't found then exit - - for (;;) { - var isMatch = searchLowerCode === targetLowerCodes[targetI]; - - if (isMatch) { - matchesSimple[matchesSimpleLen++] = targetI; - ++searchI; - if (searchI === searchLen) break; - searchLowerCode = searchLowerCodes[searchI]; - } - - ++targetI; - if (targetI >= targetLen) return null; // Failed to find searchI - } - - var searchI = 0; - var successStrict = false; - var matchesStrictLen = 0; - var nextBeginningIndexes = prepared._nextBeginningIndexes; - if (nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target); - var firstPossibleI = targetI = matchesSimple[0] === 0 ? 0 : nextBeginningIndexes[matchesSimple[0] - 1]; // Our target string successfully matched all characters in sequence! - // Let's try a more advanced and strict test to improve the score - // only count it as a match if it's consecutive or a beginning character! - - if (targetI !== targetLen) for (;;) { - if (targetI >= targetLen) { - // We failed to find a good spot for this search char, go back to the previous search char and force it forward - if (searchI <= 0) break; // We failed to push chars forward for a better match - - --searchI; - var lastMatch = matchesStrict[--matchesStrictLen]; - targetI = nextBeginningIndexes[lastMatch]; - } else { - var isMatch = searchLowerCodes[searchI] === targetLowerCodes[targetI]; - - if (isMatch) { - matchesStrict[matchesStrictLen++] = targetI; - ++searchI; - - if (searchI === searchLen) { - successStrict = true; - break; - } - - ++targetI; - } else { - targetI = nextBeginningIndexes[targetI]; - } - } - } - { - // tally up the score & keep track of matches for highlighting later - if (successStrict) { - var matchesBest = matchesStrict; - var matchesBestLen = matchesStrictLen; - } else { - var matchesBest = matchesSimple; - var matchesBestLen = matchesSimpleLen; - } - - var score = 0; - var lastTargetI = -1; - - for (var i = 0; i < searchLen; ++i) { - var targetI = matchesBest[i]; // score only goes down if they're not consecutive - - if (lastTargetI !== targetI - 1) score -= targetI; - lastTargetI = targetI; - } - - if (!successStrict) score *= 1000; - score -= targetLen - searchLen; - prepared.score = score; - prepared.indexes = new Array(matchesBestLen); - - for (var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i]; - - return prepared; - } - }, - prepareLowerCodes: function (str) { - var strLen = str.length; - var lowerCodes = []; // new Array(strLen) sparse array is too slow - - var lower = str.toLowerCase(); - - for (var i = 0; i < strLen; ++i) lowerCodes[i] = lower.charCodeAt(i); - - return lowerCodes; - }, - prepareBeginningIndexes: function (target) { - var targetLen = target.length; - var beginningIndexes = []; - var beginningIndexesLen = 0; - var wasUpper = false; - var wasAlphanum = false; - - for (var i = 0; i < targetLen; ++i) { - var targetCode = target.charCodeAt(i); - var isUpper = targetCode >= 65 && targetCode <= 90; - var isAlphanum = isUpper || targetCode >= 97 && targetCode <= 122 || targetCode >= 48 && targetCode <= 57; - var isBeginning = isUpper && !wasUpper || !wasAlphanum || !isAlphanum; - wasUpper = isUpper; - wasAlphanum = isAlphanum; - if (isBeginning) beginningIndexes[beginningIndexesLen++] = i; - } - - return beginningIndexes; - }, - prepareNextBeginningIndexes: function (target) { - var targetLen = target.length; - var beginningIndexes = fuzzysort.prepareBeginningIndexes(target); - var nextBeginningIndexes = []; // new Array(targetLen) sparse array is too slow - - var lastIsBeginning = beginningIndexes[0]; - var lastIsBeginningI = 0; - - for (var i = 0; i < targetLen; ++i) { - if (lastIsBeginning > i) { - nextBeginningIndexes[i] = lastIsBeginning; - } else { - lastIsBeginning = beginningIndexes[++lastIsBeginningI]; - nextBeginningIndexes[i] = lastIsBeginning === undefined ? targetLen : lastIsBeginning; - } - } - - return nextBeginningIndexes; - }, - cleanup: cleanup, - new: fuzzysortNew - }; - return fuzzysort; - } // fuzzysortNew - // This stuff is outside fuzzysortNew, because it's shared with instances of fuzzysort.new() - - - var isNode = typeof commonjsRequire !== 'undefined' && typeof window === 'undefined'; // var MAX_INT = Number.MAX_SAFE_INTEGER - // var MIN_INT = Number.MIN_VALUE - - var preparedCache = new Map(); - var preparedSearchCache = new Map(); - var noResults = []; - noResults.total = 0; - var matchesSimple = []; - var matchesStrict = []; - - function cleanup() { - preparedCache.clear(); - preparedSearchCache.clear(); - matchesSimple = []; - matchesStrict = []; - } - - function defaultScoreFn(a) { - var max = -9007199254740991; - - for (var i = a.length - 1; i >= 0; --i) { - var result = a[i]; - if (result === null) continue; - var score = result.score; - if (score > max) max = score; - } - - if (max === -9007199254740991) return null; - return max; - } // prop = 'key' 2.5ms optimized for this case, seems to be about as fast as direct obj[prop] - // prop = 'key1.key2' 10ms - // prop = ['key1', 'key2'] 27ms - - - function getValue(obj, prop) { - var tmp = obj[prop]; - if (tmp !== undefined) return tmp; - var segs = prop; - if (!Array.isArray(prop)) segs = prop.split('.'); - var len = segs.length; - var i = -1; - - while (obj && ++i < len) obj = obj[segs[i]]; - - return obj; - } - - function isObj(x) { - return typeof x === 'object'; - } // faster as a function - // Hacked version of https://github.com/lemire/FastPriorityQueue.js - - - var fastpriorityqueue = function () { - var r = [], - o = 0, - e = {}; - - function n() { - for (var e = 0, n = r[e], c = 1; c < o;) { - var f = c + 1; - e = c, f < o && r[f].score < r[c].score && (e = f), r[e - 1 >> 1] = r[e], c = 1 + (e << 1); - } - - for (var a = e - 1 >> 1; e > 0 && n.score < r[a].score; a = (e = a) - 1 >> 1) r[e] = r[a]; - - r[e] = n; - } - - return e.add = function (e) { - var n = o; - r[o++] = e; - - for (var c = n - 1 >> 1; n > 0 && e.score < r[c].score; c = (n = c) - 1 >> 1) r[n] = r[c]; - - r[n] = e; - }, e.poll = function () { - if (0 !== o) { - var e = r[0]; - return r[0] = r[--o], n(), e; - } - }, e.peek = function (e) { - if (0 !== o) return r[0]; - }, e.replaceTop = function (o) { - r[0] = o, n(); - }, e; - }; - - var q = fastpriorityqueue(); // reuse this, except for async, it needs to make its own - - return fuzzysortNew(); - }); // UMD - // TODO: (performance) wasm version!? - // TODO: (performance) layout memory in an optimal way to go fast by avoiding cache misses - // TODO: (performance) preparedCache is a memory leak - // TODO: (like sublime) backslash === forwardslash - // TODO: (performance) i have no idea how well optizmied the allowing typos algorithm is - - }); - - var stats = { - passedTests: 0, - failedTests: 0, - skippedTests: 0, - todoTests: 0 - }; // Escape text for attribute or text content. - - function escapeText(s) { - if (!s) { - return ""; - } - - s = s + ""; // Both single quotes and double quotes (for attributes) - - return s.replace(/['"<>&]/g, function (s) { - switch (s) { - case "'": - return "'"; - - case "\"": - return """; - - case "<": - return "<"; - - case ">": - return ">"; - - case "&": - return "&"; - } - }); - } - - (function () { - // Don't load the HTML Reporter on non-browser environments - if (!window$1 || !document$1) { - return; - } - - var config = QUnit.config, - hiddenTests = [], - collapseNext = false, - hasOwn = Object.prototype.hasOwnProperty, - unfilteredUrl = setUrl({ - filter: undefined, - module: undefined, - moduleId: undefined, - testId: undefined - }); - - function addEvent(elem, type, fn) { - elem.addEventListener(type, fn, false); - } - - function removeEvent(elem, type, fn) { - elem.removeEventListener(type, fn, false); - } - - function addEvents(elems, type, fn) { - var i = elems.length; - - while (i--) { - addEvent(elems[i], type, fn); - } - } - - function hasClass(elem, name) { - return (" " + elem.className + " ").indexOf(" " + name + " ") >= 0; - } - - function addClass(elem, name) { - if (!hasClass(elem, name)) { - elem.className += (elem.className ? " " : "") + name; - } - } - - function toggleClass(elem, name, force) { - if (force || typeof force === "undefined" && !hasClass(elem, name)) { - addClass(elem, name); - } else { - removeClass(elem, name); - } - } - - function removeClass(elem, name) { - var set = " " + elem.className + " "; // Class name may appear multiple times - - while (set.indexOf(" " + name + " ") >= 0) { - set = set.replace(" " + name + " ", " "); - } // Trim for prettiness - - - elem.className = typeof set.trim === "function" ? set.trim() : set.replace(/^\s+|\s+$/g, ""); - } - - function id(name) { - return document$1.getElementById && document$1.getElementById(name); - } - - function abortTests() { - var abortButton = id("qunit-abort-tests-button"); - - if (abortButton) { - abortButton.disabled = true; - abortButton.innerHTML = "Aborting..."; - } - - QUnit.config.queue.length = 0; - return false; - } - - function interceptNavigation(ev) { - applyUrlParams(); - - if (ev && ev.preventDefault) { - ev.preventDefault(); - } - - return false; - } - - function getUrlConfigHtml() { - var i, - j, - val, - escaped, - escapedTooltip, - selection = false, - urlConfig = config.urlConfig, - urlConfigHtml = ""; - - for (i = 0; i < urlConfig.length; i++) { - // Options can be either strings or objects with nonempty "id" properties - val = config.urlConfig[i]; - - if (typeof val === "string") { - val = { - id: val, - label: val - }; - } - - escaped = escapeText(val.id); - escapedTooltip = escapeText(val.tooltip); - - if (!val.value || typeof val.value === "string") { - urlConfigHtml += ""; - } else { - urlConfigHtml += ""; - } - } - - return urlConfigHtml; - } // Handle "click" events on toolbar checkboxes and "change" for select menus. - // Updates the URL with the new state of `config.urlConfig` values. - - - function toolbarChanged() { - var updatedUrl, - value, - tests, - field = this, - params = {}; // Detect if field is a select menu or a checkbox - - if ("selectedIndex" in field) { - value = field.options[field.selectedIndex].value || undefined; - } else { - value = field.checked ? field.defaultValue || true : undefined; - } - - params[field.name] = value; - updatedUrl = setUrl(params); // Check if we can apply the change without a page refresh - - if ("hidepassed" === field.name && "replaceState" in window$1.history) { - QUnit.urlParams[field.name] = value; - config[field.name] = value || false; - tests = id("qunit-tests"); - - if (tests) { - var length = tests.children.length; - var children = tests.children; - - if (field.checked) { - for (var i = 0; i < length; i++) { - var test = children[i]; - var className = test ? test.className : ""; - var classNameHasPass = className.indexOf("pass") > -1; - var classNameHasSkipped = className.indexOf("skipped") > -1; - - if (classNameHasPass || classNameHasSkipped) { - hiddenTests.push(test); - } - } - - var _iterator = _createForOfIteratorHelper(hiddenTests), - _step; - - try { - for (_iterator.s(); !(_step = _iterator.n()).done;) { - var hiddenTest = _step.value; - tests.removeChild(hiddenTest); - } - } catch (err) { - _iterator.e(err); - } finally { - _iterator.f(); - } - } else { - while ((test = hiddenTests.pop()) != null) { - tests.appendChild(test); - } - } - } - - window$1.history.replaceState(null, "", updatedUrl); - } else { - window$1.location = updatedUrl; - } - } - - function setUrl(params) { - var key, - arrValue, - i, - querystring = "?", - location = window$1.location; - params = extend(extend({}, QUnit.urlParams), params); - - for (key in params) { - // Skip inherited or undefined properties - if (hasOwn.call(params, key) && params[key] !== undefined) { - // Output a parameter for each value of this key - // (but usually just one) - arrValue = [].concat(params[key]); - - for (i = 0; i < arrValue.length; i++) { - querystring += encodeURIComponent(key); - - if (arrValue[i] !== true) { - querystring += "=" + encodeURIComponent(arrValue[i]); - } - - querystring += "&"; - } - } - } - - return location.protocol + "//" + location.host + location.pathname + querystring.slice(0, -1); - } - - function applyUrlParams() { - var i, - selectedModules = [], - modulesList = id("qunit-modulefilter-dropdown-list").getElementsByTagName("input"), - filter = id("qunit-filter-input").value; - - for (i = 0; i < modulesList.length; i++) { - if (modulesList[i].checked) { - selectedModules.push(modulesList[i].value); - } - } - - window$1.location = setUrl({ - filter: filter === "" ? undefined : filter, - moduleId: selectedModules.length === 0 ? undefined : selectedModules, - // Remove module and testId filter - module: undefined, - testId: undefined - }); - } - - function toolbarUrlConfigContainer() { - var urlConfigContainer = document$1.createElement("span"); - urlConfigContainer.innerHTML = getUrlConfigHtml(); - addClass(urlConfigContainer, "qunit-url-config"); - addEvents(urlConfigContainer.getElementsByTagName("input"), "change", toolbarChanged); - addEvents(urlConfigContainer.getElementsByTagName("select"), "change", toolbarChanged); - return urlConfigContainer; - } - - function abortTestsButton() { - var button = document$1.createElement("button"); - button.id = "qunit-abort-tests-button"; - button.innerHTML = "Abort"; - addEvent(button, "click", abortTests); - return button; - } - - function toolbarLooseFilter() { - var filter = document$1.createElement("form"), - label = document$1.createElement("label"), - input = document$1.createElement("input"), - button = document$1.createElement("button"); - addClass(filter, "qunit-filter"); - label.innerHTML = "Filter: "; - input.type = "text"; - input.value = config.filter || ""; - input.name = "filter"; - input.id = "qunit-filter-input"; - button.innerHTML = "Go"; - label.appendChild(input); - filter.appendChild(label); - filter.appendChild(document$1.createTextNode(" ")); - filter.appendChild(button); - addEvent(filter, "submit", interceptNavigation); - return filter; - } - - function moduleListHtml(modules) { - var i, - checked, - html = ""; - - for (i = 0; i < modules.length; i++) { - if (modules[i].name !== "") { - checked = config.moduleId.indexOf(modules[i].moduleId) > -1; - html += "
  • "; - } - } - - return html; - } - - function toolbarModuleFilter() { - var commit, - reset, - moduleFilter = document$1.createElement("form"), - label = document$1.createElement("label"), - moduleSearch = document$1.createElement("input"), - dropDown = document$1.createElement("div"), - actions = document$1.createElement("span"), - applyButton = document$1.createElement("button"), - resetButton = document$1.createElement("button"), - allModulesLabel = document$1.createElement("label"), - allCheckbox = document$1.createElement("input"), - dropDownList = document$1.createElement("ul"), - dirty = false; - moduleSearch.id = "qunit-modulefilter-search"; - moduleSearch.autocomplete = "off"; - addEvent(moduleSearch, "input", searchInput); - addEvent(moduleSearch, "input", searchFocus); - addEvent(moduleSearch, "focus", searchFocus); - addEvent(moduleSearch, "click", searchFocus); - config.modules.forEach(function (module) { - return module.namePrepared = fuzzysort.prepare(module.name); - }); - label.id = "qunit-modulefilter-search-container"; - label.innerHTML = "Module: "; - label.appendChild(moduleSearch); - applyButton.textContent = "Apply"; - applyButton.style.display = "none"; - resetButton.textContent = "Reset"; - resetButton.type = "reset"; - resetButton.style.display = "none"; - allCheckbox.type = "checkbox"; - allCheckbox.checked = config.moduleId.length === 0; - allModulesLabel.className = "clickable"; - - if (config.moduleId.length) { - allModulesLabel.className = "checked"; - } - - allModulesLabel.appendChild(allCheckbox); - allModulesLabel.appendChild(document$1.createTextNode("All modules")); - actions.id = "qunit-modulefilter-actions"; - actions.appendChild(applyButton); - actions.appendChild(resetButton); - actions.appendChild(allModulesLabel); - commit = actions.firstChild; - reset = commit.nextSibling; - addEvent(commit, "click", applyUrlParams); - dropDownList.id = "qunit-modulefilter-dropdown-list"; - dropDownList.innerHTML = moduleListHtml(config.modules); - dropDown.id = "qunit-modulefilter-dropdown"; - dropDown.style.display = "none"; - dropDown.appendChild(actions); - dropDown.appendChild(dropDownList); - addEvent(dropDown, "change", selectionChange); - selectionChange(); - moduleFilter.id = "qunit-modulefilter"; - moduleFilter.appendChild(label); - moduleFilter.appendChild(dropDown); - addEvent(moduleFilter, "submit", interceptNavigation); - addEvent(moduleFilter, "reset", function () { - // Let the reset happen, then update styles - window$1.setTimeout(selectionChange); - }); // Enables show/hide for the dropdown - - function searchFocus() { - if (dropDown.style.display !== "none") { - return; - } - - dropDown.style.display = "block"; - addEvent(document$1, "click", hideHandler); - addEvent(document$1, "keydown", hideHandler); // Hide on Escape keydown or outside-container click - - function hideHandler(e) { - var inContainer = moduleFilter.contains(e.target); - - if (e.keyCode === 27 || !inContainer) { - if (e.keyCode === 27 && inContainer) { - moduleSearch.focus(); - } - - dropDown.style.display = "none"; - removeEvent(document$1, "click", hideHandler); - removeEvent(document$1, "keydown", hideHandler); - moduleSearch.value = ""; - searchInput(); - } - } - } - - function filterModules(searchText) { - if (searchText === "") { - return config.modules; - } - - return fuzzysort.go(searchText, config.modules, { - key: "namePrepared", - threshold: -10000 - }).map(function (module) { - return module.obj; - }); - } // Processes module search box input - - - var searchInputTimeout; - - function searchInput() { - window$1.clearTimeout(searchInputTimeout); - searchInputTimeout = window$1.setTimeout(function () { - var searchText = moduleSearch.value.toLowerCase(), - filteredModules = filterModules(searchText); - dropDownList.innerHTML = moduleListHtml(filteredModules); - }, 200); - } // Processes selection changes - - - function selectionChange(evt) { - var i, - item, - checkbox = evt && evt.target || allCheckbox, - modulesList = dropDownList.getElementsByTagName("input"), - selectedNames = []; - toggleClass(checkbox.parentNode, "checked", checkbox.checked); - dirty = false; - - if (checkbox.checked && checkbox !== allCheckbox) { - allCheckbox.checked = false; - removeClass(allCheckbox.parentNode, "checked"); - } - - for (i = 0; i < modulesList.length; i++) { - item = modulesList[i]; - - if (!evt) { - toggleClass(item.parentNode, "checked", item.checked); - } else if (checkbox === allCheckbox && checkbox.checked) { - item.checked = false; - removeClass(item.parentNode, "checked"); - } - - dirty = dirty || item.checked !== item.defaultChecked; - - if (item.checked) { - selectedNames.push(item.parentNode.textContent); - } - } - - commit.style.display = reset.style.display = dirty ? "" : "none"; - moduleSearch.placeholder = selectedNames.join(", ") || allCheckbox.parentNode.textContent; - moduleSearch.title = "Type to filter list. Current selection:\n" + (selectedNames.join("\n") || allCheckbox.parentNode.textContent); - } - - return moduleFilter; - } - - function toolbarFilters() { - var toolbarFilters = document$1.createElement("span"); - toolbarFilters.id = "qunit-toolbar-filters"; - toolbarFilters.appendChild(toolbarLooseFilter()); - toolbarFilters.appendChild(toolbarModuleFilter()); - return toolbarFilters; - } - - function appendToolbar() { - var toolbar = id("qunit-testrunner-toolbar"); - - if (toolbar) { - toolbar.appendChild(toolbarUrlConfigContainer()); - toolbar.appendChild(toolbarFilters()); - toolbar.appendChild(document$1.createElement("div")).className = "clearfix"; - } - } - - function appendHeader() { - var header = id("qunit-header"); - - if (header) { - header.innerHTML = "" + header.innerHTML + " "; - } - } - - function appendBanner() { - var banner = id("qunit-banner"); - - if (banner) { - banner.className = ""; - } - } - - function appendTestResults() { - var tests = id("qunit-tests"), - result = id("qunit-testresult"), - controls; - - if (result) { - result.parentNode.removeChild(result); - } - - if (tests) { - tests.innerHTML = ""; - result = document$1.createElement("p"); - result.id = "qunit-testresult"; - result.className = "result"; - tests.parentNode.insertBefore(result, tests); - result.innerHTML = "
    Running...
     
    " + "
    " + "
    "; - controls = id("qunit-testresult-controls"); - } - - if (controls) { - controls.appendChild(abortTestsButton()); - } - } - - function appendFilteredTest() { - var testId = QUnit.config.testId; - - if (!testId || testId.length <= 0) { - return ""; - } - - return "
    Rerunning selected tests: " + escapeText(testId.join(", ")) + " Run all tests
    "; - } - - function appendUserAgent() { - var userAgent = id("qunit-userAgent"); - - if (userAgent) { - userAgent.innerHTML = ""; - userAgent.appendChild(document$1.createTextNode("QUnit " + QUnit.version + "; " + navigator.userAgent)); - } - } - - function appendInterface() { - var qunit = id("qunit"); // For compat with QUnit 1.2, and to support fully custom theme HTML, - // we will use any existing elements if no id="qunit" element exists. - // - // Note that we don't fail or fallback to creating it ourselves, - // because not having id="qunit" (and not having the below elements) - // simply means QUnit acts headless, allowing users to use their own - // reporters, or for a test runner to listen for events directly without - // having the HTML reporter actively render anything. - - if (qunit) { - // Since QUnit 1.3, these are created automatically if the page - // contains id="qunit". - qunit.innerHTML = "

    " + escapeText(document$1.title) + "

    " + "

    " + "
    " + appendFilteredTest() + "

    " + "
      "; - } - - appendHeader(); - appendBanner(); - appendTestResults(); - appendUserAgent(); - appendToolbar(); - } - - function appendTest(name, testId, moduleName) { - var title, - rerunTrigger, - testBlock, - assertList, - tests = id("qunit-tests"); - - if (!tests) { - return; - } - - title = document$1.createElement("strong"); - title.innerHTML = getNameHtml(name, moduleName); - rerunTrigger = document$1.createElement("a"); - rerunTrigger.innerHTML = "Rerun"; - rerunTrigger.href = setUrl({ - testId: testId - }); - testBlock = document$1.createElement("li"); - testBlock.appendChild(title); - testBlock.appendChild(rerunTrigger); - testBlock.id = "qunit-test-output-" + testId; - assertList = document$1.createElement("ol"); - assertList.className = "qunit-assert-list"; - testBlock.appendChild(assertList); - tests.appendChild(testBlock); - } // HTML Reporter initialization and load - - - QUnit.begin(function () { - // Initialize QUnit elements - appendInterface(); - }); - QUnit.done(function (details) { - var banner = id("qunit-banner"), - tests = id("qunit-tests"), - abortButton = id("qunit-abort-tests-button"), - totalTests = stats.passedTests + stats.skippedTests + stats.todoTests + stats.failedTests, - html = [totalTests, " tests completed in ", details.runtime, " milliseconds, with ", stats.failedTests, " failed, ", stats.skippedTests, " skipped, and ", stats.todoTests, " todo.
      ", "", details.passed, " assertions of ", details.total, " passed, ", details.failed, " failed."].join(""), - test, - assertLi, - assertList; // Update remaining tests to aborted - - if (abortButton && abortButton.disabled) { - html = "Tests aborted after " + details.runtime + " milliseconds."; - - for (var i = 0; i < tests.children.length; i++) { - test = tests.children[i]; - - if (test.className === "" || test.className === "running") { - test.className = "aborted"; - assertList = test.getElementsByTagName("ol")[0]; - assertLi = document$1.createElement("li"); - assertLi.className = "fail"; - assertLi.innerHTML = "Test aborted."; - assertList.appendChild(assertLi); - } - } - } - - if (banner && (!abortButton || abortButton.disabled === false)) { - banner.className = stats.failedTests ? "qunit-fail" : "qunit-pass"; - } - - if (abortButton) { - abortButton.parentNode.removeChild(abortButton); - } - - if (tests) { - id("qunit-testresult-display").innerHTML = html; - } - - if (config.altertitle && document$1.title) { - // Show ✖ for good, ✔ for bad suite result in title - // use escape sequences in case file gets loaded with non-utf-8 - // charset - document$1.title = [stats.failedTests ? "\u2716" : "\u2714", document$1.title.replace(/^[\u2714\u2716] /i, "")].join(" "); - } // Scroll back to top to show results - - - if (config.scrolltop && window$1.scrollTo) { - window$1.scrollTo(0, 0); - } - }); - - function getNameHtml(name, module) { - var nameHtml = ""; - - if (module) { - nameHtml = "" + escapeText(module) + ": "; - } - - nameHtml += "" + escapeText(name) + ""; - return nameHtml; - } - - function getProgressHtml(runtime, stats, total) { - var completed = stats.passedTests + stats.skippedTests + stats.todoTests + stats.failedTests; - return ["
      ", completed, " / ", total, " tests completed in ", runtime, " milliseconds, with ", stats.failedTests, " failed, ", stats.skippedTests, " skipped, and ", stats.todoTests, " todo."].join(""); - } - - QUnit.testStart(function (details) { - var running, bad; - appendTest(details.name, details.testId, details.module); - running = id("qunit-testresult-display"); - - if (running) { - addClass(running, "running"); - bad = QUnit.config.reorder && details.previousFailure; - running.innerHTML = [bad ? "Rerunning previously failed test:
      " : "Running:
      ", getNameHtml(details.name, details.module), getProgressHtml(now() - config.started, stats, Test.count)].join(""); - } - }); - - function stripHtml(string) { - // Strip tags, html entity and whitespaces - return string.replace(/<\/?[^>]+(>|$)/g, "").replace(/"/g, "").replace(/\s+/g, ""); - } - - QUnit.log(function (details) { - var assertList, - assertLi, - message, - expected, - actual, - diff, - showDiff = false, - testItem = id("qunit-test-output-" + details.testId); - - if (!testItem) { - return; - } - - message = escapeText(details.message) || (details.result ? "okay" : "failed"); - message = "" + message + ""; - message += "@ " + details.runtime + " ms"; // The pushFailure doesn't provide details.expected - // when it calls, it's implicit to also not show expected and diff stuff - // Also, we need to check details.expected existence, as it can exist and be undefined - - if (!details.result && hasOwn.call(details, "expected")) { - if (details.negative) { - expected = "NOT " + QUnit.dump.parse(details.expected); - } else { - expected = QUnit.dump.parse(details.expected); - } - - actual = QUnit.dump.parse(details.actual); - message += ""; - - if (actual !== expected) { - message += ""; - - if (typeof details.actual === "number" && typeof details.expected === "number") { - if (!isNaN(details.actual) && !isNaN(details.expected)) { - showDiff = true; - diff = details.actual - details.expected; - diff = (diff > 0 ? "+" : "") + diff; - } - } else if (typeof details.actual !== "boolean" && typeof details.expected !== "boolean") { - diff = QUnit.diff(expected, actual); // don't show diff if there is zero overlap - - showDiff = stripHtml(diff).length !== stripHtml(expected).length + stripHtml(actual).length; - } - - if (showDiff) { - message += ""; - } - } else if (expected.indexOf("[object Array]") !== -1 || expected.indexOf("[object Object]") !== -1) { - message += ""; - } else { - message += ""; - } - - if (details.source) { - message += ""; - } - - message += "
      Expected:
      " + escapeText(expected) + "
      Result:
      " + escapeText(actual) + "
      Diff:
      " + diff + "
      Message: " + "Diff suppressed as the depth of object is more than current max depth (" + QUnit.config.maxDepth + ").

      Hint: Use QUnit.dump.maxDepth to " + " run with a higher max depth or " + "Rerun without max depth.

      Message: " + "Diff suppressed as the expected and actual results have an equivalent" + " serialization
      Source:
      " + escapeText(details.source) + "
      "; // This occurs when pushFailure is set and we have an extracted stack trace - } else if (!details.result && details.source) { - message += "" + "" + "
      Source:
      " + escapeText(details.source) + "
      "; - } - - assertList = testItem.getElementsByTagName("ol")[0]; - assertLi = document$1.createElement("li"); - assertLi.className = details.result ? "pass" : "fail"; - assertLi.innerHTML = message; - assertList.appendChild(assertLi); - }); - QUnit.testDone(function (details) { - var testTitle, - time, - testItem, - assertList, - status, - good, - bad, - testCounts, - skipped, - sourceName, - tests = id("qunit-tests"); - - if (!tests) { - return; - } - - testItem = id("qunit-test-output-" + details.testId); - removeClass(testItem, "running"); - - if (details.failed > 0) { - status = "failed"; - } else if (details.todo) { - status = "todo"; - } else { - status = details.skipped ? "skipped" : "passed"; - } - - assertList = testItem.getElementsByTagName("ol")[0]; - good = details.passed; - bad = details.failed; // This test passed if it has no unexpected failed assertions - - var testPassed = details.failed > 0 ? details.todo : !details.todo; - - if (testPassed) { - // Collapse the passing tests - addClass(assertList, "qunit-collapsed"); - } else if (config.collapse) { - if (!collapseNext) { - // Skip collapsing the first failing test - collapseNext = true; - } else { - // Collapse remaining tests - addClass(assertList, "qunit-collapsed"); - } - } // The testItem.firstChild is the test name - - - testTitle = testItem.firstChild; - testCounts = bad ? "" + bad + ", " + "" + good + ", " : ""; - testTitle.innerHTML += " (" + testCounts + details.assertions.length + ")"; - - if (details.skipped) { - stats.skippedTests++; - testItem.className = "skipped"; - skipped = document$1.createElement("em"); - skipped.className = "qunit-skipped-label"; - skipped.innerHTML = "skipped"; - testItem.insertBefore(skipped, testTitle); - } else { - addEvent(testTitle, "click", function () { - toggleClass(assertList, "qunit-collapsed"); - }); - testItem.className = testPassed ? "pass" : "fail"; - - if (details.todo) { - var todoLabel = document$1.createElement("em"); - todoLabel.className = "qunit-todo-label"; - todoLabel.innerHTML = "todo"; - testItem.className += " todo"; - testItem.insertBefore(todoLabel, testTitle); - } - - time = document$1.createElement("span"); - time.className = "runtime"; - time.innerHTML = details.runtime + " ms"; - testItem.insertBefore(time, assertList); - - if (!testPassed) { - stats.failedTests++; - } else if (details.todo) { - stats.todoTests++; - } else { - stats.passedTests++; - } - } // Show the source of the test when showing assertions - - - if (details.source) { - sourceName = document$1.createElement("p"); - sourceName.innerHTML = "Source: " + escapeText(details.source); - addClass(sourceName, "qunit-source"); - - if (testPassed) { - addClass(sourceName, "qunit-collapsed"); - } - - addEvent(testTitle, "click", function () { - toggleClass(sourceName, "qunit-collapsed"); - }); - testItem.appendChild(sourceName); - } - - if (config.hidepassed && (status === "passed" || details.skipped)) { - // use removeChild instead of remove because of support - hiddenTests.push(testItem); - tests.removeChild(testItem); - } - }); // Avoid readyState issue with phantomjs - // Ref: #818 - - var notPhantom = function (p) { - return !(p && p.version && p.version.major > 0); - }(window$1.phantom); - - if (notPhantom && document$1.readyState === "complete") { - QUnit.load(); - } else { - addEvent(window$1, "load", QUnit.load); - } // Wrap window.onerror. We will call the original window.onerror to see if - // the existing handler fully handles the error; if not, we will call the - // QUnit.onError function. - - - var originalWindowOnError = window$1.onerror; // Cover uncaught exceptions - // Returning true will suppress the default browser handler, - // returning false will let it run. - - window$1.onerror = function (message, fileName, lineNumber, columnNumber, errorObj) { - var ret = false; - - if (originalWindowOnError) { - for (var _len = arguments.length, args = new Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) { - args[_key - 5] = arguments[_key]; - } - - ret = originalWindowOnError.call.apply(originalWindowOnError, [this, message, fileName, lineNumber, columnNumber, errorObj].concat(args)); - } // Treat return value as window.onerror itself does, - // Only do our handling if not suppressed. - - - if (ret !== true) { - var error = { - message: message, - fileName: fileName, - lineNumber: lineNumber - }; // According to - // https://blog.sentry.io/2016/01/04/client-javascript-reporting-window-onerror, - // most modern browsers support an errorObj argument; use that to - // get a full stack trace if it's available. - - if (errorObj && errorObj.stack) { - error.stacktrace = extractStacktrace(errorObj, 0); - } - - ret = QUnit.onError(error); - } - - return ret; - }; // Listen for unhandled rejections, and call QUnit.onUnhandledRejection - - - window$1.addEventListener("unhandledrejection", function (event) { - QUnit.onUnhandledRejection(event.reason); - }); - })(); - - /* - * This file is a modified version of google-diff-match-patch's JavaScript implementation - * (https://code.google.com/p/google-diff-match-patch/source/browse/trunk/javascript/diff_match_patch_uncompressed.js), - * modifications are licensed as more fully set forth in LICENSE.txt. - * - * The original source of google-diff-match-patch is attributable and licensed as follows: - * - * Copyright 2006 Google Inc. - * https://code.google.com/p/google-diff-match-patch/ - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * https://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * More Info: - * https://code.google.com/p/google-diff-match-patch/ - * - * Usage: QUnit.diff(expected, actual) - * - */ - - QUnit.diff = function () { - function DiffMatchPatch() {} // DIFF FUNCTIONS - - /** - * The data structure representing a diff is an array of tuples: - * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']] - * which means: delete 'Hello', add 'Goodbye' and keep ' world.' - */ - - - var DIFF_DELETE = -1, - DIFF_INSERT = 1, - DIFF_EQUAL = 0, - hasOwn = Object.prototype.hasOwnProperty; - /** - * Find the differences between two texts. Simplifies the problem by stripping - * any common prefix or suffix off the texts before diffing. - * @param {string} text1 Old string to be diffed. - * @param {string} text2 New string to be diffed. - * @param {boolean=} optChecklines Optional speedup flag. If present and false, - * then don't run a line-level diff first to identify the changed areas. - * Defaults to true, which does a faster, slightly less optimal diff. - * @return {!Array.} Array of diff tuples. - */ - - DiffMatchPatch.prototype.DiffMain = function (text1, text2, optChecklines) { - var deadline, checklines, commonlength, commonprefix, commonsuffix, diffs; // The diff must be complete in up to 1 second. - - deadline = new Date().getTime() + 1000; // Check for null inputs. - - if (text1 === null || text2 === null) { - throw new Error("Null input. (DiffMain)"); - } // Check for equality (speedup). - - - if (text1 === text2) { - if (text1) { - return [[DIFF_EQUAL, text1]]; - } - - return []; - } - - if (typeof optChecklines === "undefined") { - optChecklines = true; - } - - checklines = optChecklines; // Trim off common prefix (speedup). - - commonlength = this.diffCommonPrefix(text1, text2); - commonprefix = text1.substring(0, commonlength); - text1 = text1.substring(commonlength); - text2 = text2.substring(commonlength); // Trim off common suffix (speedup). - - commonlength = this.diffCommonSuffix(text1, text2); - commonsuffix = text1.substring(text1.length - commonlength); - text1 = text1.substring(0, text1.length - commonlength); - text2 = text2.substring(0, text2.length - commonlength); // Compute the diff on the middle block. - - diffs = this.diffCompute(text1, text2, checklines, deadline); // Restore the prefix and suffix. - - if (commonprefix) { - diffs.unshift([DIFF_EQUAL, commonprefix]); - } - - if (commonsuffix) { - diffs.push([DIFF_EQUAL, commonsuffix]); - } - - this.diffCleanupMerge(diffs); - return diffs; - }; - /** - * Reduce the number of edits by eliminating operationally trivial equalities. - * @param {!Array.} diffs Array of diff tuples. - */ - - - DiffMatchPatch.prototype.diffCleanupEfficiency = function (diffs) { - var changes, equalities, equalitiesLength, lastequality, pointer, preIns, preDel, postIns, postDel; - changes = false; - equalities = []; // Stack of indices where equalities are found. - - equalitiesLength = 0; // Keeping our own length var is faster in JS. - - /** @type {?string} */ - - lastequality = null; // Always equal to diffs[equalities[equalitiesLength - 1]][1] - - pointer = 0; // Index of current position. - // Is there an insertion operation before the last equality. - - preIns = false; // Is there a deletion operation before the last equality. - - preDel = false; // Is there an insertion operation after the last equality. - - postIns = false; // Is there a deletion operation after the last equality. - - postDel = false; - - while (pointer < diffs.length) { - // Equality found. - if (diffs[pointer][0] === DIFF_EQUAL) { - if (diffs[pointer][1].length < 4 && (postIns || postDel)) { - // Candidate found. - equalities[equalitiesLength++] = pointer; - preIns = postIns; - preDel = postDel; - lastequality = diffs[pointer][1]; - } else { - // Not a candidate, and can never become one. - equalitiesLength = 0; - lastequality = null; - } - - postIns = postDel = false; // An insertion or deletion. - } else { - if (diffs[pointer][0] === DIFF_DELETE) { - postDel = true; - } else { - postIns = true; - } - /* - * Five types to be split: - * ABXYCD - * AXCD - * ABXC - * AXCD - * ABXC - */ - - - if (lastequality && (preIns && preDel && postIns && postDel || lastequality.length < 2 && preIns + preDel + postIns + postDel === 3)) { - // Duplicate record. - diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]); // Change second copy to insert. - - diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT; - equalitiesLength--; // Throw away the equality we just deleted; - - lastequality = null; - - if (preIns && preDel) { - // No changes made which could affect previous entry, keep going. - postIns = postDel = true; - equalitiesLength = 0; - } else { - equalitiesLength--; // Throw away the previous equality. - - pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1; - postIns = postDel = false; - } - - changes = true; - } - } - - pointer++; - } - - if (changes) { - this.diffCleanupMerge(diffs); - } - }; - /** - * Convert a diff array into a pretty HTML report. - * @param {!Array.} diffs Array of diff tuples. - * @param {integer} string to be beautified. - * @return {string} HTML representation. - */ - - - DiffMatchPatch.prototype.diffPrettyHtml = function (diffs) { - var op, - data, - x, - html = []; - - for (x = 0; x < diffs.length; x++) { - op = diffs[x][0]; // Operation (insert, delete, equal) - - data = diffs[x][1]; // Text of change. - - switch (op) { - case DIFF_INSERT: - html[x] = "" + escapeText(data) + ""; - break; - - case DIFF_DELETE: - html[x] = "" + escapeText(data) + ""; - break; - - case DIFF_EQUAL: - html[x] = "" + escapeText(data) + ""; - break; - } - } - - return html.join(""); - }; - /** - * Determine the common prefix of two strings. - * @param {string} text1 First string. - * @param {string} text2 Second string. - * @return {number} The number of characters common to the start of each - * string. - */ - - - DiffMatchPatch.prototype.diffCommonPrefix = function (text1, text2) { - var pointermid, pointermax, pointermin, pointerstart; // Quick check for common null cases. - - if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) { - return 0; - } // Binary search. - // Performance analysis: https://neil.fraser.name/news/2007/10/09/ - - - pointermin = 0; - pointermax = Math.min(text1.length, text2.length); - pointermid = pointermax; - pointerstart = 0; - - while (pointermin < pointermid) { - if (text1.substring(pointerstart, pointermid) === text2.substring(pointerstart, pointermid)) { - pointermin = pointermid; - pointerstart = pointermin; - } else { - pointermax = pointermid; - } - - pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); - } - - return pointermid; - }; - /** - * Determine the common suffix of two strings. - * @param {string} text1 First string. - * @param {string} text2 Second string. - * @return {number} The number of characters common to the end of each string. - */ - - - DiffMatchPatch.prototype.diffCommonSuffix = function (text1, text2) { - var pointermid, pointermax, pointermin, pointerend; // Quick check for common null cases. - - if (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) { - return 0; - } // Binary search. - // Performance analysis: https://neil.fraser.name/news/2007/10/09/ - - - pointermin = 0; - pointermax = Math.min(text1.length, text2.length); - pointermid = pointermax; - pointerend = 0; - - while (pointermin < pointermid) { - if (text1.substring(text1.length - pointermid, text1.length - pointerend) === text2.substring(text2.length - pointermid, text2.length - pointerend)) { - pointermin = pointermid; - pointerend = pointermin; - } else { - pointermax = pointermid; - } - - pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin); - } - - return pointermid; - }; - /** - * Find the differences between two texts. Assumes that the texts do not - * have any common prefix or suffix. - * @param {string} text1 Old string to be diffed. - * @param {string} text2 New string to be diffed. - * @param {boolean} checklines Speedup flag. If false, then don't run a - * line-level diff first to identify the changed areas. - * If true, then run a faster, slightly less optimal diff. - * @param {number} deadline Time when the diff should be complete by. - * @return {!Array.} Array of diff tuples. - * @private - */ - - - DiffMatchPatch.prototype.diffCompute = function (text1, text2, checklines, deadline) { - var diffs, longtext, shorttext, i, hm, text1A, text2A, text1B, text2B, midCommon, diffsA, diffsB; - - if (!text1) { - // Just add some text (speedup). - return [[DIFF_INSERT, text2]]; - } - - if (!text2) { - // Just delete some text (speedup). - return [[DIFF_DELETE, text1]]; - } - - longtext = text1.length > text2.length ? text1 : text2; - shorttext = text1.length > text2.length ? text2 : text1; - i = longtext.indexOf(shorttext); - - if (i !== -1) { - // Shorter text is inside the longer text (speedup). - diffs = [[DIFF_INSERT, longtext.substring(0, i)], [DIFF_EQUAL, shorttext], [DIFF_INSERT, longtext.substring(i + shorttext.length)]]; // Swap insertions for deletions if diff is reversed. - - if (text1.length > text2.length) { - diffs[0][0] = diffs[2][0] = DIFF_DELETE; - } - - return diffs; - } - - if (shorttext.length === 1) { - // Single character string. - // After the previous speedup, the character can't be an equality. - return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]]; - } // Check to see if the problem can be split in two. - - - hm = this.diffHalfMatch(text1, text2); - - if (hm) { - // A half-match was found, sort out the return data. - text1A = hm[0]; - text1B = hm[1]; - text2A = hm[2]; - text2B = hm[3]; - midCommon = hm[4]; // Send both pairs off for separate processing. - - diffsA = this.DiffMain(text1A, text2A, checklines, deadline); - diffsB = this.DiffMain(text1B, text2B, checklines, deadline); // Merge the results. - - return diffsA.concat([[DIFF_EQUAL, midCommon]], diffsB); - } - - if (checklines && text1.length > 100 && text2.length > 100) { - return this.diffLineMode(text1, text2, deadline); - } - - return this.diffBisect(text1, text2, deadline); - }; - /** - * Do the two texts share a substring which is at least half the length of the - * longer text? - * This speedup can produce non-minimal diffs. - * @param {string} text1 First string. - * @param {string} text2 Second string. - * @return {Array.} Five element Array, containing the prefix of - * text1, the suffix of text1, the prefix of text2, the suffix of - * text2 and the common middle. Or null if there was no match. - * @private - */ - - - DiffMatchPatch.prototype.diffHalfMatch = function (text1, text2) { - var longtext, shorttext, dmp, text1A, text2B, text2A, text1B, midCommon, hm1, hm2, hm; - longtext = text1.length > text2.length ? text1 : text2; - shorttext = text1.length > text2.length ? text2 : text1; - - if (longtext.length < 4 || shorttext.length * 2 < longtext.length) { - return null; // Pointless. - } - - dmp = this; // 'this' becomes 'window' in a closure. - - /** - * Does a substring of shorttext exist within longtext such that the substring - * is at least half the length of longtext? - * Closure, but does not reference any external variables. - * @param {string} longtext Longer string. - * @param {string} shorttext Shorter string. - * @param {number} i Start index of quarter length substring within longtext. - * @return {Array.} Five element Array, containing the prefix of - * longtext, the suffix of longtext, the prefix of shorttext, the suffix - * of shorttext and the common middle. Or null if there was no match. - * @private - */ - - function diffHalfMatchI(longtext, shorttext, i) { - var seed, j, bestCommon, prefixLength, suffixLength, bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB; // Start with a 1/4 length substring at position i as a seed. - - seed = longtext.substring(i, i + Math.floor(longtext.length / 4)); - j = -1; - bestCommon = ""; - - while ((j = shorttext.indexOf(seed, j + 1)) !== -1) { - prefixLength = dmp.diffCommonPrefix(longtext.substring(i), shorttext.substring(j)); - suffixLength = dmp.diffCommonSuffix(longtext.substring(0, i), shorttext.substring(0, j)); - - if (bestCommon.length < suffixLength + prefixLength) { - bestCommon = shorttext.substring(j - suffixLength, j) + shorttext.substring(j, j + prefixLength); - bestLongtextA = longtext.substring(0, i - suffixLength); - bestLongtextB = longtext.substring(i + prefixLength); - bestShorttextA = shorttext.substring(0, j - suffixLength); - bestShorttextB = shorttext.substring(j + prefixLength); - } - } - - if (bestCommon.length * 2 >= longtext.length) { - return [bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB, bestCommon]; - } else { - return null; - } - } // First check if the second quarter is the seed for a half-match. - - - hm1 = diffHalfMatchI(longtext, shorttext, Math.ceil(longtext.length / 4)); // Check again based on the third quarter. - - hm2 = diffHalfMatchI(longtext, shorttext, Math.ceil(longtext.length / 2)); - - if (!hm1 && !hm2) { - return null; - } else if (!hm2) { - hm = hm1; - } else if (!hm1) { - hm = hm2; - } else { - // Both matched. Select the longest. - hm = hm1[4].length > hm2[4].length ? hm1 : hm2; - } // A half-match was found, sort out the return data. - - - if (text1.length > text2.length) { - text1A = hm[0]; - text1B = hm[1]; - text2A = hm[2]; - text2B = hm[3]; - } else { - text2A = hm[0]; - text2B = hm[1]; - text1A = hm[2]; - text1B = hm[3]; - } - - midCommon = hm[4]; - return [text1A, text1B, text2A, text2B, midCommon]; - }; - /** - * Do a quick line-level diff on both strings, then rediff the parts for - * greater accuracy. - * This speedup can produce non-minimal diffs. - * @param {string} text1 Old string to be diffed. - * @param {string} text2 New string to be diffed. - * @param {number} deadline Time when the diff should be complete by. - * @return {!Array.} Array of diff tuples. - * @private - */ - - - DiffMatchPatch.prototype.diffLineMode = function (text1, text2, deadline) { - var a, diffs, linearray, pointer, countInsert, countDelete, textInsert, textDelete, j; // Scan the text on a line-by-line basis first. - - a = this.diffLinesToChars(text1, text2); - text1 = a.chars1; - text2 = a.chars2; - linearray = a.lineArray; - diffs = this.DiffMain(text1, text2, false, deadline); // Convert the diff back to original text. - - this.diffCharsToLines(diffs, linearray); // Eliminate freak matches (e.g. blank lines) - - this.diffCleanupSemantic(diffs); // Rediff any replacement blocks, this time character-by-character. - // Add a dummy entry at the end. - - diffs.push([DIFF_EQUAL, ""]); - pointer = 0; - countDelete = 0; - countInsert = 0; - textDelete = ""; - textInsert = ""; - - while (pointer < diffs.length) { - switch (diffs[pointer][0]) { - case DIFF_INSERT: - countInsert++; - textInsert += diffs[pointer][1]; - break; - - case DIFF_DELETE: - countDelete++; - textDelete += diffs[pointer][1]; - break; - - case DIFF_EQUAL: - // Upon reaching an equality, check for prior redundancies. - if (countDelete >= 1 && countInsert >= 1) { - // Delete the offending records and add the merged ones. - diffs.splice(pointer - countDelete - countInsert, countDelete + countInsert); - pointer = pointer - countDelete - countInsert; - a = this.DiffMain(textDelete, textInsert, false, deadline); - - for (j = a.length - 1; j >= 0; j--) { - diffs.splice(pointer, 0, a[j]); - } - - pointer = pointer + a.length; - } - - countInsert = 0; - countDelete = 0; - textDelete = ""; - textInsert = ""; - break; - } - - pointer++; - } - - diffs.pop(); // Remove the dummy entry at the end. - - return diffs; - }; - /** - * Find the 'middle snake' of a diff, split the problem in two - * and return the recursively constructed diff. - * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations. - * @param {string} text1 Old string to be diffed. - * @param {string} text2 New string to be diffed. - * @param {number} deadline Time at which to bail if not yet complete. - * @return {!Array.} Array of diff tuples. - * @private - */ - - - DiffMatchPatch.prototype.diffBisect = function (text1, text2, deadline) { - var text1Length, text2Length, maxD, vOffset, vLength, v1, v2, x, delta, front, k1start, k1end, k2start, k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2; // Cache the text lengths to prevent multiple calls. - - text1Length = text1.length; - text2Length = text2.length; - maxD = Math.ceil((text1Length + text2Length) / 2); - vOffset = maxD; - vLength = 2 * maxD; - v1 = new Array(vLength); - v2 = new Array(vLength); // Setting all elements to -1 is faster in Chrome & Firefox than mixing - // integers and undefined. - - for (x = 0; x < vLength; x++) { - v1[x] = -1; - v2[x] = -1; - } - - v1[vOffset + 1] = 0; - v2[vOffset + 1] = 0; - delta = text1Length - text2Length; // If the total number of characters is odd, then the front path will collide - // with the reverse path. - - front = delta % 2 !== 0; // Offsets for start and end of k loop. - // Prevents mapping of space beyond the grid. - - k1start = 0; - k1end = 0; - k2start = 0; - k2end = 0; - - for (d = 0; d < maxD; d++) { - // Bail out if deadline is reached. - if (new Date().getTime() > deadline) { - break; - } // Walk the front path one step. - - - for (k1 = -d + k1start; k1 <= d - k1end; k1 += 2) { - k1Offset = vOffset + k1; - - if (k1 === -d || k1 !== d && v1[k1Offset - 1] < v1[k1Offset + 1]) { - x1 = v1[k1Offset + 1]; - } else { - x1 = v1[k1Offset - 1] + 1; - } - - y1 = x1 - k1; - - while (x1 < text1Length && y1 < text2Length && text1.charAt(x1) === text2.charAt(y1)) { - x1++; - y1++; - } - - v1[k1Offset] = x1; - - if (x1 > text1Length) { - // Ran off the right of the graph. - k1end += 2; - } else if (y1 > text2Length) { - // Ran off the bottom of the graph. - k1start += 2; - } else if (front) { - k2Offset = vOffset + delta - k1; - - if (k2Offset >= 0 && k2Offset < vLength && v2[k2Offset] !== -1) { - // Mirror x2 onto top-left coordinate system. - x2 = text1Length - v2[k2Offset]; - - if (x1 >= x2) { - // Overlap detected. - return this.diffBisectSplit(text1, text2, x1, y1, deadline); - } - } - } - } // Walk the reverse path one step. - - - for (k2 = -d + k2start; k2 <= d - k2end; k2 += 2) { - k2Offset = vOffset + k2; - - if (k2 === -d || k2 !== d && v2[k2Offset - 1] < v2[k2Offset + 1]) { - x2 = v2[k2Offset + 1]; - } else { - x2 = v2[k2Offset - 1] + 1; - } - - y2 = x2 - k2; - - while (x2 < text1Length && y2 < text2Length && text1.charAt(text1Length - x2 - 1) === text2.charAt(text2Length - y2 - 1)) { - x2++; - y2++; - } - - v2[k2Offset] = x2; - - if (x2 > text1Length) { - // Ran off the left of the graph. - k2end += 2; - } else if (y2 > text2Length) { - // Ran off the top of the graph. - k2start += 2; - } else if (!front) { - k1Offset = vOffset + delta - k2; - - if (k1Offset >= 0 && k1Offset < vLength && v1[k1Offset] !== -1) { - x1 = v1[k1Offset]; - y1 = vOffset + x1 - k1Offset; // Mirror x2 onto top-left coordinate system. - - x2 = text1Length - x2; - - if (x1 >= x2) { - // Overlap detected. - return this.diffBisectSplit(text1, text2, x1, y1, deadline); - } - } - } - } - } // Diff took too long and hit the deadline or - // number of diffs equals number of characters, no commonality at all. - - - return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]]; - }; - /** - * Given the location of the 'middle snake', split the diff in two parts - * and recurse. - * @param {string} text1 Old string to be diffed. - * @param {string} text2 New string to be diffed. - * @param {number} x Index of split point in text1. - * @param {number} y Index of split point in text2. - * @param {number} deadline Time at which to bail if not yet complete. - * @return {!Array.} Array of diff tuples. - * @private - */ - - - DiffMatchPatch.prototype.diffBisectSplit = function (text1, text2, x, y, deadline) { - var text1a, text1b, text2a, text2b, diffs, diffsb; - text1a = text1.substring(0, x); - text2a = text2.substring(0, y); - text1b = text1.substring(x); - text2b = text2.substring(y); // Compute both diffs serially. - - diffs = this.DiffMain(text1a, text2a, false, deadline); - diffsb = this.DiffMain(text1b, text2b, false, deadline); - return diffs.concat(diffsb); - }; - /** - * Reduce the number of edits by eliminating semantically trivial equalities. - * @param {!Array.} diffs Array of diff tuples. - */ - - - DiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) { - var changes, equalities, equalitiesLength, lastequality, pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1, lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2; - changes = false; - equalities = []; // Stack of indices where equalities are found. - - equalitiesLength = 0; // Keeping our own length var is faster in JS. - - /** @type {?string} */ - - lastequality = null; // Always equal to diffs[equalities[equalitiesLength - 1]][1] - - pointer = 0; // Index of current position. - // Number of characters that changed prior to the equality. - - lengthInsertions1 = 0; - lengthDeletions1 = 0; // Number of characters that changed after the equality. - - lengthInsertions2 = 0; - lengthDeletions2 = 0; - - while (pointer < diffs.length) { - if (diffs[pointer][0] === DIFF_EQUAL) { - // Equality found. - equalities[equalitiesLength++] = pointer; - lengthInsertions1 = lengthInsertions2; - lengthDeletions1 = lengthDeletions2; - lengthInsertions2 = 0; - lengthDeletions2 = 0; - lastequality = diffs[pointer][1]; - } else { - // An insertion or deletion. - if (diffs[pointer][0] === DIFF_INSERT) { - lengthInsertions2 += diffs[pointer][1].length; - } else { - lengthDeletions2 += diffs[pointer][1].length; - } // Eliminate an equality that is smaller or equal to the edits on both - // sides of it. - - - if (lastequality && lastequality.length <= Math.max(lengthInsertions1, lengthDeletions1) && lastequality.length <= Math.max(lengthInsertions2, lengthDeletions2)) { - // Duplicate record. - diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]); // Change second copy to insert. - - diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT; // Throw away the equality we just deleted. - - equalitiesLength--; // Throw away the previous equality (it needs to be reevaluated). - - equalitiesLength--; - pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1; // Reset the counters. - - lengthInsertions1 = 0; - lengthDeletions1 = 0; - lengthInsertions2 = 0; - lengthDeletions2 = 0; - lastequality = null; - changes = true; - } - } - - pointer++; - } // Normalize the diff. - - - if (changes) { - this.diffCleanupMerge(diffs); - } // Find any overlaps between deletions and insertions. - // e.g: abcxxxxxxdef - // -> abcxxxdef - // e.g: xxxabcdefxxx - // -> defxxxabc - // Only extract an overlap if it is as big as the edit ahead or behind it. - - - pointer = 1; - - while (pointer < diffs.length) { - if (diffs[pointer - 1][0] === DIFF_DELETE && diffs[pointer][0] === DIFF_INSERT) { - deletion = diffs[pointer - 1][1]; - insertion = diffs[pointer][1]; - overlapLength1 = this.diffCommonOverlap(deletion, insertion); - overlapLength2 = this.diffCommonOverlap(insertion, deletion); - - if (overlapLength1 >= overlapLength2) { - if (overlapLength1 >= deletion.length / 2 || overlapLength1 >= insertion.length / 2) { - // Overlap found. Insert an equality and trim the surrounding edits. - diffs.splice(pointer, 0, [DIFF_EQUAL, insertion.substring(0, overlapLength1)]); - diffs[pointer - 1][1] = deletion.substring(0, deletion.length - overlapLength1); - diffs[pointer + 1][1] = insertion.substring(overlapLength1); - pointer++; - } - } else { - if (overlapLength2 >= deletion.length / 2 || overlapLength2 >= insertion.length / 2) { - // Reverse overlap found. - // Insert an equality and swap and trim the surrounding edits. - diffs.splice(pointer, 0, [DIFF_EQUAL, deletion.substring(0, overlapLength2)]); - diffs[pointer - 1][0] = DIFF_INSERT; - diffs[pointer - 1][1] = insertion.substring(0, insertion.length - overlapLength2); - diffs[pointer + 1][0] = DIFF_DELETE; - diffs[pointer + 1][1] = deletion.substring(overlapLength2); - pointer++; - } - } - - pointer++; - } - - pointer++; - } - }; - /** - * Determine if the suffix of one string is the prefix of another. - * @param {string} text1 First string. - * @param {string} text2 Second string. - * @return {number} The number of characters common to the end of the first - * string and the start of the second string. - * @private - */ - - - DiffMatchPatch.prototype.diffCommonOverlap = function (text1, text2) { - var text1Length, text2Length, textLength, best, length, pattern, found; // Cache the text lengths to prevent multiple calls. - - text1Length = text1.length; - text2Length = text2.length; // Eliminate the null case. - - if (text1Length === 0 || text2Length === 0) { - return 0; - } // Truncate the longer string. - - - if (text1Length > text2Length) { - text1 = text1.substring(text1Length - text2Length); - } else if (text1Length < text2Length) { - text2 = text2.substring(0, text1Length); - } - - textLength = Math.min(text1Length, text2Length); // Quick check for the worst case. - - if (text1 === text2) { - return textLength; - } // Start by looking for a single character match - // and increase length until no match is found. - // Performance analysis: https://neil.fraser.name/news/2010/11/04/ - - - best = 0; - length = 1; - - while (true) { - pattern = text1.substring(textLength - length); - found = text2.indexOf(pattern); - - if (found === -1) { - return best; - } - - length += found; - - if (found === 0 || text1.substring(textLength - length) === text2.substring(0, length)) { - best = length; - length++; - } - } - }; - /** - * Split two texts into an array of strings. Reduce the texts to a string of - * hashes where each Unicode character represents one line. - * @param {string} text1 First string. - * @param {string} text2 Second string. - * @return {{chars1: string, chars2: string, lineArray: !Array.}} - * An object containing the encoded text1, the encoded text2 and - * the array of unique strings. - * The zeroth element of the array of unique strings is intentionally blank. - * @private - */ - - - DiffMatchPatch.prototype.diffLinesToChars = function (text1, text2) { - var lineArray, lineHash, chars1, chars2; - lineArray = []; // E.g. lineArray[4] === 'Hello\n' - - lineHash = {}; // E.g. lineHash['Hello\n'] === 4 - // '\x00' is a valid character, but various debuggers don't like it. - // So we'll insert a junk entry to avoid generating a null character. - - lineArray[0] = ""; - /** - * Split a text into an array of strings. Reduce the texts to a string of - * hashes where each Unicode character represents one line. - * Modifies linearray and linehash through being a closure. - * @param {string} text String to encode. - * @return {string} Encoded string. - * @private - */ - - function diffLinesToCharsMunge(text) { - var chars, lineStart, lineEnd, lineArrayLength, line; - chars = ""; // Walk the text, pulling out a substring for each line. - // text.split('\n') would would temporarily double our memory footprint. - // Modifying text would create many large strings to garbage collect. - - lineStart = 0; - lineEnd = -1; // Keeping our own length variable is faster than looking it up. - - lineArrayLength = lineArray.length; - - while (lineEnd < text.length - 1) { - lineEnd = text.indexOf("\n", lineStart); - - if (lineEnd === -1) { - lineEnd = text.length - 1; - } - - line = text.substring(lineStart, lineEnd + 1); - lineStart = lineEnd + 1; - - if (hasOwn.call(lineHash, line)) { - chars += String.fromCharCode(lineHash[line]); - } else { - chars += String.fromCharCode(lineArrayLength); - lineHash[line] = lineArrayLength; - lineArray[lineArrayLength++] = line; - } - } - - return chars; - } - - chars1 = diffLinesToCharsMunge(text1); - chars2 = diffLinesToCharsMunge(text2); - return { - chars1: chars1, - chars2: chars2, - lineArray: lineArray - }; - }; - /** - * Rehydrate the text in a diff from a string of line hashes to real lines of - * text. - * @param {!Array.} diffs Array of diff tuples. - * @param {!Array.} lineArray Array of unique strings. - * @private - */ - - - DiffMatchPatch.prototype.diffCharsToLines = function (diffs, lineArray) { - var x, chars, text, y; - - for (x = 0; x < diffs.length; x++) { - chars = diffs[x][1]; - text = []; - - for (y = 0; y < chars.length; y++) { - text[y] = lineArray[chars.charCodeAt(y)]; - } - - diffs[x][1] = text.join(""); - } - }; - /** - * Reorder and merge like edit sections. Merge equalities. - * Any edit section can move as long as it doesn't cross an equality. - * @param {!Array.} diffs Array of diff tuples. - */ - - - DiffMatchPatch.prototype.diffCleanupMerge = function (diffs) { - var pointer, countDelete, countInsert, textInsert, textDelete, commonlength, changes, diffPointer, position; - diffs.push([DIFF_EQUAL, ""]); // Add a dummy entry at the end. - - pointer = 0; - countDelete = 0; - countInsert = 0; - textDelete = ""; - textInsert = ""; - - while (pointer < diffs.length) { - switch (diffs[pointer][0]) { - case DIFF_INSERT: - countInsert++; - textInsert += diffs[pointer][1]; - pointer++; - break; - - case DIFF_DELETE: - countDelete++; - textDelete += diffs[pointer][1]; - pointer++; - break; - - case DIFF_EQUAL: - // Upon reaching an equality, check for prior redundancies. - if (countDelete + countInsert > 1) { - if (countDelete !== 0 && countInsert !== 0) { - // Factor out any common prefixes. - commonlength = this.diffCommonPrefix(textInsert, textDelete); - - if (commonlength !== 0) { - if (pointer - countDelete - countInsert > 0 && diffs[pointer - countDelete - countInsert - 1][0] === DIFF_EQUAL) { - diffs[pointer - countDelete - countInsert - 1][1] += textInsert.substring(0, commonlength); - } else { - diffs.splice(0, 0, [DIFF_EQUAL, textInsert.substring(0, commonlength)]); - pointer++; - } - - textInsert = textInsert.substring(commonlength); - textDelete = textDelete.substring(commonlength); - } // Factor out any common suffixies. - - - commonlength = this.diffCommonSuffix(textInsert, textDelete); - - if (commonlength !== 0) { - diffs[pointer][1] = textInsert.substring(textInsert.length - commonlength) + diffs[pointer][1]; - textInsert = textInsert.substring(0, textInsert.length - commonlength); - textDelete = textDelete.substring(0, textDelete.length - commonlength); - } - } // Delete the offending records and add the merged ones. - - - if (countDelete === 0) { - diffs.splice(pointer - countInsert, countDelete + countInsert, [DIFF_INSERT, textInsert]); - } else if (countInsert === 0) { - diffs.splice(pointer - countDelete, countDelete + countInsert, [DIFF_DELETE, textDelete]); - } else { - diffs.splice(pointer - countDelete - countInsert, countDelete + countInsert, [DIFF_DELETE, textDelete], [DIFF_INSERT, textInsert]); - } - - pointer = pointer - countDelete - countInsert + (countDelete ? 1 : 0) + (countInsert ? 1 : 0) + 1; - } else if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) { - // Merge this equality with the previous one. - diffs[pointer - 1][1] += diffs[pointer][1]; - diffs.splice(pointer, 1); - } else { - pointer++; - } - - countInsert = 0; - countDelete = 0; - textDelete = ""; - textInsert = ""; - break; - } - } - - if (diffs[diffs.length - 1][1] === "") { - diffs.pop(); // Remove the dummy entry at the end. - } // Second pass: look for single edits surrounded on both sides by equalities - // which can be shifted sideways to eliminate an equality. - // e.g: ABAC -> ABAC - - - changes = false; - pointer = 1; // Intentionally ignore the first and last element (don't need checking). - - while (pointer < diffs.length - 1) { - if (diffs[pointer - 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL) { - diffPointer = diffs[pointer][1]; - position = diffPointer.substring(diffPointer.length - diffs[pointer - 1][1].length); // This is a single edit surrounded by equalities. - - if (position === diffs[pointer - 1][1]) { - // Shift the edit over the previous equality. - diffs[pointer][1] = diffs[pointer - 1][1] + diffs[pointer][1].substring(0, diffs[pointer][1].length - diffs[pointer - 1][1].length); - diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1]; - diffs.splice(pointer - 1, 1); - changes = true; - } else if (diffPointer.substring(0, diffs[pointer + 1][1].length) === diffs[pointer + 1][1]) { - // Shift the edit over the next equality. - diffs[pointer - 1][1] += diffs[pointer + 1][1]; - diffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer + 1][1].length) + diffs[pointer + 1][1]; - diffs.splice(pointer + 1, 1); - changes = true; - } - } - - pointer++; - } // If shifts were made, the diff needs reordering and another shift sweep. - - - if (changes) { - this.diffCleanupMerge(diffs); - } - }; - - return function (o, n) { - var diff, output, text; - diff = new DiffMatchPatch(); - output = diff.DiffMain(o, n); - diff.diffCleanupEfficiency(output); - text = diff.diffPrettyHtml(output); - return text; - }; - }(); - -}((function() { return this; }()))); - -/* globals QUnit */ - -(function() { - QUnit.config.autostart = false; - QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container' }); - QUnit.config.urlConfig.push({ id: 'nolint', label: 'Disable Linting' }); - QUnit.config.urlConfig.push({ id: 'dockcontainer', label: 'Dock container' }); - QUnit.config.urlConfig.push({ id: 'devmode', label: 'Development mode' }); - - QUnit.config.testTimeout = QUnit.urlParams.devmode ? null : 60000; //Default Test Timeout 60 Seconds -})(); - -var QUnitDOM = (function (exports) { - 'use strict'; - - function exists(options, message) { - var expectedCount = null; - if (typeof options === 'string') { - message = options; - } - else if (options) { - expectedCount = options.count; - } - var elements = this.findElements(); - if (expectedCount === null) { - var result = elements.length > 0; - var expected = format(this.targetDescription); - var actual = result ? expected : format(this.targetDescription, 0); - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else if (typeof expectedCount === 'number') { - var result = elements.length === expectedCount; - var actual = format(this.targetDescription, elements.length); - var expected = format(this.targetDescription, expectedCount); - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else { - throw new TypeError("Unexpected Parameter: " + expectedCount); - } - } - function format(selector, num) { - if (num === undefined || num === null) { - return "Element " + selector + " exists"; - } - else if (num === 0) { - return "Element " + selector + " does not exist"; - } - else if (num === 1) { - return "Element " + selector + " exists once"; - } - else if (num === 2) { - return "Element " + selector + " exists twice"; - } - else { - return "Element " + selector + " exists " + num + " times"; - } - } - - // imported from https://github.com/nathanboktae/chai-dom - function elementToString(el) { - if (!el) - return ''; - var desc; - if (el instanceof NodeList) { - if (el.length === 0) { - return 'empty NodeList'; - } - desc = Array.prototype.slice.call(el, 0, 5).map(elementToString).join(', '); - return el.length > 5 ? desc + "... (+" + (el.length - 5) + " more)" : desc; - } - if (!(el instanceof HTMLElement || el instanceof SVGElement)) { - return String(el); - } - desc = el.tagName.toLowerCase(); - if (el.id) { - desc += "#" + el.id; - } - if (el.className && !(el.className instanceof SVGAnimatedString)) { - desc += "." + String(el.className).replace(/\s+/g, '.'); - } - Array.prototype.forEach.call(el.attributes, function (attr) { - if (attr.name !== 'class' && attr.name !== 'id') { - desc += "[" + attr.name + (attr.value ? "=\"" + attr.value + "\"]" : ']'); - } - }); - return desc; - } - - function focused(message) { - var element = this.findTargetElement(); - if (!element) - return; - var result = document.activeElement === element; - var actual = elementToString(document.activeElement); - var expected = elementToString(this.target); - if (!message) { - message = "Element " + expected + " is focused"; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - - function notFocused(message) { - var element = this.findTargetElement(); - if (!element) - return; - var result = document.activeElement !== element; - var expected = "Element " + this.targetDescription + " is not focused"; - var actual = result ? expected : "Element " + this.targetDescription + " is focused"; - if (!message) { - message = expected; - } - this.pushResult({ result: result, message: message, actual: actual, expected: expected }); - } - - function checked(message) { - var element = this.findTargetElement(); - if (!element) - return; - var isChecked = element.checked === true; - var isNotChecked = element.checked === false; - var result = isChecked; - var hasCheckedProp = isChecked || isNotChecked; - if (!hasCheckedProp) { - var ariaChecked = element.getAttribute('aria-checked'); - if (ariaChecked !== null) { - result = ariaChecked === 'true'; - } - } - var actual = result ? 'checked' : 'not checked'; - var expected = 'checked'; - if (!message) { - message = "Element " + elementToString(this.target) + " is checked"; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - - function notChecked(message) { - var element = this.findTargetElement(); - if (!element) - return; - var isChecked = element.checked === true; - var isNotChecked = element.checked === false; - var result = !isChecked; - var hasCheckedProp = isChecked || isNotChecked; - if (!hasCheckedProp) { - var ariaChecked = element.getAttribute('aria-checked'); - if (ariaChecked !== null) { - result = ariaChecked !== 'true'; - } - } - var actual = result ? 'not checked' : 'checked'; - var expected = 'not checked'; - if (!message) { - message = "Element " + elementToString(this.target) + " is not checked"; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - - function required(message) { - var element = this.findTargetElement(); - if (!element) - return; - if (!(element instanceof HTMLInputElement || - element instanceof HTMLTextAreaElement || - element instanceof HTMLSelectElement)) { - throw new TypeError("Unexpected Element Type: " + element.toString()); - } - var result = element.required === true; - var actual = result ? 'required' : 'not required'; - var expected = 'required'; - if (!message) { - message = "Element " + elementToString(this.target) + " is required"; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - - function notRequired(message) { - var element = this.findTargetElement(); - if (!element) - return; - if (!(element instanceof HTMLInputElement || - element instanceof HTMLTextAreaElement || - element instanceof HTMLSelectElement)) { - throw new TypeError("Unexpected Element Type: " + element.toString()); - } - var result = element.required === false; - var actual = !result ? 'required' : 'not required'; - var expected = 'not required'; - if (!message) { - message = "Element " + elementToString(this.target) + " is not required"; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - - function isValid(message, options) { - if (options === void 0) { options = {}; } - var element = this.findTargetElement(); - if (!element) - return; - if (!(element instanceof HTMLFormElement || - element instanceof HTMLInputElement || - element instanceof HTMLTextAreaElement || - element instanceof HTMLButtonElement || - element instanceof HTMLOutputElement || - element instanceof HTMLSelectElement)) { - throw new TypeError("Unexpected Element Type: " + element.toString()); - } - var validity = element.reportValidity() === true; - var result = validity === !options.inverted; - var actual = validity ? 'valid' : 'not valid'; - var expected = options.inverted ? 'not valid' : 'valid'; - if (!message) { - message = "Element " + elementToString(this.target) + " is " + actual; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - - // Visible logic based on jQuery's - // https://github.com/jquery/jquery/blob/4a2bcc27f9c3ee24b3effac0fbe1285d1ee23cc5/src/css/hiddenVisibleSelectors.js#L11-L13 - function visible(el) { - if (el === null) - return false; - if (el.offsetWidth === 0 || el.offsetHeight === 0) - return false; - var clientRects = el.getClientRects(); - if (clientRects.length === 0) - return false; - for (var i = 0; i < clientRects.length; i++) { - var rect = clientRects[i]; - if (rect.width !== 0 && rect.height !== 0) - return true; - } - return false; - } - - function isVisible(options, message) { - var expectedCount = null; - if (typeof options === 'string') { - message = options; - } - else if (options) { - expectedCount = options.count; - } - var elements = this.findElements().filter(visible); - if (expectedCount === null) { - var result = elements.length > 0; - var expected = format$1(this.targetDescription); - var actual = result ? expected : format$1(this.targetDescription, 0); - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else if (typeof expectedCount === 'number') { - var result = elements.length === expectedCount; - var actual = format$1(this.targetDescription, elements.length); - var expected = format$1(this.targetDescription, expectedCount); - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else { - throw new TypeError("Unexpected Parameter: " + expectedCount); - } - } - function format$1(selector, num) { - if (num === undefined || num === null) { - return "Element " + selector + " is visible"; - } - else if (num === 0) { - return "Element " + selector + " is not visible"; - } - else if (num === 1) { - return "Element " + selector + " is visible once"; - } - else if (num === 2) { - return "Element " + selector + " is visible twice"; - } - else { - return "Element " + selector + " is visible " + num + " times"; - } - } - - function isDisabled(message, options) { - if (options === void 0) { options = {}; } - var inverted = options.inverted; - var element = this.findTargetElement(); - if (!element) - return; - if (!(element instanceof HTMLInputElement || - element instanceof HTMLTextAreaElement || - element instanceof HTMLSelectElement || - element instanceof HTMLButtonElement || - element instanceof HTMLOptGroupElement || - element instanceof HTMLOptionElement || - element instanceof HTMLFieldSetElement)) { - throw new TypeError("Unexpected Element Type: " + element.toString()); - } - var result = element.disabled === !inverted; - var actual = element.disabled === false - ? "Element " + this.targetDescription + " is not disabled" - : "Element " + this.targetDescription + " is disabled"; - var expected = inverted - ? "Element " + this.targetDescription + " is not disabled" - : "Element " + this.targetDescription + " is disabled"; - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - - function matchesSelector(elements, compareSelector) { - var failures = elements.filter(function (it) { return !it.matches(compareSelector); }); - return failures.length; - } - - function collapseWhitespace(string) { - return string - .replace(/[\t\r\n]/g, ' ') - .replace(/ +/g, ' ') - .replace(/^ /, '') - .replace(/ $/, ''); - } - - /** - * This function can be used to convert a NodeList to a regular array. - * We should be using `Array.from()` for this, but IE11 doesn't support that :( - * - * @private - */ - function toArray(list) { - return Array.prototype.slice.call(list); - } - - var DOMAssertions = /** @class */ (function () { - function DOMAssertions(target, rootElement, testContext) { - this.target = target; - this.rootElement = rootElement; - this.testContext = testContext; - } - /** - * Assert an {@link HTMLElement} (or multiple) matching the `selector` exists. - * - * @param {object?} options - * @param {number?} options.count - * @param {string?} message - * - * @example - * assert.dom('#title').exists(); - * assert.dom('.choice').exists({ count: 4 }); - * - * @see {@link #doesNotExist} - */ - DOMAssertions.prototype.exists = function (options, message) { - exists.call(this, options, message); - return this; - }; - /** - * Assert an {@link HTMLElement} matching the `selector` does not exists. - * - * @param {string?} message - * - * @example - * assert.dom('.should-not-exist').doesNotExist(); - * - * @see {@link #exists} - */ - DOMAssertions.prototype.doesNotExist = function (message) { - exists.call(this, { count: 0 }, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` is currently checked. - * - * Note: This also supports `aria-checked="true/false"`. - * - * @param {string?} message - * - * @example - * assert.dom('input.active').isChecked(); - * - * @see {@link #isNotChecked} - */ - DOMAssertions.prototype.isChecked = function (message) { - checked.call(this, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` is currently unchecked. - * - * Note: This also supports `aria-checked="true/false"`. - * - * @param {string?} message - * - * @example - * assert.dom('input.active').isNotChecked(); - * - * @see {@link #isChecked} - */ - DOMAssertions.prototype.isNotChecked = function (message) { - notChecked.call(this, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` is currently focused. - * - * @param {string?} message - * - * @example - * assert.dom('input.email').isFocused(); - * - * @see {@link #isNotFocused} - */ - DOMAssertions.prototype.isFocused = function (message) { - focused.call(this, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` is not currently focused. - * - * @param {string?} message - * - * @example - * assert.dom('input[type="password"]').isNotFocused(); - * - * @see {@link #isFocused} - */ - DOMAssertions.prototype.isNotFocused = function (message) { - notFocused.call(this, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` is currently required. - * - * @param {string?} message - * - * @example - * assert.dom('input[type="text"]').isRequired(); - * - * @see {@link #isNotRequired} - */ - DOMAssertions.prototype.isRequired = function (message) { - required.call(this, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` is currently not required. - * - * @param {string?} message - * - * @example - * assert.dom('input[type="text"]').isNotRequired(); - * - * @see {@link #isRequired} - */ - DOMAssertions.prototype.isNotRequired = function (message) { - notRequired.call(this, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} passes validation - * - * Validity is determined by asserting that: - * - * - `element.reportValidity() === true` - * - * @param {string?} message - * - * @example - * assert.dom('.input').isValid(); - * - * @see {@link #isValid} - */ - DOMAssertions.prototype.isValid = function (message) { - isValid.call(this, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} does not pass validation - * - * Validity is determined by asserting that: - * - * - `element.reportValidity() === true` - * - * @param {string?} message - * - * @example - * assert.dom('.input').isNotValid(); - * - * @see {@link #isValid} - */ - DOMAssertions.prototype.isNotValid = function (message) { - isValid.call(this, message, { inverted: true }); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` exists and is visible. - * - * Visibility is determined by asserting that: - * - * - the element's offsetWidth and offsetHeight are non-zero - * - any of the element's DOMRect objects have a non-zero size - * - * Additionally, visibility in this case means that the element is visible on the page, - * but not necessarily in the viewport. - * - * @param {object?} options - * @param {number?} options.count - * @param {string?} message - * - * @example - * assert.dom('#title').isVisible(); - * assert.dom('.choice').isVisible({ count: 4 }); - * - * @see {@link #isNotVisible} - */ - DOMAssertions.prototype.isVisible = function (options, message) { - isVisible.call(this, options, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` does not exist or is not visible on the page. - * - * Visibility is determined by asserting that: - * - * - the element's offsetWidth or offsetHeight are zero - * - all of the element's DOMRect objects have a size of zero - * - * Additionally, visibility in this case means that the element is visible on the page, - * but not necessarily in the viewport. - * - * @param {string?} message - * - * @example - * assert.dom('.foo').isNotVisible(); - * - * @see {@link #isVisible} - */ - DOMAssertions.prototype.isNotVisible = function (message) { - isVisible.call(this, { count: 0 }, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} has an attribute with the provided `name` - * and optionally checks if the attribute `value` matches the provided text - * or regular expression. - * - * @param {string} name - * @param {string|RegExp|object?} value - * @param {string?} message - * - * @example - * assert.dom('input.password-input').hasAttribute('type', 'password'); - * - * @see {@link #doesNotHaveAttribute} - */ - DOMAssertions.prototype.hasAttribute = function (name, value, message) { - var element = this.findTargetElement(); - if (!element) - return this; - if (arguments.length === 1) { - value = { any: true }; - } - var actualValue = element.getAttribute(name); - if (value instanceof RegExp) { - var result = value.test(actualValue); - var expected = "Element " + this.targetDescription + " has attribute \"" + name + "\" with value matching " + value; - var actual = actualValue === null - ? "Element " + this.targetDescription + " does not have attribute \"" + name + "\"" - : "Element " + this.targetDescription + " has attribute \"" + name + "\" with value " + JSON.stringify(actualValue); - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else if (value.any === true) { - var result = actualValue !== null; - var expected = "Element " + this.targetDescription + " has attribute \"" + name + "\""; - var actual = result - ? expected - : "Element " + this.targetDescription + " does not have attribute \"" + name + "\""; - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else { - var result = value === actualValue; - var expected = "Element " + this.targetDescription + " has attribute \"" + name + "\" with value " + JSON.stringify(value); - var actual = actualValue === null - ? "Element " + this.targetDescription + " does not have attribute \"" + name + "\"" - : "Element " + this.targetDescription + " has attribute \"" + name + "\" with value " + JSON.stringify(actualValue); - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - return this; - }; - /** - * Assert that the {@link HTMLElement} has no attribute with the provided `name`. - * - * **Aliases:** `hasNoAttribute`, `lacksAttribute` - * - * @param {string} name - * @param {string?} message - * - * @example - * assert.dom('input.username').hasNoAttribute('disabled'); - * - * @see {@link #hasAttribute} - */ - DOMAssertions.prototype.doesNotHaveAttribute = function (name, message) { - var element = this.findTargetElement(); - if (!element) - return; - var result = !element.hasAttribute(name); - var expected = "Element " + this.targetDescription + " does not have attribute \"" + name + "\""; - var actual = expected; - if (!result) { - var value = element.getAttribute(name); - actual = "Element " + this.targetDescription + " has attribute \"" + name + "\" with value " + JSON.stringify(value); - } - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - return this; - }; - DOMAssertions.prototype.hasNoAttribute = function (name, message) { - return this.doesNotHaveAttribute(name, message); - }; - DOMAssertions.prototype.lacksAttribute = function (name, message) { - return this.doesNotHaveAttribute(name, message); - }; - /** - * Assert that the {@link HTMLElement} has an ARIA attribute with the provided - * `name` and optionally checks if the attribute `value` matches the provided - * text or regular expression. - * - * @param {string} name - * @param {string|RegExp|object?} value - * @param {string?} message - * - * @example - * assert.dom('button').hasAria('pressed', 'true'); - * - * @see {@link #hasNoAria} - */ - DOMAssertions.prototype.hasAria = function (name, value, message) { - return this.hasAttribute("aria-" + name, value, message); - }; - /** - * Assert that the {@link HTMLElement} has no ARIA attribute with the - * provided `name`. - * - * @param {string} name - * @param {string?} message - * - * @example - * assert.dom('button').doesNotHaveAria('pressed'); - * - * @see {@link #hasAria} - */ - DOMAssertions.prototype.doesNotHaveAria = function (name, message) { - return this.doesNotHaveAttribute("aria-" + name, message); - }; - /** - * Assert that the {@link HTMLElement} has a property with the provided `name` - * and checks if the property `value` matches the provided text or regular - * expression. - * - * @param {string} name - * @param {RegExp|any} value - * @param {string?} message - * - * @example - * assert.dom('input.password-input').hasProperty('type', 'password'); - * - * @see {@link #doesNotHaveProperty} - */ - DOMAssertions.prototype.hasProperty = function (name, value, message) { - var element = this.findTargetElement(); - if (!element) - return this; - var description = this.targetDescription; - var actualValue = element[name]; - if (value instanceof RegExp) { - var result = value.test(String(actualValue)); - var expected = "Element " + description + " has property \"" + name + "\" with value matching " + value; - var actual = "Element " + description + " has property \"" + name + "\" with value " + JSON.stringify(actualValue); - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else { - var result = value === actualValue; - var expected = "Element " + description + " has property \"" + name + "\" with value " + JSON.stringify(value); - var actual = "Element " + description + " has property \"" + name + "\" with value " + JSON.stringify(actualValue); - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` is disabled. - * - * @param {string?} message - * - * @example - * assert.dom('.foo').isDisabled(); - * - * @see {@link #isNotDisabled} - */ - DOMAssertions.prototype.isDisabled = function (message) { - isDisabled.call(this, message); - return this; - }; - /** - * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the - * `selector` is not disabled. - * - * **Aliases:** `isEnabled` - * - * @param {string?} message - * - * @example - * assert.dom('.foo').isNotDisabled(); - * - * @see {@link #isDisabled} - */ - DOMAssertions.prototype.isNotDisabled = function (message) { - isDisabled.call(this, message, { inverted: true }); - return this; - }; - DOMAssertions.prototype.isEnabled = function (message) { - return this.isNotDisabled(message); - }; - /** - * Assert that the {@link HTMLElement} has the `expected` CSS class using - * [`classList`](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList). - * - * `expected` can also be a regular expression, and the assertion will return - * true if any of the element's CSS classes match. - * - * @param {string|RegExp} expected - * @param {string?} message - * - * @example - * assert.dom('input[type="password"]').hasClass('secret-password-input'); - * - * @example - * assert.dom('input[type="password"]').hasClass(/.*password-input/); - * - * @see {@link #doesNotHaveClass} - */ - DOMAssertions.prototype.hasClass = function (expected, message) { - var element = this.findTargetElement(); - if (!element) - return this; - var actual = element.classList.toString(); - if (expected instanceof RegExp) { - var classNames = Array.prototype.slice.call(element.classList); - var result = classNames.some(function (className) { - return expected.test(className); - }); - if (!message) { - message = "Element " + this.targetDescription + " has CSS class matching " + expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else { - var result = element.classList.contains(expected); - if (!message) { - message = "Element " + this.targetDescription + " has CSS class \"" + expected + "\""; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - return this; - }; - /** - * Assert that the {@link HTMLElement} does not have the `expected` CSS class using - * [`classList`](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList). - * - * `expected` can also be a regular expression, and the assertion will return - * true if none of the element's CSS classes match. - * - * **Aliases:** `hasNoClass`, `lacksClass` - * - * @param {string|RegExp} expected - * @param {string?} message - * - * @example - * assert.dom('input[type="password"]').doesNotHaveClass('username-input'); - * - * @example - * assert.dom('input[type="password"]').doesNotHaveClass(/username-.*-input/); - * - * @see {@link #hasClass} - */ - DOMAssertions.prototype.doesNotHaveClass = function (expected, message) { - var element = this.findTargetElement(); - if (!element) - return this; - var actual = element.classList.toString(); - if (expected instanceof RegExp) { - var classNames = Array.prototype.slice.call(element.classList); - var result = classNames.every(function (className) { - return !expected.test(className); - }); - if (!message) { - message = "Element " + this.targetDescription + " does not have CSS class matching " + expected; - } - this.pushResult({ result: result, actual: actual, expected: "not: " + expected, message: message }); - } - else { - var result = !element.classList.contains(expected); - if (!message) { - message = "Element " + this.targetDescription + " does not have CSS class \"" + expected + "\""; - } - this.pushResult({ result: result, actual: actual, expected: "not: " + expected, message: message }); - } - return this; - }; - DOMAssertions.prototype.hasNoClass = function (expected, message) { - return this.doesNotHaveClass(expected, message); - }; - DOMAssertions.prototype.lacksClass = function (expected, message) { - return this.doesNotHaveClass(expected, message); - }; - /** - * Assert that the [HTMLElement][] has the `expected` style declarations using - * [`window.getComputedStyle`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle). - * - * @param {object} expected - * @param {string?} message - * - * @example - * assert.dom('.progress-bar').hasStyle({ - * opacity: 1, - * display: 'block' - * }); - * - * @see {@link #hasClass} - */ - DOMAssertions.prototype.hasStyle = function (expected, message) { - return this.hasPseudoElementStyle(null, expected, message); - }; - /** - * Assert that the pseudo element for `selector` of the [HTMLElement][] has the `expected` style declarations using - * [`window.getComputedStyle`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle). - * - * @param {string} selector - * @param {object} expected - * @param {string?} message - * - * @example - * assert.dom('.progress-bar').hasPseudoElementStyle(':after', { - * content: '";"', - * }); - * - * @see {@link #hasClass} - */ - DOMAssertions.prototype.hasPseudoElementStyle = function (selector, expected, message) { - var element = this.findTargetElement(); - if (!element) - return this; - var computedStyle = window.getComputedStyle(element, selector); - var expectedProperties = Object.keys(expected); - if (expectedProperties.length <= 0) { - throw new TypeError("Missing style expectations. There must be at least one style property in the passed in expectation object."); - } - var result = expectedProperties.every(function (property) { return computedStyle[property] === expected[property]; }); - var actual = {}; - expectedProperties.forEach(function (property) { return (actual[property] = computedStyle[property]); }); - if (!message) { - var normalizedSelector = selector ? selector.replace(/^:{0,2}/, '::') : ''; - message = "Element " + this.targetDescription + normalizedSelector + " has style \"" + JSON.stringify(expected) + "\""; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - return this; - }; - /** - * Assert that the [HTMLElement][] does not have the `expected` style declarations using - * [`window.getComputedStyle`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle). - * - * @param {object} expected - * @param {string?} message - * - * @example - * assert.dom('.progress-bar').doesNotHaveStyle({ - * opacity: 1, - * display: 'block' - * }); - * - * @see {@link #hasClass} - */ - DOMAssertions.prototype.doesNotHaveStyle = function (expected, message) { - return this.doesNotHavePseudoElementStyle(null, expected, message); - }; - /** - * Assert that the pseudo element for `selector` of the [HTMLElement][] does not have the `expected` style declarations using - * [`window.getComputedStyle`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle). - * - * @param {string} selector - * @param {object} expected - * @param {string?} message - * - * @example - * assert.dom('.progress-bar').doesNotHavePseudoElementStyle(':after', { - * content: '";"', - * }); - * - * @see {@link #hasClass} - */ - DOMAssertions.prototype.doesNotHavePseudoElementStyle = function (selector, expected, message) { - var element = this.findTargetElement(); - if (!element) - return this; - var computedStyle = window.getComputedStyle(element, selector); - var expectedProperties = Object.keys(expected); - if (expectedProperties.length <= 0) { - throw new TypeError("Missing style expectations. There must be at least one style property in the passed in expectation object."); - } - var result = expectedProperties.some(function (property) { return computedStyle[property] !== expected[property]; }); - var actual = {}; - expectedProperties.forEach(function (property) { return (actual[property] = computedStyle[property]); }); - if (!message) { - var normalizedSelector = selector ? selector.replace(/^:{0,2}/, '::') : ''; - message = "Element " + this.targetDescription + normalizedSelector + " does not have style \"" + JSON.stringify(expected) + "\""; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - return this; - }; - /** - * Assert that the text of the {@link HTMLElement} or an {@link HTMLElement} - * matching the `selector` matches the `expected` text, using the - * [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) - * attribute and stripping/collapsing whitespace. - * - * `expected` can also be a regular expression. - * - * > Note: This assertion will collapse whitespace if the type you pass in is a string. - * > If you are testing specifically for whitespace integrity, pass your expected text - * > in as a RegEx pattern. - * - * **Aliases:** `matchesText` - * - * @param {string|RegExp} expected - * @param {string?} message - * - * @example - * //

      - * // Welcome to QUnit - * //

      - * - * assert.dom('#title').hasText('Welcome to QUnit'); - * - * @example - * assert.dom('.foo').hasText(/[12]\d{3}/); - * - * @see {@link #includesText} - */ - DOMAssertions.prototype.hasText = function (expected, message) { - var element = this.findTargetElement(); - if (!element) - return this; - if (expected instanceof RegExp) { - var result = expected.test(element.textContent); - var actual = element.textContent; - if (!message) { - message = "Element " + this.targetDescription + " has text matching " + expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else if (expected.any === true) { - var result = Boolean(element.textContent); - var expected_1 = "Element " + this.targetDescription + " has a text"; - var actual = result ? expected_1 : "Element " + this.targetDescription + " has no text"; - if (!message) { - message = expected_1; - } - this.pushResult({ result: result, actual: actual, expected: expected_1, message: message }); - } - else if (typeof expected === 'string') { - expected = collapseWhitespace(expected); - var actual = collapseWhitespace(element.textContent); - var result = actual === expected; - if (!message) { - message = "Element " + this.targetDescription + " has text \"" + expected + "\""; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else { - throw new TypeError("You must pass a string or Regular Expression to \"hasText\". You passed " + expected + "."); - } - return this; - }; - DOMAssertions.prototype.matchesText = function (expected, message) { - return this.hasText(expected, message); - }; - /** - * Assert that the `textContent` property of an {@link HTMLElement} is not empty. - * - * @param {string?} message - * - * @example - * assert.dom('button.share').hasAnyText(); - * - * @see {@link #hasText} - */ - DOMAssertions.prototype.hasAnyText = function (message) { - return this.hasText({ any: true }, message); - }; - /** - * Assert that the `textContent` property of an {@link HTMLElement} is empty. - * - * @param {string?} message - * - * @example - * assert.dom('div').hasNoText(); - * - * @see {@link #hasNoText} - */ - DOMAssertions.prototype.hasNoText = function (message) { - return this.hasText('', message); - }; - /** - * Assert that the text of the {@link HTMLElement} or an {@link HTMLElement} - * matching the `selector` contains the given `text`, using the - * [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) - * attribute. - * - * > Note: This assertion will collapse whitespace in `textContent` before searching. - * > If you would like to assert on a string that *should* contain line breaks, tabs, - * > more than one space in a row, or starting/ending whitespace, use the {@link #hasText} - * > selector and pass your expected text in as a RegEx pattern. - * - * **Aliases:** `containsText`, `hasTextContaining` - * - * @param {string} text - * @param {string?} message - * - * @example - * assert.dom('#title').includesText('Welcome'); - * - * @see {@link #hasText} - */ - DOMAssertions.prototype.includesText = function (text, message) { - var element = this.findTargetElement(); - if (!element) - return this; - var collapsedText = collapseWhitespace(element.textContent); - var result = collapsedText.indexOf(text) !== -1; - var actual = collapsedText; - var expected = text; - if (!message) { - message = "Element " + this.targetDescription + " has text containing \"" + text + "\""; - } - if (!result && text !== collapseWhitespace(text)) { - console.warn('The `.includesText()`, `.containsText()`, and `.hasTextContaining()` assertions collapse whitespace. The text you are checking for contains whitespace that may have made your test fail incorrectly. Try the `.hasText()` assertion passing in your expected text as a RegExp pattern. Your text:\n' + - text); - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - return this; - }; - DOMAssertions.prototype.containsText = function (expected, message) { - return this.includesText(expected, message); - }; - DOMAssertions.prototype.hasTextContaining = function (expected, message) { - return this.includesText(expected, message); - }; - /** - * Assert that the text of the {@link HTMLElement} or an {@link HTMLElement} - * matching the `selector` does not include the given `text`, using the - * [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent) - * attribute. - * - * **Aliases:** `doesNotContainText`, `doesNotHaveTextContaining` - * - * @param {string} text - * @param {string?} message - * - * @example - * assert.dom('#title').doesNotIncludeText('Welcome'); - */ - DOMAssertions.prototype.doesNotIncludeText = function (text, message) { - var element = this.findTargetElement(); - if (!element) - return this; - var collapsedText = collapseWhitespace(element.textContent); - var result = collapsedText.indexOf(text) === -1; - var expected = "Element " + this.targetDescription + " does not include text \"" + text + "\""; - var actual = expected; - if (!result) { - actual = "Element " + this.targetDescription + " includes text \"" + text + "\""; - } - if (!message) { - message = expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - return this; - }; - DOMAssertions.prototype.doesNotContainText = function (unexpected, message) { - return this.doesNotIncludeText(unexpected, message); - }; - DOMAssertions.prototype.doesNotHaveTextContaining = function (unexpected, message) { - return this.doesNotIncludeText(unexpected, message); - }; - /** - * Assert that the `value` property of an {@link HTMLInputElement} matches - * the `expected` text or regular expression. - * - * If no `expected` value is provided, the assertion will fail if the - * `value` is an empty string. - * - * @param {string|RegExp|object?} expected - * @param {string?} message - * - * @example - * assert.dom('input.username').hasValue('HSimpson'); - - * @see {@link #hasAnyValue} - * @see {@link #hasNoValue} - */ - DOMAssertions.prototype.hasValue = function (expected, message) { - var element = this.findTargetElement(); - if (!element) - return this; - if (arguments.length === 0) { - expected = { any: true }; - } - var value = element.value; - if (expected instanceof RegExp) { - var result = expected.test(value); - var actual = value; - if (!message) { - message = "Element " + this.targetDescription + " has value matching " + expected; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - else if (expected.any === true) { - var result = Boolean(value); - var expected_2 = "Element " + this.targetDescription + " has a value"; - var actual = result ? expected_2 : "Element " + this.targetDescription + " has no value"; - if (!message) { - message = expected_2; - } - this.pushResult({ result: result, actual: actual, expected: expected_2, message: message }); - } - else { - var actual = value; - var result = actual === expected; - if (!message) { - message = "Element " + this.targetDescription + " has value \"" + expected + "\""; - } - this.pushResult({ result: result, actual: actual, expected: expected, message: message }); - } - return this; - }; - /** - * Assert that the `value` property of an {@link HTMLInputElement} is not empty. - * - * @param {string?} message - * - * @example - * assert.dom('input.username').hasAnyValue(); - * - * @see {@link #hasValue} - * @see {@link #hasNoValue} - */ - DOMAssertions.prototype.hasAnyValue = function (message) { - return this.hasValue({ any: true }, message); - }; - /** - * Assert that the `value` property of an {@link HTMLInputElement} is empty. - * - * **Aliases:** `lacksValue` - * - * @param {string?} message - * - * @example - * assert.dom('input.username').hasNoValue(); - * - * @see {@link #hasValue} - * @see {@link #hasAnyValue} - */ - DOMAssertions.prototype.hasNoValue = function (message) { - return this.hasValue('', message); - }; - DOMAssertions.prototype.lacksValue = function (message) { - return this.hasNoValue(message); - }; - /** - * Assert that the target selector selects only Elements that are also selected by - * compareSelector. - * - * @param {string} compareSelector - * @param {string?} message - * - * @example - * assert.dom('p.red').matchesSelector('div.wrapper p:last-child') - */ - DOMAssertions.prototype.matchesSelector = function (compareSelector, message) { - var targetElements = this.target instanceof Element ? [this.target] : this.findElements(); - var targets = targetElements.length; - var matchFailures = matchesSelector(targetElements, compareSelector); - var singleElement = targets === 1; - var selectedByPart = this.target instanceof Element ? 'passed' : "selected by " + this.target; - var actual; - var expected; - if (matchFailures === 0) { - // no failures matching. - if (!message) { - message = singleElement - ? "The element " + selectedByPart + " also matches the selector " + compareSelector + "." - : targets + " elements, selected by " + this.target + ", also match the selector " + compareSelector + "."; - } - actual = expected = message; - this.pushResult({ result: true, actual: actual, expected: expected, message: message }); - } - else { - var difference = targets - matchFailures; - // there were failures when matching. - if (!message) { - message = singleElement - ? "The element " + selectedByPart + " did not also match the selector " + compareSelector + "." - : matchFailures + " out of " + targets + " elements selected by " + this.target + " did not also match the selector " + compareSelector + "."; - } - actual = singleElement ? message : difference + " elements matched " + compareSelector + "."; - expected = singleElement - ? "The element should have matched " + compareSelector + "." - : targets + " elements should have matched " + compareSelector + "."; - this.pushResult({ result: false, actual: actual, expected: expected, message: message }); - } - return this; - }; - /** - * Assert that the target selector selects only Elements that are not also selected by - * compareSelector. - * - * @param {string} compareSelector - * @param {string?} message - * - * @example - * assert.dom('input').doesNotMatchSelector('input[disabled]') - */ - DOMAssertions.prototype.doesNotMatchSelector = function (compareSelector, message) { - var targetElements = this.target instanceof Element ? [this.target] : this.findElements(); - var targets = targetElements.length; - var matchFailures = matchesSelector(targetElements, compareSelector); - var singleElement = targets === 1; - var selectedByPart = this.target instanceof Element ? 'passed' : "selected by " + this.target; - var actual; - var expected; - if (matchFailures === targets) { - // the assertion is successful because no element matched the other selector. - if (!message) { - message = singleElement - ? "The element " + selectedByPart + " did not also match the selector " + compareSelector + "." - : targets + " elements, selected by " + this.target + ", did not also match the selector " + compareSelector + "."; - } - actual = expected = message; - this.pushResult({ result: true, actual: actual, expected: expected, message: message }); - } - else { - var difference = targets - matchFailures; - // the assertion fails because at least one element matched the other selector. - if (!message) { - message = singleElement - ? "The element " + selectedByPart + " must not also match the selector " + compareSelector + "." - : difference + " elements out of " + targets + ", selected by " + this.target + ", must not also match the selector " + compareSelector + "."; - } - actual = singleElement - ? "The element " + selectedByPart + " matched " + compareSelector + "." - : matchFailures + " elements did not match " + compareSelector + "."; - expected = singleElement - ? message - : targets + " elements should not have matched " + compareSelector + "."; - this.pushResult({ result: false, actual: actual, expected: expected, message: message }); - } - return this; - }; - /** - * Assert that the tagName of the {@link HTMLElement} or an {@link HTMLElement} - * matching the `selector` matches the `expected` tagName, using the - * [`tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName) - * property of the {@link HTMLElement}. - * - * @param {string} expected - * @param {string?} message - * - * @example - * //

      - * // Title - * //

      - * - * assert.dom('#title').hasTagName('h1'); - */ - DOMAssertions.prototype.hasTagName = function (tagName, message) { - var element = this.findTargetElement(); - var actual; - var expected; - if (!element) - return this; - if (typeof tagName !== 'string') { - throw new TypeError("You must pass a string to \"hasTagName\". You passed " + tagName + "."); - } - actual = element.tagName.toLowerCase(); - expected = tagName.toLowerCase(); - if (actual === expected) { - if (!message) { - message = "Element " + this.targetDescription + " has tagName " + expected; - } - this.pushResult({ result: true, actual: actual, expected: expected, message: message }); - } - else { - if (!message) { - message = "Element " + this.targetDescription + " does not have tagName " + expected; - } - this.pushResult({ result: false, actual: actual, expected: expected, message: message }); - } - return this; - }; - /** - * Assert that the tagName of the {@link HTMLElement} or an {@link HTMLElement} - * matching the `selector` does not match the `expected` tagName, using the - * [`tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName) - * property of the {@link HTMLElement}. - * - * @param {string} expected - * @param {string?} message - * - * @example - * //
      - * // Title - * //
      - * - * assert.dom('section#block').doesNotHaveTagName('div'); - */ - DOMAssertions.prototype.doesNotHaveTagName = function (tagName, message) { - var element = this.findTargetElement(); - var actual; - var expected; - if (!element) - return this; - if (typeof tagName !== 'string') { - throw new TypeError("You must pass a string to \"doesNotHaveTagName\". You passed " + tagName + "."); - } - actual = element.tagName.toLowerCase(); - expected = tagName.toLowerCase(); - if (actual !== expected) { - if (!message) { - message = "Element " + this.targetDescription + " does not have tagName " + expected; - } - this.pushResult({ result: true, actual: actual, expected: expected, message: message }); - } - else { - if (!message) { - message = "Element " + this.targetDescription + " has tagName " + expected; - } - this.pushResult({ result: false, actual: actual, expected: expected, message: message }); - } - return this; - }; - /** - * @private - */ - DOMAssertions.prototype.pushResult = function (result) { - this.testContext.pushResult(result); - }; - /** - * Finds a valid HTMLElement from target, or pushes a failing assertion if a valid - * element is not found. - * @private - * @returns (HTMLElement|null) a valid HTMLElement, or null - */ - DOMAssertions.prototype.findTargetElement = function () { - var el = this.findElement(); - if (el === null) { - var message = "Element " + (this.target || '') + " should exist"; - this.pushResult({ message: message, result: false, actual: undefined, expected: undefined }); - return null; - } - return el; - }; - /** - * Finds a valid HTMLElement from target - * @private - * @returns (HTMLElement|null) a valid HTMLElement, or null - * @throws TypeError will be thrown if target is an unrecognized type - */ - DOMAssertions.prototype.findElement = function () { - if (this.target === null) { - return null; - } - else if (typeof this.target === 'string') { - return this.rootElement.querySelector(this.target); - } - else if (this.target instanceof Element) { - return this.target; - } - else { - throw new TypeError("Unexpected Parameter: " + this.target); - } - }; - /** - * Finds a collection of Element instances from target using querySelectorAll - * @private - * @returns (Element[]) an array of Element instances - * @throws TypeError will be thrown if target is an unrecognized type - */ - DOMAssertions.prototype.findElements = function () { - if (this.target === null) { - return []; - } - else if (typeof this.target === 'string') { - return toArray(this.rootElement.querySelectorAll(this.target)); - } - else if (this.target instanceof Element) { - return [this.target]; - } - else { - throw new TypeError("Unexpected Parameter: " + this.target); - } - }; - Object.defineProperty(DOMAssertions.prototype, "targetDescription", { - /** - * @private - */ - get: function () { - return elementToString(this.target); - }, - enumerable: false, - configurable: true - }); - return DOMAssertions; - }()); - - var _getRootElement = function () { return null; }; - function overrideRootElement(fn) { - _getRootElement = fn; - } - function getRootElement() { - return _getRootElement(); - } - - function install (assert) { - assert.dom = function (target, rootElement) { - if (!isValidRootElement(rootElement)) { - throw new Error(rootElement + " is not a valid root element"); - } - rootElement = rootElement || this.dom.rootElement || getRootElement(); - if (arguments.length === 0) { - target = rootElement instanceof Element ? rootElement : null; - } - return new DOMAssertions(target, rootElement, this); - }; - function isValidRootElement(element) { - return (!element || - (typeof element === 'object' && - typeof element.querySelector === 'function' && - typeof element.querySelectorAll === 'function')); - } - } - - function setup(assert, options) { - if (options === void 0) { options = {}; } - install(assert); - var getRootElement = typeof options.getRootElement === 'function' - ? options.getRootElement - : function () { return document.querySelector('#ember-testing'); }; - overrideRootElement(getRootElement); - } - - /* global QUnit */ - install(QUnit.assert); - - exports.setup = setup; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; - -}({})); - -Object.defineProperty(QUnit.assert.dom, 'rootElement', { - get: function() { - return document.querySelector('#ember-testing'); - }, - enumerable: true, - configurable: true, -}); - -define("@ember/test-helpers/-internal/debug-info-helpers", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = registerDebugInfoHelper; - _exports.debugInfoHelpers = void 0; - const debugInfoHelpers = new Set(); - /** - * Registers a custom debug info helper to augment the output for test isolation validation. - * - * @public - * @param {DebugInfoHelper} debugHelper a custom debug info helper - * @example - * - * import { registerDebugInfoHelper } from '@ember/test-helpers'; - * - * registerDebugInfoHelper({ - * name: 'Date override detection', - * log() { - * if (dateIsOverridden()) { - * console.log(this.name); - * console.log('The date object has been overridden'); - * } - * } - * }) - */ - - _exports.debugInfoHelpers = debugInfoHelpers; - - function registerDebugInfoHelper(debugHelper) { - debugInfoHelpers.add(debugHelper); - } -}); -define("@ember/test-helpers/-internal/debug-info", ["exports", "@ember/test-helpers/-internal/debug-info-helpers", "ember-test-waiters"], function (_exports, _debugInfoHelpers, _emberTestWaiters) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.backburnerDebugInfoAvailable = backburnerDebugInfoAvailable; - _exports.getDebugInfo = getDebugInfo; - _exports.TestDebugInfo = void 0; - const PENDING_AJAX_REQUESTS = 'Pending AJAX requests'; - const PENDING_TEST_WAITERS = 'Pending test waiters'; - const SCHEDULED_ASYNC = 'Scheduled async'; - const SCHEDULED_AUTORUN = 'Scheduled autorun'; - /** - * Determins if the `getDebugInfo` method is available in the - * running verison of backburner. - * - * @returns {boolean} True if `getDebugInfo` is present in backburner, otherwise false. - */ - - function backburnerDebugInfoAvailable() { - return typeof Ember.run.backburner.getDebugInfo === 'function'; - } - /** - * Retrieves debug information from backburner's current deferred actions queue (runloop instance). - * If the `getDebugInfo` method isn't available, it returns `null`. - * - * @public - * @returns {MaybeDebugInfo | null} Backburner debugInfo or, if the getDebugInfo method is not present, null - */ - - - function getDebugInfo() { - return Ember.run.backburner.DEBUG === true && backburnerDebugInfoAvailable() ? Ember.run.backburner.getDebugInfo() : null; - } - /** - * Encapsulates debug information for an individual test. Aggregates information - * from: - * - info provided by getSettledState - * - hasPendingTimers - * - hasRunLoop - * - hasPendingWaiters - * - hasPendingRequests - * - info provided by backburner's getDebugInfo method (timers, schedules, and stack trace info) - * - */ - - - class TestDebugInfo { - constructor(settledState, debugInfo = getDebugInfo()) { - this._summaryInfo = undefined; - this._settledState = settledState; - this._debugInfo = debugInfo; - } - - get summary() { - if (!this._summaryInfo) { - this._summaryInfo = Ember.assign({}, this._settledState); - - if (this._debugInfo) { - this._summaryInfo.autorunStackTrace = this._debugInfo.autorun && this._debugInfo.autorun.stack; - this._summaryInfo.pendingTimersCount = this._debugInfo.timers.length; - this._summaryInfo.hasPendingTimers = this._settledState.hasPendingTimers && this._summaryInfo.pendingTimersCount > 0; - this._summaryInfo.pendingTimersStackTraces = this._debugInfo.timers.map(timer => timer.stack); - this._summaryInfo.pendingScheduledQueueItemCount = this._debugInfo.instanceStack.filter(q => q).reduce((total, item) => { - Object.keys(item).forEach(queueName => { - total += item[queueName].length; - }); - return total; - }, 0); - this._summaryInfo.pendingScheduledQueueItemStackTraces = this._debugInfo.instanceStack.filter(q => q).reduce((stacks, deferredActionQueues) => { - Object.keys(deferredActionQueues).forEach(queue => { - deferredActionQueues[queue].forEach(queueItem => queueItem.stack && stacks.push(queueItem.stack)); - }); - return stacks; - }, []); - } - - if (this._summaryInfo.hasPendingTestWaiters) { - this._summaryInfo.pendingTestWaiterInfo = (0, _emberTestWaiters.getPendingWaiterState)(); - } - } - - return this._summaryInfo; - } - - toConsole(_console = console) { - let summary = this.summary; - - if (summary.hasPendingRequests) { - _console.log(PENDING_AJAX_REQUESTS); - } - - if (summary.hasPendingLegacyWaiters) { - _console.log(PENDING_TEST_WAITERS); - } - - if (summary.hasPendingTestWaiters) { - if (!summary.hasPendingLegacyWaiters) { - _console.log(PENDING_TEST_WAITERS); - } - - Object.keys(summary.pendingTestWaiterInfo.waiters).forEach(waiterName => { - let waiterDebugInfo = summary.pendingTestWaiterInfo.waiters[waiterName]; - - if (Array.isArray(waiterDebugInfo)) { - _console.group(waiterName); - - waiterDebugInfo.forEach(debugInfo => { - _console.log(`${debugInfo.label ? debugInfo.label : 'stack'}: ${debugInfo.stack}`); - }); - - _console.groupEnd(); - } else { - _console.log(waiterName); - } - }); - } - - if (summary.hasPendingTimers || summary.pendingScheduledQueueItemCount > 0) { - _console.group(SCHEDULED_ASYNC); - - summary.pendingTimersStackTraces.forEach(timerStack => { - _console.log(timerStack); - }); - summary.pendingScheduledQueueItemStackTraces.forEach(scheduleQueueItemStack => { - _console.log(scheduleQueueItemStack); - }); - - _console.groupEnd(); - } - - if (summary.hasRunLoop && summary.pendingTimersCount === 0 && summary.pendingScheduledQueueItemCount === 0) { - _console.log(SCHEDULED_AUTORUN); - - if (summary.autorunStackTrace) { - _console.log(summary.autorunStackTrace); - } - } - - _debugInfoHelpers.debugInfoHelpers.forEach(helper => { - helper.log(); - }); - } - - _formatCount(title, count) { - return `${title}: ${count}`; - } - - } - - _exports.TestDebugInfo = TestDebugInfo; -}); -define("@ember/test-helpers/-tuple", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = tuple; - - // eslint-disable-next-line require-jsdoc - function tuple(...args) { - return args; - } -}); -define("@ember/test-helpers/-utils", ["exports", "@ember/test-helpers/has-ember-version"], function (_exports, _hasEmberVersion) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.nextTickPromise = nextTickPromise; - _exports.runDestroyablesFor = runDestroyablesFor; - _exports.isNumeric = isNumeric; - _exports.futureTick = _exports.nextTick = _exports._Promise = void 0; - - class _Promise extends Ember.RSVP.Promise {} - - _exports._Promise = _Promise; - const ORIGINAL_RSVP_ASYNC = Ember.RSVP.configure('async'); - /* - Long ago in a galaxy far far away, Ember forced RSVP.Promise to "resolve" on the Ember.run loop. - At the time, this was meant to help ease pain with folks receiving the dreaded "auto-run" assertion - during their tests, and to help ensure that promise resolution was coelesced to avoid "thrashing" - of the DOM. Unfortunately, the result of this configuration is that code like the following behaves - differently if using native `Promise` vs `RSVP.Promise`: - - ```js - console.log('first'); - Ember.run(() => Promise.resolve().then(() => console.log('second'))); - console.log('third'); - ``` - - When `Promise` is the native promise that will log `'first', 'third', 'second'`, but when `Promise` - is an `RSVP.Promise` that will log `'first', 'second', 'third'`. The fact that `RSVP.Promise`s can - be **forced** to flush synchronously is very scary! - - Now, lets talk about why we are configuring `RSVP`'s `async` below... - - --- - - The following _should_ always be guaranteed: - - ```js - await settled(); - - isSettled() === true - ``` - - Unfortunately, without the custom `RSVP` `async` configuration we cannot ensure that `isSettled()` will - be truthy. This is due to the fact that Ember has configured `RSVP` to resolve all promises in the run - loop. What that means practically is this: - - 1. all checks within `waitUntil` (used by `settled()` internally) are completed and we are "settled" - 2. `waitUntil` resolves the promise that it returned (to signify that the world is "settled") - 3. resolving the promise (since it is an `RSVP.Promise` and Ember has configured RSVP.Promise) creates - a new Ember.run loop in order to resolve - 4. the presence of that new run loop means that we are no longer "settled" - 5. `isSettled()` returns false 😭😭😭😭😭😭😭😭😭 - - This custom `RSVP.configure('async`, ...)` below provides a way to prevent the promises that are returned - from `settled` from causing this "loop" and instead "just use normal Promise semantics". - - 😩😫🙀 - */ - - Ember.RSVP.configure('async', (callback, promise) => { - if (promise instanceof _Promise) { - // @ts-ignore - avoid erroring about useless `Promise !== RSVP.Promise` comparison - // (this handles when folks have polyfilled via Promise = Ember.RSVP.Promise) - if (typeof Promise !== 'undefined' && Promise !== Ember.RSVP.Promise) { - // use real native promise semantics whenever possible - Promise.resolve().then(() => callback(promise)); - } else { - // fallback to using RSVP's natural `asap` (**not** the fake - // one configured by Ember...) - Ember.RSVP.asap(callback, promise); - } - } else { - // fall back to the normal Ember behavior - ORIGINAL_RSVP_ASYNC(callback, promise); - } - }); - const nextTick = typeof Promise === 'undefined' ? setTimeout : cb => Promise.resolve().then(cb); - _exports.nextTick = nextTick; - const futureTick = setTimeout; - /** - @private - @returns {Promise} Promise which can not be forced to be ran synchronously - */ - - _exports.futureTick = futureTick; - - function nextTickPromise() { - // Ember 3.4 removed the auto-run assertion, in 3.4+ we can (and should) avoid the "psuedo promisey" run loop configuration - // for our `nextTickPromise` implementation. This allows us to have real microtask based next tick timing... - if ((0, _hasEmberVersion.default)(3, 4)) { - return _Promise.resolve(); - } else { - // on older Ember's fallback to RSVP.Promise + a setTimeout - return new Ember.RSVP.Promise(resolve => { - nextTick(resolve); - }); - } - } - /** - Retrieves an array of destroyables from the specified property on the object - provided, iterates that array invoking each function, then deleting the - property (clearing the array). - - @private - @param {Object} object an object to search for the destroyable array within - @param {string} property the property on the object that contains the destroyable array - */ - - - function runDestroyablesFor(object, property) { - let destroyables = object[property]; - - if (!destroyables) { - return; - } - - for (let i = 0; i < destroyables.length; i++) { - destroyables[i](); - } - - delete object[property]; - } - /** - Returns whether the passed in string consists only of numeric characters. - - @private - @param {string} n input string - @returns {boolean} whether the input string consists only of numeric characters - */ - - - function isNumeric(n) { - return !isNaN(parseFloat(n)) && isFinite(Number(n)); - } -}); -define("@ember/test-helpers/application", ["exports", "@ember/test-helpers/resolver"], function (_exports, _resolver) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.setApplication = setApplication; - _exports.getApplication = getApplication; - - var __application__; - /** - Stores the provided application instance so that tests being ran will be aware of the application under test. - - - Required by `setupApplicationContext` method. - - Used by `setupContext` and `setupRenderingContext` when present. - - @public - @param {Ember.Application} application the application that will be tested - */ - - - function setApplication(application) { - __application__ = application; - - if (!(0, _resolver.getResolver)()) { - let Resolver = application.Resolver; - let resolver = Resolver.create({ - namespace: application - }); - (0, _resolver.setResolver)(resolver); - } - } - /** - Retrieve the application instance stored by `setApplication`. - - @public - @returns {Ember.Application} the previously stored application instance under test - */ - - - function getApplication() { - return __application__; - } -}); -define("@ember/test-helpers/build-owner", ["exports", "ember-test-helpers/legacy-0-6-x/build-registry"], function (_exports, _buildRegistry) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = buildOwner; - - /** - Creates an "owner" (an object that either _is_ or duck-types like an - `Ember.ApplicationInstance`) from the provided options. - - If `options.application` is present (e.g. setup by an earlier call to - `setApplication`) an `Ember.ApplicationInstance` is built via - `application.buildInstance()`. - - If `options.application` is not present, we fall back to using - `options.resolver` instead (setup via `setResolver`). This creates a mock - "owner" by using a custom created combination of `Ember.Registry`, - `Ember.Container`, `Ember._ContainerProxyMixin`, and - `Ember._RegistryProxyMixin`. - - @private - @param {Ember.Application} [application] the Ember.Application to build an instance from - @param {Ember.Resolver} [resolver] the resolver to use to back a "mock owner" - @returns {Promise} a promise resolving to the generated "owner" - */ - function buildOwner(application, resolver) { - if (application) { - return application.boot().then(app => app.buildInstance().boot()); - } - - if (!resolver) { - throw new Error('You must set up the ember-test-helpers environment with either `setResolver` or `setApplication` before running any tests.'); - } - - let { - owner - } = (0, _buildRegistry.default)(resolver); - return Ember.RSVP.Promise.resolve(owner); - } -}); -define("@ember/test-helpers/dom/-get-element", ["exports", "@ember/test-helpers/dom/get-root-element", "@ember/test-helpers/dom/-target"], function (_exports, _getRootElement, _target) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - /** - Used internally by the DOM interaction helpers to find one element. - - @private - @param {string|Element} target the element or selector to retrieve - @returns {Element} the target or selector - */ - function getElement(target) { - if (typeof target === 'string') { - let rootElement = (0, _getRootElement.default)(); - return rootElement.querySelector(target); - } else if ((0, _target.isElement)(target) || (0, _target.isDocument)(target)) { - return target; - } else if (target instanceof Window) { - return target.document; - } else { - throw new Error('Must use an element or a selector string'); - } - } - - var _default = getElement; - _exports.default = _default; -}); -define("@ember/test-helpers/dom/-get-elements", ["exports", "@ember/test-helpers/dom/get-root-element"], function (_exports, _getRootElement) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = getElements; - - /** - Used internally by the DOM interaction helpers to find multiple elements. - - @private - @param {string} target the selector to retrieve - @returns {NodeList} the matched elements - */ - function getElements(target) { - if (typeof target === 'string') { - let rootElement = (0, _getRootElement.default)(); - return rootElement.querySelectorAll(target); - } else { - throw new Error('Must use a selector string'); - } - } -}); -define("@ember/test-helpers/dom/-is-focusable", ["exports", "@ember/test-helpers/dom/-is-form-control", "@ember/test-helpers/dom/-target"], function (_exports, _isFormControl, _target) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = isFocusable; - const FOCUSABLE_TAGS = ['A']; // eslint-disable-next-line require-jsdoc - - function isFocusableElement(element) { - return FOCUSABLE_TAGS.indexOf(element.tagName) > -1; - } - /** - @private - @param {Element} element the element to check - @returns {boolean} `true` when the element is focusable, `false` otherwise - */ - - - function isFocusable(element) { - if ((0, _target.isDocument)(element)) { - return false; - } - - if ((0, _isFormControl.default)(element) || element.isContentEditable || isFocusableElement(element)) { - return true; - } - - return element.hasAttribute('tabindex'); - } -}); -define("@ember/test-helpers/dom/-is-form-control", ["exports", "@ember/test-helpers/dom/-target"], function (_exports, _target) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = isFormControl; - const FORM_CONTROL_TAGS = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA']; - /** - @private - @param {Element} element the element to check - @returns {boolean} `true` when the element is a form control, `false` otherwise - */ - - function isFormControl(element) { - return !(0, _target.isDocument)(element) && FORM_CONTROL_TAGS.indexOf(element.tagName) > -1 && element.type !== 'hidden'; - } -}); -define("@ember/test-helpers/dom/-target", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.isElement = isElement; - _exports.isDocument = isDocument; - - // eslint-disable-next-line require-jsdoc - function isElement(target) { - return target.nodeType === Node.ELEMENT_NODE; - } // eslint-disable-next-line require-jsdoc - - - function isDocument(target) { - return target.nodeType === Node.DOCUMENT_NODE; - } -}); -define("@ember/test-helpers/dom/-to-array", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = toArray; - - /** - @private - @param {NodeList} nodelist the nodelist to convert to an array - @returns {Array} an array - */ - function toArray(nodelist) { - let array = new Array(nodelist.length); - - for (let i = 0; i < nodelist.length; i++) { - array[i] = nodelist[i]; - } - - return array; - } -}); -define("@ember/test-helpers/dom/blur", ["exports", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/settled", "@ember/test-helpers/dom/-is-focusable", "@ember/test-helpers/-utils"], function (_exports, _getElement, _fireEvent, _settled, _isFocusable, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.__blur__ = __blur__; - _exports.default = blur; - - /** - @private - @param {Element} element the element to trigger events on - */ - function __blur__(element) { - let browserIsNotFocused = document.hasFocus && !document.hasFocus(); // makes `document.activeElement` be `body`. - // If the browser is focused, it also fires a blur event - - element.blur(); // Chrome/Firefox does not trigger the `blur` event if the window - // does not have focus. If the document does not have focus then - // fire `blur` event via native event. - - if (browserIsNotFocused) { - (0, _fireEvent.default)(element, 'blur', { - bubbles: false - }); - (0, _fireEvent.default)(element, 'focusout'); - } - } - /** - Unfocus the specified target. - - Sends a number of events intending to simulate a "real" user unfocusing an - element. - - The following events are triggered (in order): - - - `blur` - - `focusout` - - The exact listing of events that are triggered may change over time as needed - to continue to emulate how actual browsers handle unfocusing a given element. - - @public - @param {string|Element} [target=document.activeElement] the element or selector to unfocus - @return {Promise} resolves when settled - - @example - - Emulating blurring an input using `blur` - - - blur('input'); - */ - - - function blur(target = document.activeElement) { - return (0, _utils.nextTickPromise)().then(() => { - let element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`blur('${target}')\`.`); - } - - if (!(0, _isFocusable.default)(element)) { - throw new Error(`${target} is not focusable`); - } - - __blur__(element); - - return (0, _settled.default)(); - }); - } -}); -define("@ember/test-helpers/dom/click", ["exports", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/dom/focus", "@ember/test-helpers/settled", "@ember/test-helpers/dom/-is-focusable", "@ember/test-helpers/-utils", "@ember/test-helpers/dom/-is-form-control"], function (_exports, _getElement, _fireEvent, _focus, _settled, _isFocusable, _utils, _isFormControl) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.__click__ = __click__; - _exports.default = click; - - /** - @private - @param {Element} element the element to click on - @param {Object} options the options to be merged into the mouse events - */ - function __click__(element, options) { - (0, _fireEvent.default)(element, 'mousedown', options); - - if ((0, _isFocusable.default)(element)) { - (0, _focus.__focus__)(element); - } - - (0, _fireEvent.default)(element, 'mouseup', options); - (0, _fireEvent.default)(element, 'click', options); - } - /** - Clicks on the specified target. - - Sends a number of events intending to simulate a "real" user clicking on an - element. - - For non-focusable elements the following events are triggered (in order): - - - `mousedown` - - `mouseup` - - `click` - - For focusable (e.g. form control) elements the following events are triggered - (in order): - - - `mousedown` - - `focus` - - `focusin` - - `mouseup` - - `click` - - The exact listing of events that are triggered may change over time as needed - to continue to emulate how actual browsers handle clicking a given element. - - Use the `options` hash to change the parameters of the [MouseEvents](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent). - You can use this to specifiy modifier keys as well. - - @public - @param {string|Element} target the element or selector to click on - @param {Object} options the options to be merged into the mouse events - @return {Promise} resolves when settled - - @example - - Emulating clicking a button using `click` - - click('button'); - - @example - - Emulating clicking a button and pressing the `shift` key simultaneously using `click` with `options`. - - - click('button', { shiftKey: true }); - */ - - - function click(target, options = {}) { - return (0, _utils.nextTickPromise)().then(() => { - if (!target) { - throw new Error('Must pass an element or selector to `click`.'); - } - - let element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`click('${target}')\`.`); - } - - let isDisabledFormControl = (0, _isFormControl.default)(element) && element.disabled; - - if (!isDisabledFormControl) { - __click__(element, options); - } - - return (0, _settled.default)(); - }); - } -}); -define("@ember/test-helpers/dom/double-click", ["exports", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/dom/focus", "@ember/test-helpers/settled", "@ember/test-helpers/dom/-is-focusable", "@ember/test-helpers/-utils"], function (_exports, _getElement, _fireEvent, _focus, _settled, _isFocusable, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.__doubleClick__ = __doubleClick__; - _exports.default = doubleClick; - - /** - @private - @param {Element} element the element to double-click on - @param {Object} options the options to be merged into the mouse events - */ - function __doubleClick__(element, options) { - (0, _fireEvent.default)(element, 'mousedown', options); - - if ((0, _isFocusable.default)(element)) { - (0, _focus.__focus__)(element); - } - - (0, _fireEvent.default)(element, 'mouseup', options); - (0, _fireEvent.default)(element, 'click', options); - (0, _fireEvent.default)(element, 'mousedown', options); - (0, _fireEvent.default)(element, 'mouseup', options); - (0, _fireEvent.default)(element, 'click', options); - (0, _fireEvent.default)(element, 'dblclick', options); - } - /** - Double-clicks on the specified target. - - Sends a number of events intending to simulate a "real" user clicking on an - element. - - For non-focusable elements the following events are triggered (in order): - - - `mousedown` - - `mouseup` - - `click` - - `mousedown` - - `mouseup` - - `click` - - `dblclick` - - For focusable (e.g. form control) elements the following events are triggered - (in order): - - - `mousedown` - - `focus` - - `focusin` - - `mouseup` - - `click` - - `mousedown` - - `mouseup` - - `click` - - `dblclick` - - The exact listing of events that are triggered may change over time as needed - to continue to emulate how actual browsers handle clicking a given element. - - Use the `options` hash to change the parameters of the [MouseEvents](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent). - - @public - @param {string|Element} target the element or selector to double-click on - @param {Object} options the options to be merged into the mouse events - @return {Promise} resolves when settled - - @example - - Emulating double clicking a button using `doubleClick` - - - doubleClick('button'); - - @example - - Emulating double clicking a button and pressing the `shift` key simultaneously using `click` with `options`. - - - doubleClick('button', { shiftKey: true }); - */ - - - function doubleClick(target, options = {}) { - return (0, _utils.nextTickPromise)().then(() => { - if (!target) { - throw new Error('Must pass an element or selector to `doubleClick`.'); - } - - let element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`doubleClick('${target}')\`.`); - } - - __doubleClick__(element, options); - - return (0, _settled.default)(); - }); - } -}); -define("@ember/test-helpers/dom/fill-in", ["exports", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/-is-form-control", "@ember/test-helpers/dom/focus", "@ember/test-helpers/settled", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/-utils"], function (_exports, _getElement, _isFormControl, _focus, _settled, _fireEvent, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = fillIn; - - /** - Fill the provided text into the `value` property (or set `.innerHTML` when - the target is a content editable element) then trigger `change` and `input` - events on the specified target. - - @public - @param {string|Element} target the element or selector to enter text into - @param {string} text the text to fill into the target element - @return {Promise} resolves when the application is settled - - @example - - Emulating filling an input with text using `fillIn` - - - fillIn('input', 'hello world'); - */ - function fillIn(target, text) { - return (0, _utils.nextTickPromise)().then(() => { - if (!target) { - throw new Error('Must pass an element or selector to `fillIn`.'); - } - - let element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`fillIn('${target}')\`.`); - } - - let isControl = (0, _isFormControl.default)(element); - - if (!isControl && !element.isContentEditable) { - throw new Error('`fillIn` is only usable on form controls or contenteditable elements.'); - } - - if (typeof text === 'undefined' || text === null) { - throw new Error('Must provide `text` when calling `fillIn`.'); - } - - (0, _focus.__focus__)(element); - - if (isControl) { - element.value = text; - } else { - element.innerHTML = text; - } - - (0, _fireEvent.default)(element, 'input'); - (0, _fireEvent.default)(element, 'change'); - return (0, _settled.default)(); - }); - } -}); -define("@ember/test-helpers/dom/find-all", ["exports", "@ember/test-helpers/dom/-get-elements", "@ember/test-helpers/dom/-to-array"], function (_exports, _getElements, _toArray) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = findAll; - - /** - Find all elements matched by the given selector. Similar to calling - `querySelectorAll()` on the test root element, but returns an array instead - of a `NodeList`. - - @public - @param {string} selector the selector to search for - @return {Array} array of matched elements - */ - function findAll(selector) { - if (!selector) { - throw new Error('Must pass a selector to `findAll`.'); - } - - if (arguments.length > 1) { - throw new Error('The `findAll` test helper only takes a single argument.'); - } - - return (0, _toArray.default)((0, _getElements.default)(selector)); - } -}); -define("@ember/test-helpers/dom/find", ["exports", "@ember/test-helpers/dom/-get-element"], function (_exports, _getElement) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = find; - - /** - Find the first element matched by the given selector. Equivalent to calling - `querySelector()` on the test root element. - - @public - @param {string} selector the selector to search for - @return {Element} matched element or null - */ - function find(selector) { - if (!selector) { - throw new Error('Must pass a selector to `find`.'); - } - - if (arguments.length > 1) { - throw new Error('The `find` test helper only takes a single argument.'); - } - - return (0, _getElement.default)(selector); - } -}); -define("@ember/test-helpers/dom/fire-event", ["exports", "@ember/test-helpers/dom/-target", "@ember/test-helpers/-tuple"], function (_exports, _target, _tuple) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.isKeyboardEventType = isKeyboardEventType; - _exports.isMouseEventType = isMouseEventType; - _exports.isFileSelectionEventType = isFileSelectionEventType; - _exports.isFileSelectionInput = isFileSelectionInput; - _exports.default = _exports.KEYBOARD_EVENT_TYPES = void 0; - - // eslint-disable-next-line require-jsdoc - const MOUSE_EVENT_CONSTRUCTOR = (() => { - try { - new MouseEvent('test'); - return true; - } catch (e) { - return false; - } - })(); - - const DEFAULT_EVENT_OPTIONS = { - bubbles: true, - cancelable: true - }; - const KEYBOARD_EVENT_TYPES = (0, _tuple.default)('keydown', 'keypress', 'keyup'); // eslint-disable-next-line require-jsdoc - - _exports.KEYBOARD_EVENT_TYPES = KEYBOARD_EVENT_TYPES; - - function isKeyboardEventType(eventType) { - return KEYBOARD_EVENT_TYPES.indexOf(eventType) > -1; - } - - const MOUSE_EVENT_TYPES = (0, _tuple.default)('click', 'mousedown', 'mouseup', 'dblclick', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover'); // eslint-disable-next-line require-jsdoc - - function isMouseEventType(eventType) { - return MOUSE_EVENT_TYPES.indexOf(eventType) > -1; - } - - const FILE_SELECTION_EVENT_TYPES = (0, _tuple.default)('change'); // eslint-disable-next-line require-jsdoc - - function isFileSelectionEventType(eventType) { - return FILE_SELECTION_EVENT_TYPES.indexOf(eventType) > -1; - } // eslint-disable-next-line require-jsdoc - - - function isFileSelectionInput(element) { - return element.files; - } - /** - Internal helper used to build and dispatch events throughout the other DOM helpers. - - @private - @param {Element} element the element to dispatch the event to - @param {string} eventType the type of event - @param {Object} [options] additional properties to be set on the event - @returns {Event} the event that was dispatched - */ - - - function fireEvent(element, eventType, options = {}) { - if (!element) { - throw new Error('Must pass an element to `fireEvent`'); - } - - let event; - - if (isKeyboardEventType(eventType)) { - event = buildKeyboardEvent(eventType, options); - } else if (isMouseEventType(eventType)) { - let rect; - - if (element instanceof Window && element.document.documentElement) { - rect = element.document.documentElement.getBoundingClientRect(); - } else if ((0, _target.isDocument)(element)) { - rect = element.documentElement.getBoundingClientRect(); - } else if ((0, _target.isElement)(element)) { - rect = element.getBoundingClientRect(); - } else { - return; - } - - let x = rect.left + 1; - let y = rect.top + 1; - let simulatedCoordinates = { - screenX: x + 5, - screenY: y + 95, - clientX: x, - clientY: y - }; - event = buildMouseEvent(eventType, Ember.assign(simulatedCoordinates, options)); - } else if (isFileSelectionEventType(eventType) && isFileSelectionInput(element)) { - event = buildFileEvent(eventType, element, options); - } else { - event = buildBasicEvent(eventType, options); - } - - element.dispatchEvent(event); - return event; - } - - var _default = fireEvent; // eslint-disable-next-line require-jsdoc - - _exports.default = _default; - - function buildBasicEvent(type, options = {}) { - let event = document.createEvent('Events'); - let bubbles = options.bubbles !== undefined ? options.bubbles : true; - let cancelable = options.cancelable !== undefined ? options.cancelable : true; - delete options.bubbles; - delete options.cancelable; // bubbles and cancelable are readonly, so they can be - // set when initializing event - - event.initEvent(type, bubbles, cancelable); - Ember.assign(event, options); - return event; - } // eslint-disable-next-line require-jsdoc - - - function buildMouseEvent(type, options = {}) { - let event; - let eventOpts = Ember.assign({ - view: window - }, DEFAULT_EVENT_OPTIONS, options); - - if (MOUSE_EVENT_CONSTRUCTOR) { - event = new MouseEvent(type, eventOpts); - } else { - try { - event = document.createEvent('MouseEvents'); - event.initMouseEvent(type, eventOpts.bubbles, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget); - } catch (e) { - event = buildBasicEvent(type, options); - } - } - - return event; - } // eslint-disable-next-line require-jsdoc - - - function buildKeyboardEvent(type, options = {}) { - let eventOpts = Ember.assign({}, DEFAULT_EVENT_OPTIONS, options); - let event; - let eventMethodName; - - try { - event = new KeyboardEvent(type, eventOpts); // Property definitions are required for B/C for keyboard event usage - // If this properties are not defined, when listening for key events - // keyCode/which will be 0. Also, keyCode and which now are string - // and if app compare it with === with integer key definitions, - // there will be a fail. - // - // https://w3c.github.io/uievents/#interface-keyboardevent - // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent - - Object.defineProperty(event, 'keyCode', { - get() { - return parseInt(eventOpts.keyCode); - } - - }); - Object.defineProperty(event, 'which', { - get() { - return parseInt(eventOpts.which); - } - - }); - return event; - } catch (e) {// left intentionally blank - } - - try { - event = document.createEvent('KeyboardEvents'); - eventMethodName = 'initKeyboardEvent'; - } catch (e) {// left intentionally blank - } - - if (!event) { - try { - event = document.createEvent('KeyEvents'); - eventMethodName = 'initKeyEvent'; - } catch (e) {// left intentionally blank - } - } - - if (event && eventMethodName) { - event[eventMethodName](type, eventOpts.bubbles, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode); - } else { - event = buildBasicEvent(type, options); - } - - return event; - } // eslint-disable-next-line require-jsdoc - - - function buildFileEvent(type, element, options = {}) { - let event = buildBasicEvent(type); - let files; - - if (Array.isArray(options)) { - (true && !(false) && Ember.deprecate('Passing the `options` param as an array to `triggerEvent` for file inputs is deprecated. Please pass an object with a key `files` containing the array instead.', false, { - id: 'ember-test-helpers.trigger-event.options-blob-array', - until: '2.0.0' - })); - files = options; - } else { - files = options.files; - } - - if (Array.isArray(files)) { - Object.defineProperty(files, 'item', { - value(index) { - return typeof index === 'number' ? this[index] : null; - } - - }); - Object.defineProperty(element, 'files', { - value: files, - configurable: true - }); - } - - Object.defineProperty(event, 'target', { - value: element - }); - return event; - } -}); -define("@ember/test-helpers/dom/focus", ["exports", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/settled", "@ember/test-helpers/dom/-is-focusable", "@ember/test-helpers/-utils"], function (_exports, _getElement, _fireEvent, _settled, _isFocusable, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.__focus__ = __focus__; - _exports.default = focus; - - /** - @private - @param {Element} element the element to trigger events on - */ - function __focus__(element) { - let browserIsNotFocused = document.hasFocus && !document.hasFocus(); // makes `document.activeElement` be `element`. If the browser is focused, it also fires a focus event - - element.focus(); // Firefox does not trigger the `focusin` event if the window - // does not have focus. If the document does not have focus then - // fire `focusin` event as well. - - if (browserIsNotFocused) { - // if the browser is not focused the previous `el.focus()` didn't fire an event, so we simulate it - (0, _fireEvent.default)(element, 'focus', { - bubbles: false - }); - (0, _fireEvent.default)(element, 'focusin'); - } - } - /** - Focus the specified target. - - Sends a number of events intending to simulate a "real" user focusing an - element. - - The following events are triggered (in order): - - - `focus` - - `focusin` - - The exact listing of events that are triggered may change over time as needed - to continue to emulate how actual browsers handle focusing a given element. - - @public - @param {string|Element} target the element or selector to focus - @return {Promise} resolves when the application is settled - - @example - - Emulating focusing an input using `focus` - - - focus('input'); - */ - - - function focus(target) { - return (0, _utils.nextTickPromise)().then(() => { - if (!target) { - throw new Error('Must pass an element or selector to `focus`.'); - } - - let element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`focus('${target}')\`.`); - } - - if (!(0, _isFocusable.default)(element)) { - throw new Error(`${target} is not focusable`); - } - - __focus__(element); - - return (0, _settled.default)(); - }); - } -}); -define("@ember/test-helpers/dom/get-root-element", ["exports", "@ember/test-helpers/setup-context", "@ember/test-helpers/dom/-target"], function (_exports, _setupContext, _target) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = getRootElement; - - /** - Get the root element of the application under test (usually `#ember-testing`) - - @public - @returns {Element} the root element - */ - function getRootElement() { - let context = (0, _setupContext.getContext)(); - let owner = context && context.owner; - - if (!owner) { - throw new Error('Must setup rendering context before attempting to interact with elements.'); - } - - let rootElement; // When the host app uses `setApplication` (instead of `setResolver`) the owner has - // a `rootElement` set on it with the element or id to be used - - if (owner && owner._emberTestHelpersMockOwner === undefined) { - rootElement = owner.rootElement; - } else { - rootElement = '#ember-testing'; - } - - if (rootElement instanceof Window) { - rootElement = rootElement.document; - } - - if ((0, _target.isElement)(rootElement) || (0, _target.isDocument)(rootElement)) { - return rootElement; - } else if (typeof rootElement === 'string') { - let _rootElement = document.querySelector(rootElement); - - if (_rootElement) { - return _rootElement; - } - - throw new Error(`Application.rootElement (${rootElement}) not found`); - } else { - throw new Error('Application.rootElement must be an element or a selector string'); - } - } -}); -define("@ember/test-helpers/dom/tap", ["exports", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/dom/click", "@ember/test-helpers/settled", "@ember/test-helpers/-utils"], function (_exports, _getElement, _fireEvent, _click, _settled, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = tap; - - /** - Taps on the specified target. - - Sends a number of events intending to simulate a "real" user tapping on an - element. - - For non-focusable elements the following events are triggered (in order): - - - `touchstart` - - `touchend` - - `mousedown` - - `mouseup` - - `click` - - For focusable (e.g. form control) elements the following events are triggered - (in order): - - - `touchstart` - - `touchend` - - `mousedown` - - `focus` - - `focusin` - - `mouseup` - - `click` - - The exact listing of events that are triggered may change over time as needed - to continue to emulate how actual browsers handle tapping on a given element. - - Use the `options` hash to change the parameters of the tap events. - - @public - @param {string|Element} target the element or selector to tap on - @param {Object} options the options to be merged into the touch events - @return {Promise} resolves when settled - - @example - - Emulating tapping a button using `tap` - - - tap('button'); - */ - function tap(target, options = {}) { - return (0, _utils.nextTickPromise)().then(() => { - if (!target) { - throw new Error('Must pass an element or selector to `tap`.'); - } - - let element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`tap('${target}')\`.`); - } - - let touchstartEv = (0, _fireEvent.default)(element, 'touchstart', options); - let touchendEv = (0, _fireEvent.default)(element, 'touchend', options); - - if (!touchstartEv.defaultPrevented && !touchendEv.defaultPrevented) { - (0, _click.__click__)(element, options); - } - - return (0, _settled.default)(); - }); - } -}); -define("@ember/test-helpers/dom/trigger-event", ["exports", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/settled", "@ember/test-helpers/-utils"], function (_exports, _getElement, _fireEvent, _settled, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = triggerEvent; - - /** - * Triggers an event on the specified target. - * - * @public - * @param {string|Element} target the element or selector to trigger the event on - * @param {string} eventType the type of event to trigger - * @param {Object} options additional properties to be set on the event - * @return {Promise} resolves when the application is settled - * - * @example - * - * Using `triggerEvent` to upload a file - * - * When using `triggerEvent` to upload a file the `eventType` must be `change` and you must pass the - * `options` param as an object with a key `files` containing an array of - * [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob). - * - * - * triggerEvent( - * 'input.fileUpload', - * 'change', - * { files: [new Blob(['Ember Rules!'])] } - * ); - * - * - * @example - * - * Using `triggerEvent` to upload a dropped file - * - * When using `triggerEvent` to handle a dropped (via drag-and-drop) file, the `eventType` must be `drop`. Assuming your `drop` event handler uses the [DataTransfer API](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer), - * you must pass the `options` param as an object with a key of `dataTransfer`. The `options.dataTransfer` object should have a `files` key, containing an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File). - * - * - * triggerEvent( - * '[data-test-drop-zone]', - * 'drop', - * { - * dataTransfer: { - * files: [new File(['Ember Rules!', 'ember-rules.txt'])] - * } - * } - * ) - */ - function triggerEvent(target, eventType, options) { - return (0, _utils.nextTickPromise)().then(() => { - if (!target) { - throw new Error('Must pass an element or selector to `triggerEvent`.'); - } - - let element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`triggerEvent('${target}', ...)\`.`); - } - - if (!eventType) { - throw new Error(`Must provide an \`eventType\` to \`triggerEvent\``); - } - - (0, _fireEvent.default)(element, eventType, options); - return (0, _settled.default)(); - }); - } -}); -define("@ember/test-helpers/dom/trigger-key-event", ["exports", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/settled", "@ember/test-helpers/-utils"], function (_exports, _getElement, _fireEvent, _settled, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.__triggerKeyEvent__ = __triggerKeyEvent__; - _exports.default = triggerKeyEvent; - const DEFAULT_MODIFIERS = Object.freeze({ - ctrlKey: false, - altKey: false, - shiftKey: false, - metaKey: false - }); // This is not a comprehensive list, but it is better than nothing. - - const keyFromKeyCode = { - 8: 'Backspace', - 9: 'Tab', - 13: 'Enter', - 16: 'Shift', - 17: 'Control', - 18: 'Alt', - 20: 'CapsLock', - 27: 'Escape', - 32: ' ', - 37: 'ArrowLeft', - 38: 'ArrowUp', - 39: 'ArrowRight', - 40: 'ArrowDown', - 48: '0', - 49: '1', - 50: '2', - 51: '3', - 52: '4', - 53: '5', - 54: '6', - 55: '7', - 56: '8', - 57: '9', - 65: 'a', - 66: 'b', - 67: 'c', - 68: 'd', - 69: 'e', - 70: 'f', - 71: 'g', - 72: 'h', - 73: 'i', - 74: 'j', - 75: 'k', - 76: 'l', - 77: 'm', - 78: 'n', - 79: 'o', - 80: 'p', - 81: 'q', - 82: 'r', - 83: 's', - 84: 't', - 85: 'u', - 86: 'v', - 87: 'v', - 88: 'x', - 89: 'y', - 90: 'z', - 91: 'Meta', - 93: 'Meta', - 187: '=', - 189: '-' - }; - /** - Calculates the value of KeyboardEvent#key given a keycode and the modifiers. - Note that this works if the key is pressed in combination with the shift key, but it cannot - detect if caps lock is enabled. - @param {number} keycode The keycode of the event. - @param {object} modifiers The modifiers of the event. - @returns {string} The key string for the event. - */ - - function keyFromKeyCodeAndModifiers(keycode, modifiers) { - if (keycode > 64 && keycode < 91) { - if (modifiers.shiftKey) { - return String.fromCharCode(keycode); - } else { - return String.fromCharCode(keycode).toLocaleLowerCase(); - } - } - - let key = keyFromKeyCode[keycode]; - - if (key) { - return key; - } - } - /** - * Infers the keycode from the given key - * @param {string} key The KeyboardEvent#key string - * @returns {number} The keycode for the given key - */ - - - function keyCodeFromKey(key) { - let keys = Object.keys(keyFromKeyCode); - let keyCode = keys.find(keyCode => keyFromKeyCode[Number(keyCode)] === key); - - if (!keyCode) { - keyCode = keys.find(keyCode => keyFromKeyCode[Number(keyCode)] === key.toLowerCase()); - } - - return keyCode !== undefined ? parseInt(keyCode) : undefined; - } - /** - @private - @param {Element | Document} element the element to trigger the key event on - @param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger - @param {number|string} key the `keyCode`(number) or `key`(string) of the event being triggered - @param {Object} [modifiers] the state of various modifier keys - */ - - - function __triggerKeyEvent__(element, eventType, key, modifiers = DEFAULT_MODIFIERS) { - let props; - - if (typeof key === 'number') { - props = { - keyCode: key, - which: key, - key: keyFromKeyCodeAndModifiers(key, modifiers) - }; - } else if (typeof key === 'string' && key.length !== 0) { - let firstCharacter = key[0]; - - if (firstCharacter !== firstCharacter.toUpperCase()) { - throw new Error(`Must provide a \`key\` to \`triggerKeyEvent\` that starts with an uppercase character but you passed \`${key}\`.`); - } - - if ((0, _utils.isNumeric)(key) && key.length > 1) { - throw new Error(`Must provide a numeric \`keyCode\` to \`triggerKeyEvent\` but you passed \`${key}\` as a string.`); - } - - let keyCode = keyCodeFromKey(key); - props = { - keyCode, - which: keyCode, - key - }; - } else { - throw new Error(`Must provide a \`key\` or \`keyCode\` to \`triggerKeyEvent\``); - } - - let options = Ember.assign(props, modifiers); - (0, _fireEvent.default)(element, eventType, options); - } - /** - Triggers a keyboard event of given type in the target element. - It also requires the developer to provide either a string with the [`key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values) - or the numeric [`keyCode`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode) of the pressed key. - Optionally the user can also provide a POJO with extra modifiers for the event. - - @public - @param {string|Element} target the element or selector to trigger the event on - @param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger - @param {number|string} key the `keyCode`(number) or `key`(string) of the event being triggered - @param {Object} [modifiers] the state of various modifier keys - @param {boolean} [modifiers.ctrlKey=false] if true the generated event will indicate the control key was pressed during the key event - @param {boolean} [modifiers.altKey=false] if true the generated event will indicate the alt key was pressed during the key event - @param {boolean} [modifiers.shiftKey=false] if true the generated event will indicate the shift key was pressed during the key event - @param {boolean} [modifiers.metaKey=false] if true the generated event will indicate the meta key was pressed during the key event - @return {Promise} resolves when the application is settled unless awaitSettled is false - - @example - - Emulating pressing the `ENTER` key on a button using `triggerKeyEvent` - - triggerKeyEvent('button', 'keydown', 'Enter'); - */ - - - function triggerKeyEvent(target, eventType, key, modifiers = DEFAULT_MODIFIERS) { - return (0, _utils.nextTickPromise)().then(() => { - if (!target) { - throw new Error('Must pass an element or selector to `triggerKeyEvent`.'); - } - - let element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`triggerKeyEvent('${target}', ...)\`.`); - } - - if (!eventType) { - throw new Error(`Must provide an \`eventType\` to \`triggerKeyEvent\``); - } - - if (!(0, _fireEvent.isKeyboardEventType)(eventType)) { - let validEventTypes = _fireEvent.KEYBOARD_EVENT_TYPES.join(', '); - - throw new Error(`Must provide an \`eventType\` of ${validEventTypes} to \`triggerKeyEvent\` but you passed \`${eventType}\`.`); - } - - __triggerKeyEvent__(element, eventType, key, modifiers); - - return (0, _settled.default)(); - }); - } -}); -define("@ember/test-helpers/dom/type-in", ["exports", "@ember/test-helpers/-utils", "@ember/test-helpers/settled", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/-is-form-control", "@ember/test-helpers/dom/focus", "@ember/test-helpers/dom/-is-focusable", "@ember/test-helpers/dom/fire-event", "@ember/test-helpers/dom/trigger-key-event"], function (_exports, _utils, _settled, _getElement, _isFormControl, _focus, _isFocusable, _fireEvent, _triggerKeyEvent) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = typeIn; - - /** - * Mimics character by character entry into the target `input` or `textarea` element. - * - * Allows for simulation of slow entry by passing an optional millisecond delay - * between key events. - - * The major difference between `typeIn` and `fillIn` is that `typeIn` triggers - * keyboard events as well as `input` and `change`. - * Typically this looks like `focus` -> `focusin` -> `keydown` -> `keypress` -> `keyup` -> `input` -> `change` - * per character of the passed text (this may vary on some browsers). - * - * @public - * @param {string|Element} target the element or selector to enter text into - * @param {string} text the test to fill the element with - * @param {Object} options {delay: x} (default 50) number of milliseconds to wait per keypress - * @return {Promise} resolves when the application is settled - * - * @example - * - * Emulating typing in an input using `typeIn` - * - * - * typeIn('hello world'); - */ - function typeIn(target, text, options = {}) { - return (0, _utils.nextTickPromise)().then(() => { - if (!target) { - throw new Error('Must pass an element or selector to `typeIn`.'); - } - - const element = (0, _getElement.default)(target); - - if (!element) { - throw new Error(`Element not found when calling \`typeIn('${target}')\``); - } - - if (!(0, _isFormControl.default)(element)) { - throw new Error('`typeIn` is only usable on form controls.'); - } - - if (typeof text === 'undefined' || text === null) { - throw new Error('Must provide `text` when calling `typeIn`.'); - } - - let { - delay = 50 - } = options; - - if ((0, _isFocusable.default)(element)) { - (0, _focus.__focus__)(element); - } - - return fillOut(element, text, delay).then(() => (0, _fireEvent.default)(element, 'change')).then(_settled.default); - }); - } // eslint-disable-next-line require-jsdoc - - - function fillOut(element, text, delay) { - const inputFunctions = text.split('').map(character => keyEntry(element, character)); - return inputFunctions.reduce((currentPromise, func) => { - return currentPromise.then(() => delayedExecute(delay)).then(func); - }, Ember.RSVP.Promise.resolve(undefined)); - } // eslint-disable-next-line require-jsdoc - - - function keyEntry(element, character) { - let shiftKey = character === character.toUpperCase() && character !== character.toLowerCase(); - let options = { - shiftKey - }; - let characterKey = character.toUpperCase(); - return function () { - return (0, _utils.nextTickPromise)().then(() => (0, _triggerKeyEvent.__triggerKeyEvent__)(element, 'keydown', characterKey, options)).then(() => (0, _triggerKeyEvent.__triggerKeyEvent__)(element, 'keypress', characterKey, options)).then(() => { - element.value = element.value + character; - (0, _fireEvent.default)(element, 'input'); - }).then(() => (0, _triggerKeyEvent.__triggerKeyEvent__)(element, 'keyup', characterKey, options)); - }; - } // eslint-disable-next-line require-jsdoc - - - function delayedExecute(delay) { - return new Ember.RSVP.Promise(resolve => { - setTimeout(resolve, delay); - }); - } -}); -define("@ember/test-helpers/dom/wait-for", ["exports", "@ember/test-helpers/wait-until", "@ember/test-helpers/dom/-get-element", "@ember/test-helpers/dom/-get-elements", "@ember/test-helpers/dom/-to-array", "@ember/test-helpers/-utils"], function (_exports, _waitUntil, _getElement, _getElements, _toArray, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = waitFor; - - /** - Used to wait for a particular selector to appear in the DOM. Due to the fact - that it does not wait for general settledness, this is quite useful for testing - interim DOM states (e.g. loading states, pending promises, etc). - - @param {string} selector the selector to wait for - @param {Object} [options] the options to be used - @param {number} [options.timeout=1000] the time to wait (in ms) for a match - @param {number} [options.count=null] the number of elements that should match the provided selector (null means one or more) - @return {Promise} resolves when the element(s) appear on the page - */ - function waitFor(selector, options = {}) { - return (0, _utils.nextTickPromise)().then(() => { - if (!selector) { - throw new Error('Must pass a selector to `waitFor`.'); - } - - let { - timeout = 1000, - count = null, - timeoutMessage - } = options; - - if (!timeoutMessage) { - timeoutMessage = `waitFor timed out waiting for selector "${selector}"`; - } - - let callback; - - if (count !== null) { - callback = () => { - let elements = (0, _getElements.default)(selector); - - if (elements.length === count) { - return (0, _toArray.default)(elements); - } - - return; - }; - } else { - callback = () => (0, _getElement.default)(selector); - } - - return (0, _waitUntil.default)(callback, { - timeout, - timeoutMessage - }); - }); - } -}); -define("@ember/test-helpers/global", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - /* globals global */ - var _default = (() => { - if (typeof self !== 'undefined') { - return self; - } else if (typeof window !== 'undefined') { - return window; - } else if (typeof global !== 'undefined') { - return global; - } else { - return Function('return this')(); - } - })(); - - _exports.default = _default; -}); -define("@ember/test-helpers/has-ember-version", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = hasEmberVersion; - - /** - Checks if the currently running Ember version is greater than or equal to the - specified major and minor version numbers. - - @private - @param {number} major the major version number to compare - @param {number} minor the minor version number to compare - @returns {boolean} true if the Ember version is >= MAJOR.MINOR specified, false otherwise - */ - function hasEmberVersion(major, minor) { - var numbers = Ember.VERSION.split('-')[0].split('.'); - var actualMajor = parseInt(numbers[0], 10); - var actualMinor = parseInt(numbers[1], 10); - return actualMajor > major || actualMajor === major && actualMinor >= minor; - } -}); -define("@ember/test-helpers/index", ["exports", "@ember/test-helpers/resolver", "@ember/test-helpers/application", "@ember/test-helpers/setup-context", "@ember/test-helpers/teardown-context", "@ember/test-helpers/setup-rendering-context", "@ember/test-helpers/teardown-rendering-context", "@ember/test-helpers/setup-application-context", "@ember/test-helpers/teardown-application-context", "@ember/test-helpers/settled", "@ember/test-helpers/wait-until", "@ember/test-helpers/validate-error-handler", "@ember/test-helpers/setup-onerror", "@ember/test-helpers/-internal/debug-info", "@ember/test-helpers/-internal/debug-info-helpers", "@ember/test-helpers/test-metadata", "@ember/test-helpers/dom/click", "@ember/test-helpers/dom/double-click", "@ember/test-helpers/dom/tap", "@ember/test-helpers/dom/focus", "@ember/test-helpers/dom/blur", "@ember/test-helpers/dom/trigger-event", "@ember/test-helpers/dom/trigger-key-event", "@ember/test-helpers/dom/fill-in", "@ember/test-helpers/dom/wait-for", "@ember/test-helpers/dom/get-root-element", "@ember/test-helpers/dom/find", "@ember/test-helpers/dom/find-all", "@ember/test-helpers/dom/type-in"], function (_exports, _resolver, _application, _setupContext, _teardownContext, _setupRenderingContext, _teardownRenderingContext, _setupApplicationContext, _teardownApplicationContext, _settled, _waitUntil, _validateErrorHandler, _setupOnerror, _debugInfo, _debugInfoHelpers, _testMetadata, _click, _doubleClick, _tap, _focus, _blur, _triggerEvent, _triggerKeyEvent, _fillIn, _waitFor, _getRootElement, _find, _findAll, _typeIn) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "setResolver", { - enumerable: true, - get: function () { - return _resolver.setResolver; - } - }); - Object.defineProperty(_exports, "getResolver", { - enumerable: true, - get: function () { - return _resolver.getResolver; - } - }); - Object.defineProperty(_exports, "getApplication", { - enumerable: true, - get: function () { - return _application.getApplication; - } - }); - Object.defineProperty(_exports, "setApplication", { - enumerable: true, - get: function () { - return _application.setApplication; - } - }); - Object.defineProperty(_exports, "setupContext", { - enumerable: true, - get: function () { - return _setupContext.default; - } - }); - Object.defineProperty(_exports, "getContext", { - enumerable: true, - get: function () { - return _setupContext.getContext; - } - }); - Object.defineProperty(_exports, "setContext", { - enumerable: true, - get: function () { - return _setupContext.setContext; - } - }); - Object.defineProperty(_exports, "unsetContext", { - enumerable: true, - get: function () { - return _setupContext.unsetContext; - } - }); - Object.defineProperty(_exports, "pauseTest", { - enumerable: true, - get: function () { - return _setupContext.pauseTest; - } - }); - Object.defineProperty(_exports, "resumeTest", { - enumerable: true, - get: function () { - return _setupContext.resumeTest; - } - }); - Object.defineProperty(_exports, "teardownContext", { - enumerable: true, - get: function () { - return _teardownContext.default; - } - }); - Object.defineProperty(_exports, "setupRenderingContext", { - enumerable: true, - get: function () { - return _setupRenderingContext.default; - } - }); - Object.defineProperty(_exports, "render", { - enumerable: true, - get: function () { - return _setupRenderingContext.render; - } - }); - Object.defineProperty(_exports, "clearRender", { - enumerable: true, - get: function () { - return _setupRenderingContext.clearRender; - } - }); - Object.defineProperty(_exports, "teardownRenderingContext", { - enumerable: true, - get: function () { - return _teardownRenderingContext.default; - } - }); - Object.defineProperty(_exports, "setupApplicationContext", { - enumerable: true, - get: function () { - return _setupApplicationContext.default; - } - }); - Object.defineProperty(_exports, "visit", { - enumerable: true, - get: function () { - return _setupApplicationContext.visit; - } - }); - Object.defineProperty(_exports, "currentRouteName", { - enumerable: true, - get: function () { - return _setupApplicationContext.currentRouteName; - } - }); - Object.defineProperty(_exports, "currentURL", { - enumerable: true, - get: function () { - return _setupApplicationContext.currentURL; - } - }); - Object.defineProperty(_exports, "teardownApplicationContext", { - enumerable: true, - get: function () { - return _teardownApplicationContext.default; - } - }); - Object.defineProperty(_exports, "settled", { - enumerable: true, - get: function () { - return _settled.default; - } - }); - Object.defineProperty(_exports, "isSettled", { - enumerable: true, - get: function () { - return _settled.isSettled; - } - }); - Object.defineProperty(_exports, "getSettledState", { - enumerable: true, - get: function () { - return _settled.getSettledState; - } - }); - Object.defineProperty(_exports, "waitUntil", { - enumerable: true, - get: function () { - return _waitUntil.default; - } - }); - Object.defineProperty(_exports, "validateErrorHandler", { - enumerable: true, - get: function () { - return _validateErrorHandler.default; - } - }); - Object.defineProperty(_exports, "setupOnerror", { - enumerable: true, - get: function () { - return _setupOnerror.default; - } - }); - Object.defineProperty(_exports, "resetOnerror", { - enumerable: true, - get: function () { - return _setupOnerror.resetOnerror; - } - }); - Object.defineProperty(_exports, "getDebugInfo", { - enumerable: true, - get: function () { - return _debugInfo.getDebugInfo; - } - }); - Object.defineProperty(_exports, "registerDebugInfoHelper", { - enumerable: true, - get: function () { - return _debugInfoHelpers.default; - } - }); - Object.defineProperty(_exports, "getTestMetadata", { - enumerable: true, - get: function () { - return _testMetadata.default; - } - }); - Object.defineProperty(_exports, "click", { - enumerable: true, - get: function () { - return _click.default; - } - }); - Object.defineProperty(_exports, "doubleClick", { - enumerable: true, - get: function () { - return _doubleClick.default; - } - }); - Object.defineProperty(_exports, "tap", { - enumerable: true, - get: function () { - return _tap.default; - } - }); - Object.defineProperty(_exports, "focus", { - enumerable: true, - get: function () { - return _focus.default; - } - }); - Object.defineProperty(_exports, "blur", { - enumerable: true, - get: function () { - return _blur.default; - } - }); - Object.defineProperty(_exports, "triggerEvent", { - enumerable: true, - get: function () { - return _triggerEvent.default; - } - }); - Object.defineProperty(_exports, "triggerKeyEvent", { - enumerable: true, - get: function () { - return _triggerKeyEvent.default; - } - }); - Object.defineProperty(_exports, "fillIn", { - enumerable: true, - get: function () { - return _fillIn.default; - } - }); - Object.defineProperty(_exports, "waitFor", { - enumerable: true, - get: function () { - return _waitFor.default; - } - }); - Object.defineProperty(_exports, "getRootElement", { - enumerable: true, - get: function () { - return _getRootElement.default; - } - }); - Object.defineProperty(_exports, "find", { - enumerable: true, - get: function () { - return _find.default; - } - }); - Object.defineProperty(_exports, "findAll", { - enumerable: true, - get: function () { - return _findAll.default; - } - }); - Object.defineProperty(_exports, "typeIn", { - enumerable: true, - get: function () { - return _typeIn.default; - } - }); -}); -define("@ember/test-helpers/resolver", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.setResolver = setResolver; - _exports.getResolver = getResolver; - - var __resolver__; - /** - Stores the provided resolver instance so that tests being ran can resolve - objects in the same way as a normal application. - - Used by `setupContext` and `setupRenderingContext` as a fallback when `setApplication` was _not_ used. - - @public - @param {Ember.Resolver} resolver the resolver to be used for testing - */ - - - function setResolver(resolver) { - __resolver__ = resolver; - } - /** - Retrieve the resolver instance stored by `setResolver`. - - @public - @returns {Ember.Resolver} the previously stored resolver - */ - - - function getResolver() { - return __resolver__; - } -}); -define("@ember/test-helpers/settled", ["exports", "@ember/test-helpers/-utils", "@ember/test-helpers/wait-until", "@ember/test-helpers/setup-application-context", "ember-test-waiters", "@ember/test-helpers/-internal/debug-info"], function (_exports, _utils, _waitUntil, _setupApplicationContext, _emberTestWaiters, _debugInfo) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports._teardownAJAXHooks = _teardownAJAXHooks; - _exports._setupAJAXHooks = _setupAJAXHooks; - _exports.getSettledState = getSettledState; - _exports.isSettled = isSettled; - _exports.default = settled; - - // Ember internally tracks AJAX requests in the same way that we do here for - // legacy style "acceptance" tests using the `ember-testing.js` asset provided - // by emberjs/ember.js itself. When `@ember/test-helpers`'s `settled` utility - // is used in a legacy acceptance test context any pending AJAX requests are - // not properly considered during the `isSettled` check below. - // - // This utilizes a local utility method present in Ember since around 2.8.0 to - // properly consider pending AJAX requests done within legacy acceptance tests. - const _internalPendingRequests = (() => { - let loader = Ember.__loader; - - if (loader.registry['ember-testing/test/pending_requests']) { - // Ember <= 3.1 - return loader.require('ember-testing/test/pending_requests').pendingRequests; - } else if (loader.registry['ember-testing/lib/test/pending_requests']) { - // Ember >= 3.2 - return loader.require('ember-testing/lib/test/pending_requests').pendingRequests; - } - - return () => 0; - })(); - - let requests; - /** - @private - @returns {number} the count of pending requests - */ - - function pendingRequests() { - let localRequestsPending = requests !== undefined ? requests.length : 0; - - let internalRequestsPending = _internalPendingRequests(); - - return localRequestsPending + internalRequestsPending; - } - /** - @private - @param {Event} event (unused) - @param {XMLHTTPRequest} xhr the XHR that has initiated a request - */ - - - function incrementAjaxPendingRequests(event, xhr) { - requests.push(xhr); - } - /** - @private - @param {Event} event (unused) - @param {XMLHTTPRequest} xhr the XHR that has initiated a request - */ - - - function decrementAjaxPendingRequests(event, xhr) { - // In most Ember versions to date (current version is 2.16) RSVP promises are - // configured to flush in the actions queue of the Ember run loop, however it - // is possible that in the future this changes to use "true" micro-task - // queues. - // - // The entire point here, is that _whenever_ promises are resolved will be - // before the next run of the JS event loop. Then in the next event loop this - // counter will decrement. In the specific case of AJAX, this means that any - // promises chained off of `$.ajax` will properly have their `.then` called - // _before_ this is decremented (and testing continues) - (0, _utils.nextTick)(() => { - for (let i = 0; i < requests.length; i++) { - if (xhr === requests[i]) { - requests.splice(i, 1); - } - } - }, 0); - } - /** - Clears listeners that were previously setup for `ajaxSend` and `ajaxComplete`. - - @private - */ - - - function _teardownAJAXHooks() { - // jQuery will not invoke `ajaxComplete` if - // 1. `transport.send` throws synchronously and - // 2. it has an `error` option which also throws synchronously - // We can no longer handle any remaining requests - requests = []; - - if (typeof jQuery === 'undefined') { - return; - } - - jQuery(document).off('ajaxSend', incrementAjaxPendingRequests); - jQuery(document).off('ajaxComplete', decrementAjaxPendingRequests); - } - /** - Sets up listeners for `ajaxSend` and `ajaxComplete`. - - @private - */ - - - function _setupAJAXHooks() { - requests = []; - - if (typeof jQuery === 'undefined') { - return; - } - - jQuery(document).on('ajaxSend', incrementAjaxPendingRequests); - jQuery(document).on('ajaxComplete', decrementAjaxPendingRequests); - } - - let _internalCheckWaiters; - - let loader = Ember.__loader; - - if (loader.registry['ember-testing/test/waiters']) { - // Ember <= 3.1 - _internalCheckWaiters = loader.require('ember-testing/test/waiters').checkWaiters; - } else if (loader.registry['ember-testing/lib/test/waiters']) { - // Ember >= 3.2 - _internalCheckWaiters = loader.require('ember-testing/lib/test/waiters').checkWaiters; - } - /** - @private - @returns {boolean} true if waiters are still pending - */ - - - function checkWaiters() { - let EmberTest = Ember.Test; - - if (_internalCheckWaiters) { - return _internalCheckWaiters(); - } else if (EmberTest.waiters) { - if (EmberTest.waiters.some(([context, callback]) => !callback.call(context))) { - return true; - } - } - - return false; - } - /** - Check various settledness metrics, and return an object with the following properties: - - - `hasRunLoop` - Checks if a run-loop has been started. If it has, this will - be `true` otherwise it will be `false`. - - `hasPendingTimers` - Checks if there are scheduled timers in the run-loop. - These pending timers are primarily registered by `Ember.run.schedule`. If - there are pending timers, this will be `true`, otherwise `false`. - - `hasPendingWaiters` - Checks if any registered test waiters are still - pending (e.g. the waiter returns `true`). If there are pending waiters, - this will be `true`, otherwise `false`. - - `hasPendingRequests` - Checks if there are pending AJAX requests (based on - `ajaxSend` / `ajaxComplete` events triggered by `jQuery.ajax`). If there - are pending requests, this will be `true`, otherwise `false`. - - `hasPendingTransitions` - Checks if there are pending route transitions. If the - router has not been instantiated / setup for the test yet this will return `null`, - if there are pending transitions, this will be `true`, otherwise `false`. - - `pendingRequestCount` - The count of pending AJAX requests. - - `debugInfo` - Debug information that's combined with info return from backburner's - getDebugInfo method. - - @public - @returns {Object} object with properties for each of the metrics used to determine settledness - */ - - - function getSettledState() { - let hasPendingTimers = Boolean(Ember.run.hasScheduledTimers()); - let hasRunLoop = Boolean(Ember.run.currentRunLoop); - let hasPendingLegacyWaiters = checkWaiters(); - let hasPendingTestWaiters = (0, _emberTestWaiters.hasPendingWaiters)(); - let pendingRequestCount = pendingRequests(); - let hasPendingRequests = pendingRequestCount > 0; - return { - hasPendingTimers, - hasRunLoop, - hasPendingWaiters: hasPendingLegacyWaiters || hasPendingTestWaiters, - hasPendingRequests, - hasPendingTransitions: (0, _setupApplicationContext.hasPendingTransitions)(), - pendingRequestCount, - debugInfo: new _debugInfo.TestDebugInfo({ - hasPendingTimers, - hasRunLoop, - hasPendingLegacyWaiters, - hasPendingTestWaiters, - hasPendingRequests - }) - }; - } - /** - Checks various settledness metrics (via `getSettledState()`) to determine if things are settled or not. - - Settled generally means that there are no pending timers, no pending waiters, - no pending AJAX requests, and no current run loop. However, new settledness - metrics may be added and used as they become available. - - @public - @returns {boolean} `true` if settled, `false` otherwise - */ - - - function isSettled() { - let { - hasPendingTimers, - hasRunLoop, - hasPendingRequests, - hasPendingWaiters, - hasPendingTransitions - } = getSettledState(); - - if (hasPendingTimers || hasRunLoop || hasPendingRequests || hasPendingWaiters || hasPendingTransitions) { - return false; - } - - return true; - } - /** - Returns a promise that resolves when in a settled state (see `isSettled` for - a definition of "settled state"). - - @public - @returns {Promise} resolves when settled - */ - - - function settled() { - return (0, _waitUntil.default)(isSettled, { - timeout: Infinity - }).then(() => {}); - } -}); -define("@ember/test-helpers/setup-application-context", ["exports", "@ember/test-helpers/-utils", "@ember/test-helpers/setup-context", "@ember/test-helpers/global", "@ember/test-helpers/has-ember-version", "@ember/test-helpers/settled", "@ember/test-helpers/test-metadata"], function (_exports, _utils, _setupContext, _global, _hasEmberVersion, _settled, _testMetadata) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.isApplicationTestContext = isApplicationTestContext; - _exports.hasPendingTransitions = hasPendingTransitions; - _exports.setupRouterSettlednessTracking = setupRouterSettlednessTracking; - _exports.visit = visit; - _exports.currentRouteName = currentRouteName; - _exports.currentURL = currentURL; - _exports.default = setupApplicationContext; - const CAN_USE_ROUTER_EVENTS = (0, _hasEmberVersion.default)(3, 6); - let routerTransitionsPending = null; - const ROUTER = new WeakMap(); - const HAS_SETUP_ROUTER = new WeakMap(); // eslint-disable-next-line require-jsdoc - - function isApplicationTestContext(context) { - return (0, _setupContext.isTestContext)(context); - } - /** - Determines if we have any pending router transtions (used to determine `settled` state) - - @public - @returns {(boolean|null)} if there are pending transitions - */ - - - function hasPendingTransitions() { - if (CAN_USE_ROUTER_EVENTS) { - return routerTransitionsPending; - } - - let context = (0, _setupContext.getContext)(); // there is no current context, we cannot check - - if (context === undefined) { - return null; - } - - let router = ROUTER.get(context); - - if (router === undefined) { - // if there is no router (e.g. no `visit` calls made yet), we cannot - // check for pending transitions but this is explicitly not an error - // condition - return null; - } - - let routerMicrolib = router._routerMicrolib || router.router; - - if (routerMicrolib === undefined) { - return null; - } - - return !!routerMicrolib.activeTransition; - } - /** - Setup the current router instance with settledness tracking. Generally speaking this - is done automatically (during a `visit('/some-url')` invocation), but under some - circumstances (e.g. a non-application test where you manually call `this.owner.setupRouter()`) - you may want to call it yourself. - - @public - */ - - - function setupRouterSettlednessTracking() { - const context = (0, _setupContext.getContext)(); - - if (context === undefined) { - throw new Error('Cannot setupRouterSettlednessTracking outside of a test context'); - } // avoid setting up many times for the same context - - - if (HAS_SETUP_ROUTER.get(context)) { - return; - } - - HAS_SETUP_ROUTER.set(context, true); - let { - owner - } = context; - let router; - - if (CAN_USE_ROUTER_EVENTS) { - router = owner.lookup('service:router'); // track pending transitions via the public routeWillChange / routeDidChange APIs - // routeWillChange can fire many times and is only useful to know when we have _started_ - // transitioning, we can then use routeDidChange to signal that the transition has settled - - router.on('routeWillChange', () => routerTransitionsPending = true); - router.on('routeDidChange', () => routerTransitionsPending = false); - } else { - router = owner.lookup('router:main'); - ROUTER.set(context, router); - } // hook into teardown to reset local settledness state - - - let ORIGINAL_WILL_DESTROY = router.willDestroy; - - router.willDestroy = function () { - routerTransitionsPending = null; - return ORIGINAL_WILL_DESTROY.apply(this, arguments); - }; - } - /** - Navigate the application to the provided URL. - - @public - @param {string} url The URL to visit (e.g. `/posts`) - @param {object} options app boot options - @returns {Promise} resolves when settled - */ - - - function visit(url, options) { - const context = (0, _setupContext.getContext)(); - - if (!context || !isApplicationTestContext(context)) { - throw new Error('Cannot call `visit` without having first called `setupApplicationContext`.'); - } - - let { - owner - } = context; - let testMetadata = (0, _testMetadata.default)(context); - testMetadata.usedHelpers.push('visit'); - return (0, _utils.nextTickPromise)().then(() => { - let visitResult = owner.visit(url, options); - setupRouterSettlednessTracking(); - return visitResult; - }).then(() => { - if (_global.default.EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) { - context.element = document.querySelector('#ember-testing > .ember-view'); - } else { - context.element = document.querySelector('#ember-testing'); - } - }).then(_settled.default); - } - /** - @public - @returns {string} the currently active route name - */ - - - function currentRouteName() { - const context = (0, _setupContext.getContext)(); - - if (!context || !isApplicationTestContext(context)) { - throw new Error('Cannot call `currentRouteName` without having first called `setupApplicationContext`.'); - } - - let router = context.owner.lookup('router:main'); - return Ember.get(router, 'currentRouteName'); - } - - const HAS_CURRENT_URL_ON_ROUTER = (0, _hasEmberVersion.default)(2, 13); - /** - @public - @returns {string} the applications current url - */ - - function currentURL() { - const context = (0, _setupContext.getContext)(); - - if (!context || !isApplicationTestContext(context)) { - throw new Error('Cannot call `currentURL` without having first called `setupApplicationContext`.'); - } - - let router = context.owner.lookup('router:main'); - - if (HAS_CURRENT_URL_ON_ROUTER) { - return Ember.get(router, 'currentURL'); - } else { - return Ember.get(router, 'location').getURL(); - } - } - /** - Used by test framework addons to setup the provided context for working with - an application (e.g. routing). - - `setupContext` must have been run on the provided context prior to calling - `setupApplicationContext`. - - Sets up the basic framework used by application tests. - - @public - @param {Object} context the context to setup - @returns {Promise} resolves with the context that was setup - */ - - - function setupApplicationContext(context) { - let testMetadata = (0, _testMetadata.default)(context); - testMetadata.setupTypes.push('setupApplicationContext'); - return (0, _utils.nextTickPromise)(); - } -}); -define("@ember/test-helpers/setup-context", ["exports", "@ember/test-helpers/build-owner", "@ember/test-helpers/settled", "@ember/test-helpers/global", "@ember/test-helpers/resolver", "@ember/test-helpers/application", "@ember/test-helpers/-utils", "@ember/test-helpers/test-metadata"], function (_exports, _buildOwner, _settled, _global, _resolver, _application, _utils, _testMetadata) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.isTestContext = isTestContext; - _exports.setContext = setContext; - _exports.getContext = getContext; - _exports.unsetContext = unsetContext; - _exports.pauseTest = pauseTest; - _exports.resumeTest = resumeTest; - _exports.default = setupContext; - _exports.CLEANUP = void 0; - - // eslint-disable-next-line require-jsdoc - function isTestContext(context) { - return typeof context.pauseTest === 'function' && typeof context.resumeTest === 'function'; - } - - let __test_context__; - /** - Stores the provided context as the "global testing context". - - Generally setup automatically by `setupContext`. - - @public - @param {Object} context the context to use - */ - - - function setContext(context) { - __test_context__ = context; - } - /** - Retrive the "global testing context" as stored by `setContext`. - - @public - @returns {Object} the previously stored testing context - */ - - - function getContext() { - return __test_context__; - } - /** - Clear the "global testing context". - - Generally invoked from `teardownContext`. - - @public - */ - - - function unsetContext() { - __test_context__ = undefined; - } - /** - * Returns a promise to be used to pauses the current test (due to being - * returned from the test itself). This is useful for debugging while testing - * or for test-driving. It allows you to inspect the state of your application - * at any point. - * - * The test framework wrapper (e.g. `ember-qunit` or `ember-mocha`) should - * ensure that when `pauseTest()` is used, any framework specific test timeouts - * are disabled. - * - * @public - * @returns {Promise} resolves _only_ when `resumeTest()` is invoked - * @example Usage via ember-qunit - * - * import { setupRenderingTest } from 'ember-qunit'; - * import { render, click, pauseTest } from '@ember/test-helpers'; - * - * - * module('awesome-sauce', function(hooks) { - * setupRenderingTest(hooks); - * - * test('does something awesome', async function(assert) { - * await render(hbs`{{awesome-sauce}}`); - * - * // added here to visualize / interact with the DOM prior - * // to the interaction below - * await pauseTest(); - * - * click('.some-selector'); - * - * assert.equal(this.element.textContent, 'this sauce is awesome!'); - * }); - * }); - */ - - - function pauseTest() { - let context = getContext(); - - if (!context || !isTestContext(context)) { - throw new Error('Cannot call `pauseTest` without having first called `setupTest` or `setupRenderingTest`.'); - } - - return context.pauseTest(); - } - /** - Resumes a test previously paused by `await pauseTest()`. - - @public - */ - - - function resumeTest() { - let context = getContext(); - - if (!context || !isTestContext(context)) { - throw new Error('Cannot call `resumeTest` without having first called `setupTest` or `setupRenderingTest`.'); - } - - context.resumeTest(); - } - - const CLEANUP = Object.create(null); - /** - Used by test framework addons to setup the provided context for testing. - - Responsible for: - - - sets the "global testing context" to the provided context (`setContext`) - - create an owner object and set it on the provided context (e.g. `this.owner`) - - setup `this.set`, `this.setProperties`, `this.get`, and `this.getProperties` to the provided context - - setting up AJAX listeners - - setting up `pauseTest` (also available as `this.pauseTest()`) and `resumeTest` helpers - - @public - @param {Object} context the context to setup - @param {Object} [options] options used to override defaults - @param {Resolver} [options.resolver] a resolver to use for customizing normal resolution - @returns {Promise} resolves with the context that was setup - */ - - _exports.CLEANUP = CLEANUP; - - function setupContext(context, options = {}) { - Ember.testing = true; - setContext(context); - let contextGuid = Ember.guidFor(context); - CLEANUP[contextGuid] = []; - let testMetadata = (0, _testMetadata.default)(context); - testMetadata.setupTypes.push('setupContext'); - Ember.run.backburner.DEBUG = true; - return (0, _utils.nextTickPromise)().then(() => { - let application = (0, _application.getApplication)(); - - if (application) { - return application.boot().then(() => {}); - } - - return; - }).then(() => { - let testElementContainer = document.getElementById('ember-testing-container'); // TODO remove "!" - - let fixtureResetValue = testElementContainer.innerHTML; // push this into the final cleanup bucket, to be ran _after_ the owner - // is destroyed and settled (e.g. flushed run loops, etc) - - CLEANUP[contextGuid].push(() => { - testElementContainer.innerHTML = fixtureResetValue; - }); - let { - resolver - } = options; // This handles precendence, specifying a specific option of - // resolver always trumps whatever is auto-detected, then we fallback to - // the suite-wide registrations - // - // At some later time this can be extended to support specifying a custom - // engine or application... - - if (resolver) { - return (0, _buildOwner.default)(null, resolver); - } - - return (0, _buildOwner.default)((0, _application.getApplication)(), (0, _resolver.getResolver)()); - }).then(owner => { - Object.defineProperty(context, 'owner', { - configurable: true, - enumerable: true, - value: owner, - writable: false - }); - Object.defineProperty(context, 'set', { - configurable: true, - enumerable: true, - - value(key, value) { - let ret = Ember.run(function () { - return Ember.set(context, key, value); - }); - return ret; - }, - - writable: false - }); - Object.defineProperty(context, 'setProperties', { - configurable: true, - enumerable: true, - - value(hash) { - let ret = Ember.run(function () { - return Ember.setProperties(context, hash); - }); - return ret; - }, - - writable: false - }); - Object.defineProperty(context, 'get', { - configurable: true, - enumerable: true, - - value(key) { - return Ember.get(context, key); - }, - - writable: false - }); - Object.defineProperty(context, 'getProperties', { - configurable: true, - enumerable: true, - - value(...args) { - return Ember.getProperties(context, args); - }, - - writable: false - }); - let resume; - - context.resumeTest = function resumeTest() { - (true && !(Boolean(resume)) && Ember.assert('Testing has not been paused. There is nothing to resume.', Boolean(resume))); - resume(); - _global.default.resumeTest = resume = undefined; - }; - - context.pauseTest = function pauseTest() { - console.info('Testing paused. Use `resumeTest()` to continue.'); // eslint-disable-line no-console - - return new Ember.RSVP.Promise(resolve => { - resume = resolve; - _global.default.resumeTest = resumeTest; - }, 'TestAdapter paused promise'); - }; - - (0, _settled._setupAJAXHooks)(); - return context; - }); - } -}); -define("@ember/test-helpers/setup-onerror", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = setupOnerror; - _exports.resetOnerror = void 0; - const ORIGINAL_EMBER_ONERROR = Ember.onerror; - /** - * Sets the `Ember.onerror` function for tests. This value is intended to be reset after - * each test to ensure correct test isolation. To reset, you should simply call `setupOnerror` - * without an `onError` argument. - * - * @public - * @param {Function} onError the onError function to be set on Ember.onerror - * - * @example Example implementation for `ember-qunit` or `ember-mocha` - * - * import { setupOnerror } from '@ember/test-helpers'; - * - * test('Ember.onerror is stubbed properly', function(assert) { - * setupOnerror(function(err) { - * assert.ok(err); - * }); - * }); - */ - - function setupOnerror(onError) { - if (typeof onError !== 'function') { - onError = ORIGINAL_EMBER_ONERROR; - } - - Ember.onerror = onError; - } - /** - * Resets `Ember.onerror` to the value it originally was at the start of the test run. - * - * @public - * - * @example - * - * import { resetOnerror } from '@ember/test-helpers'; - * - * QUnit.testDone(function() { - * resetOnerror(); - * }) - */ - - - const resetOnerror = setupOnerror; - _exports.resetOnerror = resetOnerror; -}); -define("@ember/test-helpers/setup-rendering-context", ["exports", "@ember/test-helpers/global", "@ember/test-helpers/setup-context", "@ember/test-helpers/-utils", "@ember/test-helpers/settled", "@ember/test-helpers/dom/get-root-element", "@ember/test-helpers/test-metadata"], function (_exports, _global, _setupContext, _utils, _settled, _getRootElement, _testMetadata) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.isRenderingTestContext = isRenderingTestContext; - _exports.render = render; - _exports.clearRender = clearRender; - _exports.default = setupRenderingContext; - _exports.RENDERING_CLEANUP = void 0; - const RENDERING_CLEANUP = Object.create(null); - _exports.RENDERING_CLEANUP = RENDERING_CLEANUP; - const OUTLET_TEMPLATE = Ember.HTMLBars.template({ - "id": "Lvsp1nVR", - "block": "{\"symbols\":[],\"statements\":[[1,[30,[36,1],[[30,[36,0],null,null]],null]]],\"hasEval\":false,\"upvars\":[\"-outlet\",\"component\"]}", - "meta": {} - }); - const EMPTY_TEMPLATE = Ember.HTMLBars.template({ - "id": "cgf6XJaX", - "block": "{\"symbols\":[],\"statements\":[],\"hasEval\":false,\"upvars\":[]}", - "meta": {} - }); // eslint-disable-next-line require-jsdoc - - function isRenderingTestContext(context) { - return (0, _setupContext.isTestContext)(context) && typeof context.render === 'function' && typeof context.clearRender === 'function'; - } - /** - @private - @param {Ember.ApplicationInstance} owner the current owner instance - @param {string} templateFullName the fill template name - @returns {Template} the template representing `templateFullName` - */ - - - function lookupTemplate(owner, templateFullName) { - let template = owner.lookup(templateFullName); - if (typeof template === 'function') return template(owner); - return template; - } - /** - @private - @param {Ember.ApplicationInstance} owner the current owner instance - @returns {Template} a template representing {{outlet}} - */ - - - function lookupOutletTemplate(owner) { - let OutletTemplate = lookupTemplate(owner, 'template:-outlet'); - - if (!OutletTemplate) { - owner.register('template:-outlet', OUTLET_TEMPLATE); - OutletTemplate = lookupTemplate(owner, 'template:-outlet'); - } - - return OutletTemplate; - } - /** - @private - @param {string} [selector] the selector to search for relative to element - @returns {jQuery} a jQuery object representing the selector (or element itself if no selector) - */ - - - function jQuerySelector(selector) { - (true && !(false) && Ember.deprecate('Using this.$() in a rendering test has been deprecated, consider using this.element instead.', false, { - id: 'ember-test-helpers.rendering-context.jquery-element', - until: '2.0.0', - // @ts-ignore - url: 'https://emberjs.com/deprecations/v3.x#toc_jquery-apis' - })); - let { - element - } = (0, _setupContext.getContext)(); // emulates Ember internal behavor of `this.$` in a component - // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18 - - return selector ? _global.default.jQuery(selector, element) : _global.default.jQuery(element); - } - - let templateId = 0; - /** - Renders the provided template and appends it to the DOM. - - @public - @param {CompiledTemplate} template the template to render - @returns {Promise} resolves when settled - */ - - function render(template) { - let context = (0, _setupContext.getContext)(); - - if (!template) { - throw new Error('you must pass a template to `render()`'); - } - - return (0, _utils.nextTickPromise)().then(() => { - if (!context || !isRenderingTestContext(context)) { - throw new Error('Cannot call `render` without having first called `setupRenderingContext`.'); - } - - let { - owner - } = context; - let testMetadata = (0, _testMetadata.default)(context); - testMetadata.usedHelpers.push('render'); - let toplevelView = owner.lookup('-top-level-view:main'); - let OutletTemplate = lookupOutletTemplate(owner); - templateId += 1; - let templateFullName = `template:-undertest-${templateId}`; - owner.register(templateFullName, template); - let outletState = { - render: { - owner, - into: undefined, - outlet: 'main', - name: 'application', - controller: undefined, - ViewClass: undefined, - template: OutletTemplate - }, - outlets: { - main: { - render: { - owner, - into: undefined, - outlet: 'main', - name: 'index', - controller: context, - ViewClass: undefined, - template: lookupTemplate(owner, templateFullName), - outlets: {} - }, - outlets: {} - } - } - }; - toplevelView.setOutletState(outletState); // returning settled here because the actual rendering does not happen until - // the renderer detects it is dirty (which happens on backburner's end - // hook), see the following implementation details: - // - // * [view:outlet](https://github.com/emberjs/ember.js/blob/f94a4b6aef5b41b96ef2e481f35e07608df01440/packages/ember-glimmer/lib/views/outlet.js#L129-L145) manually dirties its own tag upon `setOutletState` - // * [backburner's custom end hook](https://github.com/emberjs/ember.js/blob/f94a4b6aef5b41b96ef2e481f35e07608df01440/packages/ember-glimmer/lib/renderer.js#L145-L159) detects that the current revision of the root is no longer the latest, and triggers a new rendering transaction - - return (0, _settled.default)(); - }); - } - /** - Clears any templates previously rendered. This is commonly used for - confirming behavior that is triggered by teardown (e.g. - `willDestroyElement`). - - @public - @returns {Promise} resolves when settled - */ - - - function clearRender() { - let context = (0, _setupContext.getContext)(); - - if (!context || !isRenderingTestContext(context)) { - throw new Error('Cannot call `clearRender` without having first called `setupRenderingContext`.'); - } - - return render(EMPTY_TEMPLATE); - } - /** - Used by test framework addons to setup the provided context for rendering. - - `setupContext` must have been ran on the provided context - prior to calling `setupRenderingContext`. - - Responsible for: - - - Setup the basic framework used for rendering by the - `render` helper. - - Ensuring the event dispatcher is properly setup. - - Setting `this.element` to the root element of the testing - container (things rendered via `render` will go _into_ this - element). - - @public - @param {Object} context the context to setup for rendering - @returns {Promise} resolves with the context that was setup - */ - - - function setupRenderingContext(context) { - let contextGuid = Ember.guidFor(context); - RENDERING_CLEANUP[contextGuid] = []; - let testMetadata = (0, _testMetadata.default)(context); - testMetadata.setupTypes.push('setupRenderingContext'); - return (0, _utils.nextTickPromise)().then(() => { - let { - owner - } = context; // these methods being placed on the context itself will be deprecated in - // a future version (no giant rush) to remove some confusion about which - // is the "right" way to things... - - Object.defineProperty(context, 'render', { - configurable: true, - enumerable: true, - value: render, - writable: false - }); - Object.defineProperty(context, 'clearRender', { - configurable: true, - enumerable: true, - value: clearRender, - writable: false - }); - - if (_global.default.jQuery) { - Object.defineProperty(context, '$', { - configurable: true, - enumerable: true, - value: jQuerySelector, - writable: false - }); - } // When the host app uses `setApplication` (instead of `setResolver`) the event dispatcher has - // already been setup via `applicationInstance.boot()` in `./build-owner`. If using - // `setResolver` (instead of `setApplication`) a "mock owner" is created by extending - // `Ember._ContainerProxyMixin` and `Ember._RegistryProxyMixin` in this scenario we need to - // manually start the event dispatcher. - - - if (owner._emberTestHelpersMockOwner) { - let dispatcher = owner.lookup('event_dispatcher:main') || Ember.EventDispatcher.create(); - dispatcher.setup({}, '#ember-testing'); - } - - let OutletView = owner.factoryFor ? owner.factoryFor('view:-outlet') : owner._lookupFactory('view:-outlet'); - let toplevelView = OutletView.create(); - owner.register('-top-level-view:main', { - create() { - return toplevelView; - } - - }); // initially render a simple empty template - - return render(EMPTY_TEMPLATE).then(() => { - Ember.run(toplevelView, 'appendTo', (0, _getRootElement.default)()); - return (0, _settled.default)(); - }); - }).then(() => { - Object.defineProperty(context, 'element', { - configurable: true, - enumerable: true, - // ensure the element is based on the wrapping toplevel view - // Ember still wraps the main application template with a - // normal tagged view - // - // In older Ember versions (2.4) the element itself is not stable, - // and therefore we cannot update the `this.element` until after the - // rendering is completed - value: _global.default.EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false ? (0, _getRootElement.default)().querySelector('.ember-view') : (0, _getRootElement.default)(), - writable: false - }); - return context; - }); - } -}); -define("@ember/test-helpers/teardown-application-context", ["exports", "@ember/test-helpers/-utils", "@ember/test-helpers/settled"], function (_exports, _utils, _settled) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = _default; - - /** - Used by test framework addons to tear down the provided context after testing is completed. - - @public - @param {Object} context the context to setup - @param {Object} [options] options used to override defaults - @param {boolean} [options.waitForSettled=true] should the teardown wait for `settled()`ness - @returns {Promise} resolves when settled - */ - function _default(context, options) { - let waitForSettled = true; - - if (options !== undefined && 'waitForSettled' in options) { - waitForSettled = options.waitForSettled; - } - - if (waitForSettled) { - return (0, _settled.default)(); - } - - return (0, _utils.nextTickPromise)(); - } -}); -define("@ember/test-helpers/teardown-context", ["exports", "@ember/test-helpers/settled", "@ember/test-helpers/setup-context", "@ember/test-helpers/-utils"], function (_exports, _settled, _setupContext, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = teardownContext; - - /** - Used by test framework addons to tear down the provided context after testing is completed. - - Responsible for: - - - un-setting the "global testing context" (`unsetContext`) - - destroy the contexts owner object - - remove AJAX listeners - - @public - @param {Object} context the context to setup - @param {Object} [options] options used to override defaults - @param {boolean} [options.waitForSettled=true] should the teardown wait for `settled()`ness - @returns {Promise} resolves when settled - */ - function teardownContext(context, options) { - let waitForSettled = true; - - if (options !== undefined && 'waitForSettled' in options) { - waitForSettled = options.waitForSettled; - } - - return (0, _utils.nextTickPromise)().then(() => { - let { - owner - } = context; - (0, _settled._teardownAJAXHooks)(); - Ember.run(owner, 'destroy'); - Ember.testing = false; - (0, _setupContext.unsetContext)(); - - if (waitForSettled) { - return (0, _settled.default)(); - } - - return (0, _utils.nextTickPromise)(); - }).finally(() => { - let contextGuid = Ember.guidFor(context); - (0, _utils.runDestroyablesFor)(_setupContext.CLEANUP, contextGuid); - - if (waitForSettled) { - return (0, _settled.default)(); - } - - return (0, _utils.nextTickPromise)(); - }); - } -}); -define("@ember/test-helpers/teardown-rendering-context", ["exports", "@ember/test-helpers/setup-rendering-context", "@ember/test-helpers/-utils", "@ember/test-helpers/settled"], function (_exports, _setupRenderingContext, _utils, _settled) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = teardownRenderingContext; - - /** - Used by test framework addons to tear down the provided context after testing is completed. - - Responsible for: - - - resetting the `ember-testing-container` to its original state (the value - when `setupRenderingContext` was called). - - @public - @param {Object} context the context to setup - @param {Object} [options] options used to override defaults - @param {boolean} [options.waitForSettled=true] should the teardown wait for `settled()`ness - @returns {Promise} resolves when settled - */ - function teardownRenderingContext(context, options) { - let waitForSettled = true; - - if (options !== undefined && 'waitForSettled' in options) { - waitForSettled = options.waitForSettled; - } - - return (0, _utils.nextTickPromise)().then(() => { - let contextGuid = Ember.guidFor(context); - (0, _utils.runDestroyablesFor)(_setupRenderingContext.RENDERING_CLEANUP, contextGuid); - - if (waitForSettled) { - return (0, _settled.default)(); - } - - return (0, _utils.nextTickPromise)(); - }); - } -}); -define("@ember/test-helpers/test-metadata", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = getTestMetadata; - _exports.TestMetadata = void 0; - - class TestMetadata { - constructor() { - this.setupTypes = []; - this.usedHelpers = []; - } - - get isRendering() { - return this.setupTypes.indexOf('setupRenderingContext') > -1 && this.usedHelpers.indexOf('render') > -1; - } - - get isApplication() { - return this.setupTypes.indexOf('setupApplicationContext') > -1; - } - - } - - _exports.TestMetadata = TestMetadata; - const TEST_METADATA = new WeakMap(); - /** - * Gets the test metadata associated with the provided test context. Will create - * a new test metadata object if one does not exist. - * - * @param {BaseContext} context the context to use - * @returns {ITestMetadata} the test metadata for the provided context - */ - - function getTestMetadata(context) { - if (!TEST_METADATA.has(context)) { - TEST_METADATA.set(context, new TestMetadata()); - } - - return TEST_METADATA.get(context); - } -}); -define("@ember/test-helpers/validate-error-handler", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = validateErrorHandler; - const VALID = Object.freeze({ - isValid: true, - message: null - }); - const INVALID = Object.freeze({ - isValid: false, - message: 'error handler should have re-thrown the provided error' - }); - /** - * Validate the provided error handler to confirm that it properly re-throws - * errors when `Ember.testing` is true. - * - * This is intended to be used by test framework hosts (or other libraries) to - * ensure that `Ember.onerror` is properly configured. Without a check like - * this, `Ember.onerror` could _easily_ swallow all errors and make it _seem_ - * like everything is just fine (and have green tests) when in reality - * everything is on fire... - * - * @public - * @param {Function} [callback=Ember.onerror] the callback to validate - * @returns {Object} object with `isValid` and `message` - * - * @example Example implementation for `ember-qunit` - * - * import { validateErrorHandler } from '@ember/test-helpers'; - * - * test('Ember.onerror is functioning properly', function(assert) { - * let result = validateErrorHandler(); - * assert.ok(result.isValid, result.message); - * }); - */ - - function validateErrorHandler(callback = Ember.onerror) { - if (callback === undefined || callback === null) { - return VALID; - } - - let error = new Error('Error handler validation error!'); - let originalEmberTesting = Ember.testing; - Ember.testing = true; - - try { - callback(error); - } catch (e) { - if (e === error) { - return VALID; - } - } finally { - Ember.testing = originalEmberTesting; - } - - return INVALID; - } -}); -define("@ember/test-helpers/wait-until", ["exports", "@ember/test-helpers/-utils"], function (_exports, _utils) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = waitUntil; - const TIMEOUTS = [0, 1, 2, 5, 7]; - const MAX_TIMEOUT = 10; - /** - Wait for the provided callback to return a truthy value. - - This does not leverage `settled()`, and as such can be used to manage async - while _not_ settled (e.g. "loading" or "pending" states). - - @public - @param {Function} callback the callback to use for testing when waiting should stop - @param {Object} [options] options used to override defaults - @param {number} [options.timeout=1000] the maximum amount of time to wait - @param {string} [options.timeoutMessage='waitUntil timed out'] the message to use in the reject on timeout - @returns {Promise} resolves with the callback value when it returns a truthy value - */ - - function waitUntil(callback, options = {}) { - let timeout = 'timeout' in options ? options.timeout : 1000; - let timeoutMessage = 'timeoutMessage' in options ? options.timeoutMessage : 'waitUntil timed out'; // creating this error eagerly so it has the proper invocation stack - - let waitUntilTimedOut = new Error(timeoutMessage); - return new _utils._Promise(function (resolve, reject) { - let time = 0; // eslint-disable-next-line require-jsdoc - - function scheduleCheck(timeoutsIndex) { - let interval = TIMEOUTS[timeoutsIndex]; - - if (interval === undefined) { - interval = MAX_TIMEOUT; - } - - (0, _utils.futureTick)(function () { - time += interval; - let value; - - try { - value = callback(); - } catch (error) { - reject(error); - return; - } - - if (value) { - resolve(value); - } else if (time < timeout) { - scheduleCheck(timeoutsIndex + 1); - } else { - reject(waitUntilTimedOut); - return; - } - }, interval); - } - - scheduleCheck(0); - }); - } -}); -define('ember-cli-test-loader/test-support/index', ['exports'], function (exports) { - /* globals requirejs, require */ - "use strict"; - - Object.defineProperty(exports, "__esModule", { - value: true - }); - exports.addModuleIncludeMatcher = addModuleIncludeMatcher; - exports.addModuleExcludeMatcher = addModuleExcludeMatcher; - let moduleIncludeMatchers = []; - let moduleExcludeMatchers = []; - - function addModuleIncludeMatcher(fn) { - moduleIncludeMatchers.push(fn); - } - - function addModuleExcludeMatcher(fn) { - moduleExcludeMatchers.push(fn); - } - - function checkMatchers(matchers, moduleName) { - return matchers.some(matcher => matcher(moduleName)); - } - - class TestLoader { - static load() { - new TestLoader().loadModules(); - } - - constructor() { - this._didLogMissingUnsee = false; - } - - shouldLoadModule(moduleName) { - return moduleName.match(/[-_]test$/); - } - - listModules() { - return Object.keys(requirejs.entries); - } - - listTestModules() { - let moduleNames = this.listModules(); - let testModules = []; - let moduleName; - - for (let i = 0; i < moduleNames.length; i++) { - moduleName = moduleNames[i]; - - if (checkMatchers(moduleExcludeMatchers, moduleName)) { - continue; - } - - if (checkMatchers(moduleIncludeMatchers, moduleName) || this.shouldLoadModule(moduleName)) { - testModules.push(moduleName); - } - } - - return testModules; - } - - loadModules() { - let testModules = this.listTestModules(); - let testModule; - - for (let i = 0; i < testModules.length; i++) { - testModule = testModules[i]; - this.require(testModule); - this.unsee(testModule); - } - } - - require(moduleName) { - try { - require(moduleName); - } catch (e) { - this.moduleLoadFailure(moduleName, e); - } - } - - unsee(moduleName) { - if (typeof require.unsee === 'function') { - require.unsee(moduleName); - } else if (!this._didLogMissingUnsee) { - this._didLogMissingUnsee = true; - if (typeof console !== 'undefined') { - console.warn('unable to require.unsee, please upgrade loader.js to >= v3.3.0'); - } - } - } - - moduleLoadFailure(moduleName, error) { - console.error('Error loading: ' + moduleName, error.stack); - } - }exports.default = TestLoader; - ; -}); -define("ember-qunit/adapter", ["exports", "qunit", "@ember/test-helpers/has-ember-version"], function (_exports, _qunit, _hasEmberVersion) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.nonTestDoneCallback = nonTestDoneCallback; - _exports.default = void 0; - - function unhandledRejectionAssertion(current, error) { - let message, source; - - if (typeof error === 'object' && error !== null) { - message = error.message; - source = error.stack; - } else if (typeof error === 'string') { - message = error; - source = 'unknown source'; - } else { - message = 'unhandledRejection occured, but it had no message'; - source = 'unknown source'; - } - - current.assert.pushResult({ - result: false, - actual: false, - expected: true, - message: message, - source: source - }); - } - - function nonTestDoneCallback() {} - - let Adapter = Ember.Test.Adapter.extend({ - init() { - this.doneCallbacks = []; - this.qunit = this.qunit || _qunit.default; - }, - - asyncStart() { - let currentTest = this.qunit.config.current; - let done = currentTest && currentTest.assert ? currentTest.assert.async() : nonTestDoneCallback; - this.doneCallbacks.push({ - test: currentTest, - done - }); - }, - - asyncEnd() { - let currentTest = this.qunit.config.current; - - if (this.doneCallbacks.length === 0) { - throw new Error('Adapter asyncEnd called when no async was expected. Please create an issue in ember-qunit.'); - } - - let { - test, - done - } = this.doneCallbacks.pop(); // In future, we should explore fixing this at a different level, specifically - // addressing the pairing of asyncStart/asyncEnd behavior in a more consistent way. - - if (test === currentTest) { - done(); - } - }, - - // clobber default implementation of `exception` will be added back for Ember - // < 2.17 just below... - exception: null - }); // Ember 2.17 and higher do not require the test adapter to have an `exception` - // method When `exception` is not present, the unhandled rejection is - // automatically re-thrown and will therefore hit QUnit's own global error - // handler (therefore appropriately causing test failure) - - if (!(0, _hasEmberVersion.default)(2, 17)) { - Adapter = Adapter.extend({ - exception(error) { - unhandledRejectionAssertion(_qunit.default.config.current, error); - } - - }); - } - - var _default = Adapter; - _exports.default = _default; -}); -define("ember-qunit/index", ["exports", "ember-qunit/legacy-2-x/module-for", "ember-qunit/legacy-2-x/module-for-component", "ember-qunit/legacy-2-x/module-for-model", "ember-qunit/adapter", "qunit", "ember-qunit/test-loader", "@ember/test-helpers", "ember-qunit/test-isolation-validation"], function (_exports, _moduleFor, _moduleForComponent, _moduleForModel, _adapter, _qunit, _testLoader, _testHelpers, _testIsolationValidation) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.setupTest = setupTest; - _exports.setupRenderingTest = setupRenderingTest; - _exports.setupApplicationTest = setupApplicationTest; - _exports.setupTestContainer = setupTestContainer; - _exports.startTests = startTests; - _exports.setupTestAdapter = setupTestAdapter; - _exports.setupEmberTesting = setupEmberTesting; - _exports.setupEmberOnerrorValidation = setupEmberOnerrorValidation; - _exports.setupResetOnerror = setupResetOnerror; - _exports.setupTestIsolationValidation = setupTestIsolationValidation; - _exports.start = start; - Object.defineProperty(_exports, "moduleFor", { - enumerable: true, - get: function () { - return _moduleFor.default; - } - }); - Object.defineProperty(_exports, "moduleForComponent", { - enumerable: true, - get: function () { - return _moduleForComponent.default; - } - }); - Object.defineProperty(_exports, "moduleForModel", { - enumerable: true, - get: function () { - return _moduleForModel.default; - } - }); - Object.defineProperty(_exports, "QUnitAdapter", { - enumerable: true, - get: function () { - return _adapter.default; - } - }); - Object.defineProperty(_exports, "nonTestDoneCallback", { - enumerable: true, - get: function () { - return _adapter.nonTestDoneCallback; - } - }); - Object.defineProperty(_exports, "module", { - enumerable: true, - get: function () { - return _qunit.module; - } - }); - Object.defineProperty(_exports, "test", { - enumerable: true, - get: function () { - return _qunit.test; - } - }); - Object.defineProperty(_exports, "skip", { - enumerable: true, - get: function () { - return _qunit.skip; - } - }); - Object.defineProperty(_exports, "only", { - enumerable: true, - get: function () { - return _qunit.only; - } - }); - Object.defineProperty(_exports, "todo", { - enumerable: true, - get: function () { - return _qunit.todo; - } - }); - Object.defineProperty(_exports, "loadTests", { - enumerable: true, - get: function () { - return _testLoader.loadTests; - } - }); - let waitForSettled = true; - - function setupTest(hooks, _options) { - let options = _options === undefined ? { - waitForSettled - } : Ember.assign({ - waitForSettled - }, _options); - hooks.beforeEach(function (assert) { - let testMetadata = (0, _testHelpers.getTestMetadata)(this); - testMetadata.framework = 'qunit'; - return (0, _testHelpers.setupContext)(this, options).then(() => { - let originalPauseTest = this.pauseTest; - - this.pauseTest = function QUnit_pauseTest() { - assert.timeout(-1); // prevent the test from timing out - // This is a temporary work around for - // https://github.com/emberjs/ember-qunit/issues/496 this clears the - // timeout that would fail the test when it hits the global testTimeout - // value. - - clearTimeout(_qunit.default.config.timeout); - return originalPauseTest.call(this); - }; - }); - }); - hooks.afterEach(function () { - return (0, _testHelpers.teardownContext)(this, options); - }); - } - - function setupRenderingTest(hooks, _options) { - let options = _options === undefined ? { - waitForSettled - } : Ember.assign({ - waitForSettled - }, _options); - setupTest(hooks, options); - hooks.beforeEach(function () { - return (0, _testHelpers.setupRenderingContext)(this); - }); - hooks.afterEach(function () { - return (0, _testHelpers.teardownRenderingContext)(this, options); - }); - } - - function setupApplicationTest(hooks, _options) { - let options = _options === undefined ? { - waitForSettled - } : Ember.assign({ - waitForSettled - }, _options); - setupTest(hooks, options); - hooks.beforeEach(function () { - return (0, _testHelpers.setupApplicationContext)(this); - }); - hooks.afterEach(function () { - return (0, _testHelpers.teardownApplicationContext)(this, options); - }); - } - /** - Uses current URL configuration to setup the test container. - - * If `?nocontainer` is set, the test container will be hidden. - * If `?dockcontainer` or `?devmode` are set the test container will be - absolutely positioned. - * If `?devmode` is set, the test container will be made full screen. - - @method setupTestContainer - */ - - - function setupTestContainer() { - let testContainer = document.getElementById('ember-testing-container'); - - if (!testContainer) { - return; - } - - let params = _qunit.default.urlParams; - let containerVisibility = params.nocontainer ? 'hidden' : 'visible'; - let containerPosition = params.dockcontainer || params.devmode ? 'fixed' : 'relative'; - - if (params.devmode) { - testContainer.className = ' full-screen'; - } - - testContainer.style.visibility = containerVisibility; - testContainer.style.position = containerPosition; - let qunitContainer = document.getElementById('qunit'); - - if (params.dockcontainer) { - qunitContainer.style.marginBottom = window.getComputedStyle(testContainer).height; - } - } - /** - Instruct QUnit to start the tests. - @method startTests - */ - - - function startTests() { - _qunit.default.start(); - } - /** - Sets up the `Ember.Test` adapter for usage with QUnit 2.x. - - @method setupTestAdapter - */ - - - function setupTestAdapter() { - Ember.Test.adapter = _adapter.default.create(); - } - /** - Ensures that `Ember.testing` is set to `true` before each test begins - (including `before` / `beforeEach`), and reset to `false` after each test is - completed. This is done via `QUnit.testStart` and `QUnit.testDone`. - - */ - - - function setupEmberTesting() { - _qunit.default.testStart(() => { - Ember.testing = true; - }); - - _qunit.default.testDone(() => { - Ember.testing = false; - }); - } - /** - Ensures that `Ember.onerror` (if present) is properly configured to re-throw - errors that occur while `Ember.testing` is `true`. - */ - - - function setupEmberOnerrorValidation() { - _qunit.default.module('ember-qunit: Ember.onerror validation', function () { - _qunit.default.test('Ember.onerror is functioning properly', function (assert) { - assert.expect(1); - let result = (0, _testHelpers.validateErrorHandler)(); - assert.ok(result.isValid, `Ember.onerror handler with invalid testing behavior detected. An Ember.onerror handler _must_ rethrow exceptions when \`Ember.testing\` is \`true\` or the test suite is unreliable. See https://git.io/vbine for more details.`); - }); - }); - } - - function setupResetOnerror() { - _qunit.default.testDone(_testHelpers.resetOnerror); - } - - function setupTestIsolationValidation(delay) { - waitForSettled = false; - Ember.run.backburner.DEBUG = true; - - _qunit.default.on('testStart', () => (0, _testIsolationValidation.installTestNotIsolatedHook)(delay)); - } - /** - @method start - @param {Object} [options] Options to be used for enabling/disabling behaviors - @param {Boolean} [options.loadTests] If `false` tests will not be loaded automatically. - @param {Boolean} [options.setupTestContainer] If `false` the test container will not - be setup based on `devmode`, `dockcontainer`, or `nocontainer` URL params. - @param {Boolean} [options.startTests] If `false` tests will not be automatically started - (you must run `QUnit.start()` to kick them off). - @param {Boolean} [options.setupTestAdapter] If `false` the default Ember.Test adapter will - not be updated. - @param {Boolean} [options.setupEmberTesting] `false` opts out of the - default behavior of setting `Ember.testing` to `true` before all tests and - back to `false` after each test will. - @param {Boolean} [options.setupEmberOnerrorValidation] If `false` validation - of `Ember.onerror` will be disabled. - @param {Boolean} [options.setupTestIsolationValidation] If `false` test isolation validation - will be disabled. - @param {Number} [options.testIsolationValidationDelay] When using - setupTestIsolationValidation this number represents the maximum amount of - time in milliseconds that is allowed _after_ the test is completed for all - async to have been completed. The default value is 50. - */ - - - function start(options = {}) { - if (options.loadTests !== false) { - (0, _testLoader.loadTests)(); - } - - if (options.setupTestContainer !== false) { - setupTestContainer(); - } - - if (options.setupTestAdapter !== false) { - setupTestAdapter(); - } - - if (options.setupEmberTesting !== false) { - setupEmberTesting(); - } - - if (options.setupEmberOnerrorValidation !== false) { - setupEmberOnerrorValidation(); - } - - if (typeof options.setupTestIsolationValidation !== 'undefined' && options.setupTestIsolationValidation !== false) { - setupTestIsolationValidation(options.testIsolationValidationDelay); - } - - if (options.startTests !== false) { - startTests(); - } - - setupResetOnerror(); - } -}); -define("ember-qunit/legacy-2-x/module-for-component", ["exports", "ember-qunit/legacy-2-x/qunit-module", "ember-test-helpers"], function (_exports, _qunitModule, _emberTestHelpers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = moduleForComponent; - - function moduleForComponent(name, description, callbacks) { - (0, _qunitModule.createModule)(_emberTestHelpers.TestModuleForComponent, name, description, callbacks); - (true && !(false) && Ember.deprecate(`The usage "moduleForComponent" is deprecated. Please migrate the "${name}" module to use "setupRenderingTest".`, false, { - id: 'ember-qunit.deprecate-legacy-apis', - until: '5.0.0', - url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md' - })); - } -}); -define("ember-qunit/legacy-2-x/module-for-model", ["exports", "ember-qunit/legacy-2-x/qunit-module", "ember-test-helpers"], function (_exports, _qunitModule, _emberTestHelpers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = moduleForModel; - - function moduleForModel(name, description, callbacks) { - (true && !(false) && Ember.deprecate(`The usage "moduleForModel" is deprecated. Please migrate the "${name}" module to the new test APIs.`, false, { - id: 'ember-qunit.deprecate-legacy-apis', - until: '5.0.0', - url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md' - })); - (0, _qunitModule.createModule)(_emberTestHelpers.TestModuleForModel, name, description, callbacks); - } -}); -define("ember-qunit/legacy-2-x/module-for", ["exports", "ember-qunit/legacy-2-x/qunit-module", "ember-test-helpers"], function (_exports, _qunitModule, _emberTestHelpers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = moduleFor; - - function moduleFor(name, description, callbacks) { - (true && !(false) && Ember.deprecate(`The usage "moduleFor" is deprecated. Please migrate the "${name}" module to use "module"`, false, { - id: 'ember-qunit.deprecate-legacy-apis', - until: '5.0.0', - url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md' - })); - (0, _qunitModule.createModule)(_emberTestHelpers.TestModule, name, description, callbacks); - } -}); -define("ember-qunit/legacy-2-x/qunit-module", ["exports", "qunit"], function (_exports, _qunit) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.createModule = createModule; - - function noop() {} - - function callbackFor(name, callbacks) { - if (typeof callbacks !== 'object') { - return noop; - } - - if (!callbacks) { - return noop; - } - - var callback = noop; - - if (callbacks[name]) { - callback = callbacks[name]; - delete callbacks[name]; - } - - return callback; - } - - function createModule(Constructor, name, description, callbacks) { - if (!callbacks && typeof description === 'object') { - callbacks = description; - description = name; - } - - var before = callbackFor('before', callbacks); - var beforeEach = callbackFor('beforeEach', callbacks); - var afterEach = callbackFor('afterEach', callbacks); - var after = callbackFor('after', callbacks); - var module; - var moduleName = typeof description === 'string' ? description : name; - (0, _qunit.module)(moduleName, { - before() { - // storing this in closure scope to avoid exposing these - // private internals to the test context - module = new Constructor(name, description, callbacks); - return before.apply(this, arguments); - }, - - beforeEach() { - // provide the test context to the underlying module - module.setContext(this); - return module.setup(...arguments).then(() => { - return beforeEach.apply(this, arguments); - }); - }, - - afterEach() { - let result = afterEach.apply(this, arguments); - return Ember.RSVP.resolve(result).then(() => module.teardown(...arguments)); - }, - - after() { - try { - return after.apply(this, arguments); - } finally { - after = afterEach = before = beforeEach = callbacks = module = null; - } - } - - }); - } -}); -define("ember-qunit/test-isolation-validation", ["exports", "qunit", "@ember/test-helpers"], function (_exports, _qunit, _testHelpers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.detectIfTestNotIsolated = detectIfTestNotIsolated; - _exports.installTestNotIsolatedHook = installTestNotIsolatedHook; - - /* eslint-disable no-console */ - - /** - * Detects if a specific test isn't isolated. A test is considered - * not isolated if it: - * - * - has pending timers - * - is in a runloop - * - has pending AJAX requests - * - has pending test waiters - * - * @function detectIfTestNotIsolated - * @param {Object} testInfo - * @param {string} testInfo.module The name of the test module - * @param {string} testInfo.name The test name - */ - function detectIfTestNotIsolated(test, message = '') { - if (!(0, _testHelpers.isSettled)()) { - let { - debugInfo - } = (0, _testHelpers.getSettledState)(); - console.group(`${test.module.name}: ${test.testName}`); - debugInfo.toConsole(); - console.groupEnd(); - test.expected++; - test.assert.pushResult({ - result: false, - message: `${message} \nMore information has been printed to the console. Please use that information to help in debugging.\n\n` - }); - } - } - /** - * Installs a hook to detect if a specific test isn't isolated. - * This hook is installed by patching into the `test.finish` method, - * which allows us to be very precise as to when the detection occurs. - * - * @function installTestNotIsolatedHook - * @param {number} delay the delay delay to use when checking for isolation validation - */ - - - function installTestNotIsolatedHook(delay = 50) { - if (!(0, _testHelpers.getDebugInfo)()) { - return; - } - - let test = _qunit.default.config.current; - let finish = test.finish; - let pushFailure = test.pushFailure; - - test.pushFailure = function (message) { - if (message.indexOf('Test took longer than') === 0) { - detectIfTestNotIsolated(this, message); - } else { - return pushFailure.apply(this, arguments); - } - }; // We're hooking into `test.finish`, which utilizes internal ordering of - // when a test's hooks are invoked. We do this mainly becuase we need - // greater precision as to when to detect and subsequently report if the - // test is isolated. - // - // We looked at using: - // - `afterEach` - // - the ordering of when the `afterEach` is called is not easy to guarantee - // (ancestor `afterEach`es have to be accounted for too) - // - `QUnit.on('testEnd')` - // - is executed too late; the test is already considered done so - // we're unable to push a new assert to fail the current test - // - 'QUnit.done' - // - it detatches the failure from the actual test that failed, making it - // more confusing to the end user. - - - test.finish = function () { - let doFinish = () => finish.apply(this, arguments); - - if ((0, _testHelpers.isSettled)()) { - return doFinish(); - } else { - return (0, _testHelpers.waitUntil)(_testHelpers.isSettled, { - timeout: delay - }).catch(() => {// we consider that when waitUntil times out, you're in a state of - // test isolation violation. The nature of the error is irrelevant - // in this case, and we want to allow the error to fall through - // to the finally, where cleanup occurs. - }).finally(() => { - detectIfTestNotIsolated(this, 'Test is not isolated (async execution is extending beyond the duration of the test).'); // canceling timers here isn't perfect, but is as good as we can do - // to attempt to prevent future tests from failing due to this test's - // leakage - - Ember.run.cancelTimers(); - return doFinish(); - }); - } - }; - } -}); -define("ember-qunit/test-loader", ["exports", "qunit", "ember-cli-test-loader/test-support/index"], function (_exports, _qunit, _index) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.loadTests = loadTests; - _exports.TestLoader = void 0; - (0, _index.addModuleExcludeMatcher)(function (moduleName) { - return _qunit.default.urlParams.nolint && moduleName.match(/\.(jshint|lint-test)$/); - }); - (0, _index.addModuleIncludeMatcher)(function (moduleName) { - return moduleName.match(/\.jshint$/); - }); - let moduleLoadFailures = []; - - _qunit.default.done(function () { - let length = moduleLoadFailures.length; - - try { - if (length === 0) {// do nothing - } else if (length === 1) { - throw moduleLoadFailures[0]; - } else { - throw new Error('\n' + moduleLoadFailures.join('\n')); - } - } finally { - // ensure we release previously captured errors. - moduleLoadFailures = []; - } - }); - - class TestLoader extends _index.default { - moduleLoadFailure(moduleName, error) { - moduleLoadFailures.push(error); - - _qunit.default.module('TestLoader Failures'); - - _qunit.default.test(moduleName + ': could not be loaded', function () { - throw error; - }); - } - - } - /** - Load tests following the default patterns: - - * The module name ends with `-test` - * The module name ends with `.jshint` - - Excludes tests that match the following - patterns when `?nolint` URL param is set: - - * The module name ends with `.jshint` - * The module name ends with `-lint-test` - - @method loadTests - */ - - - _exports.TestLoader = TestLoader; - - function loadTests() { - new TestLoader().loadModules(); - } -}); -define("ember-test-helpers/has-ember-version", ["exports", "@ember/test-helpers/has-ember-version"], function (_exports, _hasEmberVersion) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _hasEmberVersion.default; - } - }); -}); -define("ember-test-helpers/index", ["exports", "@ember/test-helpers", "ember-test-helpers/legacy-0-6-x/test-module", "ember-test-helpers/legacy-0-6-x/test-module-for-acceptance", "ember-test-helpers/legacy-0-6-x/test-module-for-component", "ember-test-helpers/legacy-0-6-x/test-module-for-model"], function (_exports, _testHelpers, _testModule, _testModuleForAcceptance, _testModuleForComponent, _testModuleForModel) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - var _exportNames = { - TestModule: true, - TestModuleForAcceptance: true, - TestModuleForComponent: true, - TestModuleForModel: true - }; - Object.defineProperty(_exports, "TestModule", { - enumerable: true, - get: function () { - return _testModule.default; - } - }); - Object.defineProperty(_exports, "TestModuleForAcceptance", { - enumerable: true, - get: function () { - return _testModuleForAcceptance.default; - } - }); - Object.defineProperty(_exports, "TestModuleForComponent", { - enumerable: true, - get: function () { - return _testModuleForComponent.default; - } - }); - Object.defineProperty(_exports, "TestModuleForModel", { - enumerable: true, - get: function () { - return _testModuleForModel.default; - } - }); - Object.keys(_testHelpers).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; - if (key in _exports && _exports[key] === _testHelpers[key]) return; - Object.defineProperty(_exports, key, { - enumerable: true, - get: function () { - return _testHelpers[key]; - } - }); - }); -}); -define("ember-test-helpers/legacy-0-6-x/-legacy-overrides", ["exports", "ember-test-helpers/has-ember-version"], function (_exports, _hasEmberVersion) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.preGlimmerSetupIntegrationForComponent = preGlimmerSetupIntegrationForComponent; - - function preGlimmerSetupIntegrationForComponent() { - var module = this; - var context = this.context; - this.actionHooks = {}; - context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create(); - context.dispatcher.setup({}, '#ember-testing'); - context.actions = module.actionHooks; - (this.registry || this.container).register('component:-test-holder', Ember.Component.extend()); - - context.render = function (template) { - // in case `this.render` is called twice, make sure to teardown the first invocation - module.teardownComponent(); - - if (!template) { - throw new Error('in a component integration test you must pass a template to `render()`'); - } - - if (Ember.isArray(template)) { - template = template.join(''); - } - - if (typeof template === 'string') { - template = Ember.Handlebars.compile(template); - } - - module.component = module.container.lookupFactory('component:-test-holder').create({ - layout: template - }); - module.component.set('context', context); - module.component.set('controller', context); - Ember.run(function () { - module.component.appendTo('#ember-testing'); - }); - context._element = module.component.element; - }; - - context.$ = function () { - return module.component.$.apply(module.component, arguments); - }; - - context.set = function (key, value) { - var ret = Ember.run(function () { - return Ember.set(context, key, value); - }); - - if ((0, _hasEmberVersion.default)(2, 0)) { - return ret; - } - }; - - context.setProperties = function (hash) { - var ret = Ember.run(function () { - return Ember.setProperties(context, hash); - }); - - if ((0, _hasEmberVersion.default)(2, 0)) { - return ret; - } - }; - - context.get = function (key) { - return Ember.get(context, key); - }; - - context.getProperties = function () { - var args = Array.prototype.slice.call(arguments); - return Ember.getProperties(context, args); - }; - - context.on = function (actionName, handler) { - module.actionHooks[actionName] = handler; - }; - - context.send = function (actionName) { - var hook = module.actionHooks[actionName]; - - if (!hook) { - throw new Error('integration testing template received unexpected action ' + actionName); - } - - hook.apply(module, Array.prototype.slice.call(arguments, 1)); - }; - - context.clearRender = function () { - module.teardownComponent(); - }; - } -}); -define("ember-test-helpers/legacy-0-6-x/abstract-test-module", ["exports", "ember-test-helpers/legacy-0-6-x/ext/rsvp", "@ember/test-helpers/settled", "@ember/test-helpers"], function (_exports, _rsvp, _settled, _testHelpers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - class _default { - constructor(name, options) { - this.context = undefined; - this.name = name; - this.callbacks = options || {}; - this.initSetupSteps(); - this.initTeardownSteps(); - } - - setup(assert) { - Ember.testing = true; - Ember.run.backburner.DEBUG = true; - return this.invokeSteps(this.setupSteps, this, assert).then(() => { - this.contextualizeCallbacks(); - return this.invokeSteps(this.contextualizedSetupSteps, this.context, assert); - }); - } - - teardown(assert) { - return this.invokeSteps(this.contextualizedTeardownSteps, this.context, assert).then(() => { - return this.invokeSteps(this.teardownSteps, this, assert); - }).then(() => { - this.cache = null; - this.cachedCalls = null; - }).finally(function () { - Ember.testing = false; - }); - } - - initSetupSteps() { - this.setupSteps = []; - this.contextualizedSetupSteps = []; - - if (this.callbacks.beforeSetup) { - this.setupSteps.push(this.callbacks.beforeSetup); - delete this.callbacks.beforeSetup; - } - - this.setupSteps.push(this.setupContext); - this.setupSteps.push(this.setupTestElements); - this.setupSteps.push(this.setupAJAXListeners); - this.setupSteps.push(this.setupPromiseListeners); - - if (this.callbacks.setup) { - this.contextualizedSetupSteps.push(this.callbacks.setup); - delete this.callbacks.setup; - } - } - - invokeSteps(steps, context, assert) { - steps = steps.slice(); - - function nextStep() { - var step = steps.shift(); - - if (step) { - // guard against exceptions, for example missing components referenced from needs. - return new Ember.RSVP.Promise(resolve => { - resolve(step.call(context, assert)); - }).then(nextStep); - } else { - return Ember.RSVP.resolve(); - } - } - - return nextStep(); - } - - contextualizeCallbacks() {} - - initTeardownSteps() { - this.teardownSteps = []; - this.contextualizedTeardownSteps = []; - - if (this.callbacks.teardown) { - this.contextualizedTeardownSteps.push(this.callbacks.teardown); - delete this.callbacks.teardown; - } - - this.teardownSteps.push(this.teardownContext); - this.teardownSteps.push(this.teardownTestElements); - this.teardownSteps.push(this.teardownAJAXListeners); - this.teardownSteps.push(this.teardownPromiseListeners); - - if (this.callbacks.afterTeardown) { - this.teardownSteps.push(this.callbacks.afterTeardown); - delete this.callbacks.afterTeardown; - } - } - - setupTestElements() { - let testElementContainer = document.querySelector('#ember-testing-container'); - - if (!testElementContainer) { - testElementContainer = document.createElement('div'); - testElementContainer.setAttribute('id', 'ember-testing-container'); - document.body.appendChild(testElementContainer); - } - - let testEl = document.querySelector('#ember-testing'); - - if (!testEl) { - let element = document.createElement('div'); - element.setAttribute('id', 'ember-testing'); - testElementContainer.appendChild(element); - this.fixtureResetValue = ''; - } else { - this.fixtureResetValue = testElementContainer.innerHTML; - } - } - - setupContext(options) { - let context = this.getContext(); - Ember.assign(context, { - dispatcher: null, - inject: {} - }, options); - this.setToString(); - (0, _testHelpers.setContext)(context); - this.context = context; - } - - setContext(context) { - this.context = context; - } - - getContext() { - if (this.context) { - return this.context; - } - - return this.context = (0, _testHelpers.getContext)() || {}; - } - - setToString() { - this.context.toString = () => { - if (this.subjectName) { - return `test context for: ${this.subjectName}`; - } - - if (this.name) { - return `test context for: ${this.name}`; - } - }; - } - - setupAJAXListeners() { - (0, _settled._setupAJAXHooks)(); - } - - teardownAJAXListeners() { - (0, _settled._teardownAJAXHooks)(); - } - - setupPromiseListeners() { - (0, _rsvp._setupPromiseListeners)(); - } - - teardownPromiseListeners() { - (0, _rsvp._teardownPromiseListeners)(); - } - - teardownTestElements() { - document.getElementById('ember-testing-container').innerHTML = this.fixtureResetValue; // Ember 2.0.0 removed Ember.View as public API, so only do this when - // Ember.View is present - - if (Ember.View && Ember.View.views) { - Ember.View.views = {}; - } - } - - teardownContext() { - var context = this.context; - this.context = undefined; - (0, _testHelpers.unsetContext)(); - - if (context && context.dispatcher && !context.dispatcher.isDestroyed) { - Ember.run(function () { - context.dispatcher.destroy(); - }); - } - } - - } - - _exports.default = _default; -}); -define("ember-test-helpers/legacy-0-6-x/build-registry", ["exports", "require"], function (_exports, _require) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = _default; - - function exposeRegistryMethodsWithoutDeprecations(container) { - var methods = ['register', 'unregister', 'resolve', 'normalize', 'typeInjection', 'injection', 'factoryInjection', 'factoryTypeInjection', 'has', 'options', 'optionsForType']; - - function exposeRegistryMethod(container, method) { - if (method in container) { - container[method] = function () { - return container._registry[method].apply(container._registry, arguments); - }; - } - } - - for (var i = 0, l = methods.length; i < l; i++) { - exposeRegistryMethod(container, methods[i]); - } - } - - var Owner = function () { - if (Ember._RegistryProxyMixin && Ember._ContainerProxyMixin) { - return Ember.Object.extend(Ember._RegistryProxyMixin, Ember._ContainerProxyMixin, { - _emberTestHelpersMockOwner: true - }); - } - - return Ember.Object.extend({ - _emberTestHelpersMockOwner: true - }); - }(); - - function _default(resolver) { - var fallbackRegistry, registry, container; - var namespace = Ember.Object.create({ - Resolver: { - create() { - return resolver; - } - - } - }); - - function register(name, factory) { - var thingToRegisterWith = registry || container; - - if (!(container.factoryFor ? container.factoryFor(name) : container.lookupFactory(name))) { - thingToRegisterWith.register(name, factory); - } - } - - if (Ember.Application.buildRegistry) { - fallbackRegistry = Ember.Application.buildRegistry(namespace); - fallbackRegistry.register('component-lookup:main', Ember.ComponentLookup); - registry = new Ember.Registry({ - fallback: fallbackRegistry - }); - - if (Ember.ApplicationInstance && Ember.ApplicationInstance.setupRegistry) { - Ember.ApplicationInstance.setupRegistry(registry); - } // these properties are set on the fallback registry by `buildRegistry` - // and on the primary registry within the ApplicationInstance constructor - // but we need to manually recreate them since ApplicationInstance's are not - // exposed externally - - - registry.normalizeFullName = fallbackRegistry.normalizeFullName; - registry.makeToString = fallbackRegistry.makeToString; - registry.describe = fallbackRegistry.describe; - var owner = Owner.create({ - __registry__: registry, - __container__: null - }); - container = registry.container({ - owner: owner - }); - owner.__container__ = container; - exposeRegistryMethodsWithoutDeprecations(container); - } else { - container = Ember.Application.buildContainer(namespace); - container.register('component-lookup:main', Ember.ComponentLookup); - } // Ember 1.10.0 did not properly add `view:toplevel` or `view:default` - // to the registry in Ember.Application.buildRegistry :( - // - // Ember 2.0.0 removed Ember.View as public API, so only do this when - // Ember.View is present - - - if (Ember.View) { - register('view:toplevel', Ember.View.extend()); - } // Ember 2.0.0 removed Ember._MetamorphView from the Ember global, so only - // do this when present - - - if (Ember._MetamorphView) { - register('view:default', Ember._MetamorphView); - } - - var globalContext = typeof global === 'object' && global || self; - - if (requirejs.entries['ember-data/setup-container']) { - // ember-data is a proper ember-cli addon since 2.3; if no 'import - // 'ember-data'' is present somewhere in the tests, there is also no `DS` - // available on the globalContext and hence ember-data wouldn't be setup - // correctly for the tests; that's why we import and call setupContainer - // here; also see https://github.com/emberjs/data/issues/4071 for context - var setupContainer = (0, _require.default)("ember-data/setup-container")['default']; - setupContainer(registry || container); - } else if (globalContext.DS) { - var DS = globalContext.DS; - - if (DS._setupContainer) { - DS._setupContainer(registry || container); - } else { - register('transform:boolean', DS.BooleanTransform); - register('transform:date', DS.DateTransform); - register('transform:number', DS.NumberTransform); - register('transform:string', DS.StringTransform); - register('serializer:-default', DS.JSONSerializer); - register('serializer:-rest', DS.RESTSerializer); - register('adapter:-rest', DS.RESTAdapter); - } - } - - return { - registry, - container, - owner - }; - } -}); -define("ember-test-helpers/legacy-0-6-x/ext/rsvp", ["exports", "ember-test-helpers/has-ember-version"], function (_exports, _hasEmberVersion) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports._setupPromiseListeners = _setupPromiseListeners; - _exports._teardownPromiseListeners = _teardownPromiseListeners; - let originalAsync; - /** - Configures `RSVP` to resolve promises on the run-loop's action queue. This is - done by Ember internally since Ember 1.7 and it is only needed to - provide a consistent testing experience for users of Ember < 1.7. - - @private - */ - - function _setupPromiseListeners() { - if (!(0, _hasEmberVersion.default)(1, 7)) { - originalAsync = Ember.RSVP.configure('async'); - Ember.RSVP.configure('async', function (callback, promise) { - Ember.run.backburner.schedule('actions', () => { - callback(promise); - }); - }); - } - } - /** - Resets `RSVP`'s `async` to its prior value. - - @private - */ - - - function _teardownPromiseListeners() { - if (!(0, _hasEmberVersion.default)(1, 7)) { - Ember.RSVP.configure('async', originalAsync); - } - } -}); -define("ember-test-helpers/legacy-0-6-x/test-module-for-acceptance", ["exports", "ember-test-helpers/legacy-0-6-x/abstract-test-module", "@ember/test-helpers"], function (_exports, _abstractTestModule, _testHelpers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - class _default extends _abstractTestModule.default { - setupContext() { - super.setupContext({ - application: this.createApplication() - }); - } - - teardownContext() { - Ember.run(() => { - (0, _testHelpers.getContext)().application.destroy(); - }); - super.teardownContext(); - } - - createApplication() { - let { - Application, - config - } = this.callbacks; - let application; - Ember.run(() => { - application = Application.create(config); - application.setupForTesting(); - application.injectTestHelpers(); - }); - return application; - } - - } - - _exports.default = _default; -}); -define("ember-test-helpers/legacy-0-6-x/test-module-for-component", ["exports", "ember-test-helpers/legacy-0-6-x/test-module", "ember-test-helpers/has-ember-version", "ember-test-helpers/legacy-0-6-x/-legacy-overrides"], function (_exports, _testModule, _hasEmberVersion, _legacyOverrides) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.setupComponentIntegrationTest = setupComponentIntegrationTest; - _exports.default = void 0; - let ACTION_KEY; - - if ((0, _hasEmberVersion.default)(2, 0)) { - ACTION_KEY = 'actions'; - } else { - ACTION_KEY = '_actions'; - } - - const isPreGlimmer = !(0, _hasEmberVersion.default)(1, 13); - - class _default extends _testModule.default { - constructor(componentName, description, callbacks) { - // Allow `description` to be omitted - if (!callbacks && typeof description === 'object') { - callbacks = description; - description = null; - } else if (!callbacks) { - callbacks = {}; - } - - let integrationOption = callbacks.integration; - let hasNeeds = Array.isArray(callbacks.needs); - super('component:' + componentName, description, callbacks); - this.componentName = componentName; - - if (hasNeeds || callbacks.unit || integrationOption === false) { - this.isUnitTest = true; - } else if (integrationOption) { - this.isUnitTest = false; - } else { - (true && !(false) && Ember.deprecate('the component:' + componentName + ' test module is implicitly running in unit test mode, ' + 'which will change to integration test mode by default in an upcoming version of ' + 'ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit ' + 'test mode.', false, { - id: 'ember-test-helpers.test-module-for-component.test-type', - until: '0.6.0' - })); - this.isUnitTest = true; - } - - if (!this.isUnitTest && !this.isLegacy) { - callbacks.integration = true; - } - - if (this.isUnitTest || this.isLegacy) { - this.setupSteps.push(this.setupComponentUnitTest); - } else { - this.callbacks.subject = function () { - throw new Error("component integration tests do not support `subject()`. Instead, render the component as if it were HTML: `this.render('');`. For more information, read: http://guides.emberjs.com/current/testing/testing-components/"); - }; - - this.setupSteps.push(this.setupComponentIntegrationTest); - this.teardownSteps.unshift(this.teardownComponent); - } - - if (Ember.View && Ember.View.views) { - this.setupSteps.push(this._aliasViewRegistry); - this.teardownSteps.unshift(this._resetViewRegistry); - } - } - - initIntegration(options) { - this.isLegacy = options.integration === 'legacy'; - this.isIntegration = options.integration !== 'legacy'; - } - - _aliasViewRegistry() { - this._originalGlobalViewRegistry = Ember.View.views; - var viewRegistry = this.container.lookup('-view-registry:main'); - - if (viewRegistry) { - Ember.View.views = viewRegistry; - } - } - - _resetViewRegistry() { - Ember.View.views = this._originalGlobalViewRegistry; - } - - setupComponentUnitTest() { - var _this = this; - - var resolver = this.resolver; - var context = this.context; - var layoutName = 'template:components/' + this.componentName; - var layout = resolver.resolve(layoutName); - var thingToRegisterWith = this.registry || this.container; - - if (layout) { - thingToRegisterWith.register(layoutName, layout); - thingToRegisterWith.injection(this.subjectName, 'layout', layoutName); - } - - var eventDispatcher = resolver.resolve('event_dispatcher:main'); - - if (eventDispatcher) { - thingToRegisterWith.register('event_dispatcher:main', eventDispatcher); - } - - context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create(); - context.dispatcher.setup({}, '#ember-testing'); - context._element = null; - - this.callbacks.render = function () { - var subject; - Ember.run(function () { - subject = context.subject(); - subject.appendTo('#ember-testing'); - }); - context._element = subject.element; - - _this.teardownSteps.unshift(function () { - Ember.run(function () { - Ember.tryInvoke(subject, 'destroy'); - }); - }); - }; - - this.callbacks.append = function () { - (true && !(false) && Ember.deprecate('this.append() is deprecated. Please use this.render() or this.$() instead.', false, { - id: 'ember-test-helpers.test-module-for-component.append', - until: '0.6.0' - })); - return context.$(); - }; - - context.$ = function () { - this.render(); - var subject = this.subject(); - return subject.$.apply(subject, arguments); - }; - } - - setupComponentIntegrationTest() { - if (isPreGlimmer) { - return _legacyOverrides.preGlimmerSetupIntegrationForComponent.apply(this, arguments); - } else { - return setupComponentIntegrationTest.apply(this, arguments); - } - } - - setupContext() { - super.setupContext(); // only setup the injection if we are running against a version - // of Ember that has `-view-registry:main` (Ember >= 1.12) - - if (this.container.factoryFor ? this.container.factoryFor('-view-registry:main') : this.container.lookupFactory('-view-registry:main')) { - (this.registry || this.container).injection('component', '_viewRegistry', '-view-registry:main'); - } - - if (!this.isUnitTest && !this.isLegacy) { - this.context.factory = function () {}; - } - } - - teardownComponent() { - var component = this.component; - - if (component) { - Ember.run(component, 'destroy'); - this.component = null; - } - } - - } - - _exports.default = _default; - - function getOwnerFromModule(module) { - return Ember.getOwner && Ember.getOwner(module.container) || module.container.owner; - } - - function lookupTemplateFromModule(module, templateFullName) { - var template = module.container.lookup(templateFullName); - if (typeof template === 'function') template = template(getOwnerFromModule(module)); - return template; - } - - function setupComponentIntegrationTest() { - var module = this; - var context = this.context; - this.actionHooks = context[ACTION_KEY] = {}; - context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create(); - context.dispatcher.setup({}, '#ember-testing'); - var hasRendered = false; - var OutletView = module.container.factoryFor ? module.container.factoryFor('view:-outlet') : module.container.lookupFactory('view:-outlet'); - var OutletTemplate = lookupTemplateFromModule(module, 'template:-outlet'); - var toplevelView = module.component = OutletView.create(); - var hasOutletTemplate = !!OutletTemplate; - var outletState = { - render: { - owner: getOwnerFromModule(module), - into: undefined, - outlet: 'main', - name: 'application', - controller: module.context, - ViewClass: undefined, - template: OutletTemplate - }, - outlets: {} - }; - var element = document.getElementById('ember-testing'); - var templateId = 0; - - if (hasOutletTemplate) { - Ember.run(() => { - toplevelView.setOutletState(outletState); - }); - } - - context.render = function (template) { - if (!template) { - throw new Error('in a component integration test you must pass a template to `render()`'); - } - - if (Ember.isArray(template)) { - template = template.join(''); - } - - if (typeof template === 'string') { - template = Ember.Handlebars.compile(template); - } - - var templateFullName = 'template:-undertest-' + ++templateId; - this.registry.register(templateFullName, template); - var stateToRender = { - owner: getOwnerFromModule(module), - into: undefined, - outlet: 'main', - name: 'index', - controller: module.context, - ViewClass: undefined, - template: lookupTemplateFromModule(module, templateFullName), - outlets: {} - }; - - if (hasOutletTemplate) { - stateToRender.name = 'index'; - outletState.outlets.main = { - render: stateToRender, - outlets: {} - }; - } else { - stateToRender.name = 'application'; - outletState = { - render: stateToRender, - outlets: {} - }; - } - - Ember.run(() => { - toplevelView.setOutletState(outletState); - }); - - if (!hasRendered) { - Ember.run(module.component, 'appendTo', '#ember-testing'); - hasRendered = true; - } - - if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) { - // ensure the element is based on the wrapping toplevel view - // Ember still wraps the main application template with a - // normal tagged view - context._element = element = document.querySelector('#ember-testing > .ember-view'); - } else { - context._element = element = document.querySelector('#ember-testing'); - } - }; - - context.$ = function (selector) { - // emulates Ember internal behavor of `this.$` in a component - // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18 - return selector ? jQuery(selector, element) : jQuery(element); - }; - - context.set = function (key, value) { - var ret = Ember.run(function () { - return Ember.set(context, key, value); - }); - - if ((0, _hasEmberVersion.default)(2, 0)) { - return ret; - } - }; - - context.setProperties = function (hash) { - var ret = Ember.run(function () { - return Ember.setProperties(context, hash); - }); - - if ((0, _hasEmberVersion.default)(2, 0)) { - return ret; - } - }; - - context.get = function (key) { - return Ember.get(context, key); - }; - - context.getProperties = function () { - var args = Array.prototype.slice.call(arguments); - return Ember.getProperties(context, args); - }; - - context.on = function (actionName, handler) { - module.actionHooks[actionName] = handler; - }; - - context.send = function (actionName) { - var hook = module.actionHooks[actionName]; - - if (!hook) { - throw new Error('integration testing template received unexpected action ' + actionName); - } - - hook.apply(module.context, Array.prototype.slice.call(arguments, 1)); - }; - - context.clearRender = function () { - Ember.run(function () { - toplevelView.setOutletState({ - render: { - owner: module.container, - into: undefined, - outlet: 'main', - name: 'application', - controller: module.context, - ViewClass: undefined, - template: undefined - }, - outlets: {} - }); - }); - }; - } -}); -define("ember-test-helpers/legacy-0-6-x/test-module-for-model", ["exports", "require", "ember-test-helpers/legacy-0-6-x/test-module"], function (_exports, _require, _testModule) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - class _default extends _testModule.default { - constructor(modelName, description, callbacks) { - super('model:' + modelName, description, callbacks); - this.modelName = modelName; - this.setupSteps.push(this.setupModel); - } - - setupModel() { - var container = this.container; - var defaultSubject = this.defaultSubject; - var callbacks = this.callbacks; - var modelName = this.modelName; - var adapterFactory = container.factoryFor ? container.factoryFor('adapter:application') : container.lookupFactory('adapter:application'); - - if (!adapterFactory) { - if (requirejs.entries['ember-data/adapters/json-api']) { - adapterFactory = (0, _require.default)("ember-data/adapters/json-api")['default']; - } // when ember-data/adapters/json-api is provided via ember-cli shims - // using Ember Data 1.x the actual JSONAPIAdapter isn't found, but the - // above require statement returns a bizzaro object with only a `default` - // property (circular reference actually) - - - if (!adapterFactory || !adapterFactory.create) { - adapterFactory = DS.JSONAPIAdapter || DS.FixtureAdapter; - } - - var thingToRegisterWith = this.registry || this.container; - thingToRegisterWith.register('adapter:application', adapterFactory); - } - - callbacks.store = function () { - var container = this.container; - return container.lookup('service:store') || container.lookup('store:main'); - }; - - if (callbacks.subject === defaultSubject) { - callbacks.subject = function (options) { - var container = this.container; - return Ember.run(function () { - var store = container.lookup('service:store') || container.lookup('store:main'); - return store.createRecord(modelName, options); - }); - }; - } - } - - } - - _exports.default = _default; -}); -define("ember-test-helpers/legacy-0-6-x/test-module", ["exports", "ember-test-helpers/legacy-0-6-x/abstract-test-module", "@ember/test-helpers", "ember-test-helpers/legacy-0-6-x/build-registry", "@ember/test-helpers/has-ember-version"], function (_exports, _abstractTestModule, _testHelpers, _buildRegistry, _hasEmberVersion) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - class _default extends _abstractTestModule.default { - constructor(subjectName, description, callbacks) { - // Allow `description` to be omitted, in which case it should - // default to `subjectName` - if (!callbacks && typeof description === 'object') { - callbacks = description; - description = subjectName; - } - - super(description || subjectName, callbacks); - this.subjectName = subjectName; - this.description = description || subjectName; - this.resolver = this.callbacks.resolver || (0, _testHelpers.getResolver)(); - - if (this.callbacks.integration && this.callbacks.needs) { - throw new Error("cannot declare 'integration: true' and 'needs' in the same module"); - } - - if (this.callbacks.integration) { - this.initIntegration(callbacks); - delete callbacks.integration; - } - - this.initSubject(); - this.initNeeds(); - } - - initIntegration(options) { - if (options.integration === 'legacy') { - throw new Error("`integration: 'legacy'` is only valid for component tests."); - } - - this.isIntegration = true; - } - - initSubject() { - this.callbacks.subject = this.callbacks.subject || this.defaultSubject; - } - - initNeeds() { - this.needs = [this.subjectName]; - - if (this.callbacks.needs) { - this.needs = this.needs.concat(this.callbacks.needs); - delete this.callbacks.needs; - } - } - - initSetupSteps() { - this.setupSteps = []; - this.contextualizedSetupSteps = []; - - if (this.callbacks.beforeSetup) { - this.setupSteps.push(this.callbacks.beforeSetup); - delete this.callbacks.beforeSetup; - } - - this.setupSteps.push(this.setupContainer); - this.setupSteps.push(this.setupContext); - this.setupSteps.push(this.setupTestElements); - this.setupSteps.push(this.setupAJAXListeners); - this.setupSteps.push(this.setupPromiseListeners); - - if (this.callbacks.setup) { - this.contextualizedSetupSteps.push(this.callbacks.setup); - delete this.callbacks.setup; - } - } - - initTeardownSteps() { - this.teardownSteps = []; - this.contextualizedTeardownSteps = []; - - if (this.callbacks.teardown) { - this.contextualizedTeardownSteps.push(this.callbacks.teardown); - delete this.callbacks.teardown; - } - - this.teardownSteps.push(this.teardownSubject); - this.teardownSteps.push(this.teardownContainer); - this.teardownSteps.push(this.teardownContext); - this.teardownSteps.push(this.teardownTestElements); - this.teardownSteps.push(this.teardownAJAXListeners); - this.teardownSteps.push(this.teardownPromiseListeners); - - if (this.callbacks.afterTeardown) { - this.teardownSteps.push(this.callbacks.afterTeardown); - delete this.callbacks.afterTeardown; - } - } - - setupContainer() { - if (this.isIntegration || this.isLegacy) { - this._setupIntegratedContainer(); - } else { - this._setupIsolatedContainer(); - } - } - - setupContext() { - var subjectName = this.subjectName; - var container = this.container; - - var factory = function () { - return container.factoryFor ? container.factoryFor(subjectName) : container.lookupFactory(subjectName); - }; - - super.setupContext({ - container: this.container, - registry: this.registry, - factory: factory, - - register() { - var target = this.registry || this.container; - return target.register.apply(target, arguments); - } - - }); - - if (Ember.setOwner) { - Ember.setOwner(this.context, this.container.owner); - } - - this.setupInject(); - } - - setupInject() { - var module = this; - var context = this.context; - - if (Ember.inject) { - var keys = (Object.keys || keys)(Ember.inject); - keys.forEach(function (typeName) { - context.inject[typeName] = function (name, opts) { - var alias = opts && opts.as || name; - Ember.run(function () { - Ember.set(context, alias, module.container.lookup(typeName + ':' + name)); - }); - }; - }); - } - } - - teardownSubject() { - var subject = this.cache.subject; - - if (subject) { - Ember.run(function () { - Ember.tryInvoke(subject, 'destroy'); - }); - } - } - - teardownContainer() { - var container = this.container; - Ember.run(function () { - container.destroy(); - }); - } - - defaultSubject(options, factory) { - return factory.create(options); - } // allow arbitrary named factories, like rspec let - - - contextualizeCallbacks() { - var callbacks = this.callbacks; - var context = this.context; - this.cache = this.cache || {}; - this.cachedCalls = this.cachedCalls || {}; - var keys = (Object.keys || keys)(callbacks); - var keysLength = keys.length; - - if (keysLength) { - var deprecatedContext = this._buildDeprecatedContext(this, context); - - for (var i = 0; i < keysLength; i++) { - this._contextualizeCallback(context, keys[i], deprecatedContext); - } - } - } - - _contextualizeCallback(context, key, callbackContext) { - var _this = this; - - var callbacks = this.callbacks; - var factory = context.factory; - - context[key] = function (options) { - if (_this.cachedCalls[key]) { - return _this.cache[key]; - } - - var result = callbacks[key].call(callbackContext, options, factory()); - _this.cache[key] = result; - _this.cachedCalls[key] = true; - return result; - }; - } - /* - Builds a version of the passed in context that contains deprecation warnings - for accessing properties that exist on the module. - */ - - - _buildDeprecatedContext(module, context) { - var deprecatedContext = Object.create(context); - var keysForDeprecation = Object.keys(module); - - for (var i = 0, l = keysForDeprecation.length; i < l; i++) { - this._proxyDeprecation(module, deprecatedContext, keysForDeprecation[i]); - } - - return deprecatedContext; - } - /* - Defines a key on an object to act as a proxy for deprecating the original. - */ - - - _proxyDeprecation(obj, proxy, key) { - if (typeof proxy[key] === 'undefined') { - Object.defineProperty(proxy, key, { - get() { - (true && !(false) && Ember.deprecate('Accessing the test module property "' + key + '" from a callback is deprecated.', false, { - id: 'ember-test-helpers.test-module.callback-context', - until: '0.6.0' - })); - return obj[key]; - } - - }); - } - } - - _setupContainer(isolated) { - var resolver = this.resolver; - var items = (0, _buildRegistry.default)(!isolated ? resolver : Object.create(resolver, { - resolve: { - value() {} - - } - })); - this.container = items.container; - this.registry = items.registry; - - if ((0, _hasEmberVersion.default)(1, 13)) { - var thingToRegisterWith = this.registry || this.container; - var router = resolver.resolve('router:main'); - router = router || Ember.Router.extend(); - thingToRegisterWith.register('router:main', router); - } - } - - _setupIsolatedContainer() { - var resolver = this.resolver; - - this._setupContainer(true); - - var thingToRegisterWith = this.registry || this.container; - - for (var i = this.needs.length; i > 0; i--) { - var fullName = this.needs[i - 1]; - var normalizedFullName = resolver.normalize(fullName); - thingToRegisterWith.register(fullName, resolver.resolve(normalizedFullName)); - } - - if (!this.registry) { - this.container.resolver = function () {}; - } - } - - _setupIntegratedContainer() { - this._setupContainer(); - } - - } - - _exports.default = _default; -}); -define("ember-test-helpers/wait", ["exports", "@ember/test-helpers/settled", "@ember/test-helpers"], function (_exports, _settled, _testHelpers) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = wait; - Object.defineProperty(_exports, "_setupAJAXHooks", { - enumerable: true, - get: function () { - return _settled._setupAJAXHooks; - } - }); - Object.defineProperty(_exports, "_teardownAJAXHooks", { - enumerable: true, - get: function () { - return _settled._teardownAJAXHooks; - } - }); - - /** - Returns a promise that resolves when in a settled state (see `isSettled` for - a definition of "settled state"). - - @private - @deprecated - @param {Object} [options={}] the options to be used for waiting - @param {boolean} [options.waitForTimers=true] should timers be waited upon - @param {boolean} [options.waitForAjax=true] should $.ajax requests be waited upon - @param {boolean} [options.waitForWaiters=true] should test waiters be waited upon - @returns {Promise} resolves when settled - */ - function wait(options = {}) { - if (typeof options !== 'object' || options === null) { - options = {}; - } - - return (0, _testHelpers.waitUntil)(() => { - let waitForTimers = 'waitForTimers' in options ? options.waitForTimers : true; - let waitForAJAX = 'waitForAJAX' in options ? options.waitForAJAX : true; - let waitForWaiters = 'waitForWaiters' in options ? options.waitForWaiters : true; - let { - hasPendingTimers, - hasRunLoop, - hasPendingRequests, - hasPendingWaiters - } = (0, _testHelpers.getSettledState)(); - - if (waitForTimers && (hasPendingTimers || hasRunLoop)) { - return false; - } - - if (waitForAJAX && hasPendingRequests) { - return false; - } - - if (waitForWaiters && hasPendingWaiters) { - return false; - } - - return true; - }, { - timeout: Infinity - }); - } -}); -define('qunit-dom', [], function() { - return {}; -}); - -define("qunit/index", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = _exports.todo = _exports.only = _exports.skip = _exports.test = _exports.module = void 0; - - /* globals QUnit */ - var module = QUnit.module; - _exports.module = module; - var test = QUnit.test; - _exports.test = test; - var skip = QUnit.skip; - _exports.skip = skip; - var only = QUnit.only; - _exports.only = only; - var todo = QUnit.todo; - _exports.todo = todo; - var _default = QUnit; - _exports.default = _default; -}); -runningTests = true; - -if (window.Testem) { - window.Testem.hookIntoTestFramework(); -} - - -; -var __ember_auto_import__ = -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) { -/******/ return installedModules[moduleId].exports; -/******/ } -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { enumerable: true, get: getter }); -/******/ } -/******/ }; -/******/ -/******/ // define __esModule on exports -/******/ __webpack_require__.r = function(exports) { -/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { -/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); -/******/ } -/******/ Object.defineProperty(exports, '__esModule', { value: true }); -/******/ }; -/******/ -/******/ // create a fake namespace object -/******/ // mode & 1: value is a module id, require it -/******/ // mode & 2: merge all properties of value into the ns -/******/ // mode & 4: return value when already ns object -/******/ // mode & 8|1: behave like require -/******/ __webpack_require__.t = function(value, mode) { -/******/ if(mode & 1) value = __webpack_require__(value); -/******/ if(mode & 8) return value; -/******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value; -/******/ var ns = Object.create(null); -/******/ __webpack_require__.r(ns); -/******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value }); -/******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key)); -/******/ return ns; -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 1); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ "../../../../../private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/l.js": -/*!**************************************************************************************************************************!*\ - !*** /private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/l.js ***! - \**************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports) { - -eval("\nwindow._eai_r = require;\nwindow._eai_d = define;\n\n\n//# sourceURL=webpack://__ember_auto_import__//private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/l.js?"); - -/***/ }), - -/***/ "../../../../../private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/tests.js": -/*!******************************************************************************************************************************!*\ - !*** /private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/tests.js ***! - \******************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("\nif (typeof document !== 'undefined') {\n __webpack_require__.p = (function(){\n var scripts = document.querySelectorAll('script');\n return scripts[scripts.length - 1].src.replace(/\\/[^/]*$/, '/');\n })();\n}\n\nmodule.exports = (function(){\n var d = _eai_d;\n var r = _eai_r;\n window.emberAutoImportDynamic = function(specifier) {\n return r('_eai_dyn_' + specifier);\n };\n})();\n\n\n//# sourceURL=webpack://__ember_auto_import__//private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/tests.js?"); - -/***/ }), - -/***/ 1: -/*!*******************************************************************************************************************************************************************************************************************************************************!*\ - !*** multi /private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/l.js /private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/tests.js ***! - \*******************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -eval("__webpack_require__(/*! /private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/l.js */\"../../../../../private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/l.js\");\nmodule.exports = __webpack_require__(/*! /private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/tests.js */\"../../../../../private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/tests.js\");\n\n\n//# sourceURL=webpack://__ember_auto_import__/multi_/private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/l.js_/private/var/folders/ws/j_4p2g7x5hlb3th_l3f__ryh0013ks/T/broccoli-594368JdvOnj3iqjy/cache-254-bundler/staging/tests.js?"); - -/***/ }) - -/******/ });//# sourceMappingURL=test-support.map diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.map b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.map deleted file mode 100644 index 3304b97f1..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/test-support.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["vendor/ember-cli/test-support-prefix.js","license.js","loader.js","@ember/debug/index.js","@ember/debug/lib/capture-render-tree.js","@ember/debug/lib/deprecate.js","@ember/debug/lib/handlers.js","@ember/debug/lib/testing.js","@ember/debug/lib/warn.js","ember-testing/index.js","ember-testing/lib/adapters/adapter.js","ember-testing/lib/adapters/qunit.js","ember-testing/lib/events.js","ember-testing/lib/ext/application.js","ember-testing/lib/ext/rsvp.js","ember-testing/lib/helpers.js","ember-testing/lib/helpers/-is-form-control.js","ember-testing/lib/helpers/and_then.js","ember-testing/lib/helpers/click.js","ember-testing/lib/helpers/current_path.js","ember-testing/lib/helpers/current_route_name.js","ember-testing/lib/helpers/current_url.js","ember-testing/lib/helpers/fill_in.js","ember-testing/lib/helpers/find.js","ember-testing/lib/helpers/find_with_assert.js","ember-testing/lib/helpers/key_event.js","ember-testing/lib/helpers/pause_test.js","ember-testing/lib/helpers/trigger_event.js","ember-testing/lib/helpers/visit.js","ember-testing/lib/helpers/wait.js","ember-testing/lib/initializers.js","ember-testing/lib/setup_for_testing.js","ember-testing/lib/support.js","ember-testing/lib/test.js","ember-testing/lib/test/adapter.js","ember-testing/lib/test/helpers.js","ember-testing/lib/test/on_inject_helpers.js","ember-testing/lib/test/pending_requests.js","ember-testing/lib/test/promise.js","ember-testing/lib/test/run.js","ember-testing/lib/test/waiters.js","vendor/monkey-patches.js","vendor/qunit/qunit.js","vendor/ember-qunit/qunit-configuration.js","vendor/qunit-dom.js","vendor/overwrite-qunit-dom-root-element.js","addon-test-support/@ember/test-helpers/-internal/debug-info-helpers.js","addon-test-support/@ember/test-helpers/-internal/debug-info.js","addon-test-support/@ember/test-helpers/-tuple.js","addon-test-support/@ember/test-helpers/-utils.js","addon-test-support/@ember/test-helpers/application.js","addon-test-support/@ember/test-helpers/build-owner.js","addon-test-support/@ember/test-helpers/dom/-get-element.js","addon-test-support/@ember/test-helpers/dom/-get-elements.js","addon-test-support/@ember/test-helpers/dom/-is-focusable.js","addon-test-support/@ember/test-helpers/dom/-is-form-control.js","addon-test-support/@ember/test-helpers/dom/-target.js","addon-test-support/@ember/test-helpers/dom/-to-array.js","addon-test-support/@ember/test-helpers/dom/blur.js","addon-test-support/@ember/test-helpers/dom/click.js","addon-test-support/@ember/test-helpers/dom/double-click.js","addon-test-support/@ember/test-helpers/dom/fill-in.js","addon-test-support/@ember/test-helpers/dom/find-all.js","addon-test-support/@ember/test-helpers/dom/find.js","addon-test-support/@ember/test-helpers/dom/fire-event.js","addon-test-support/@ember/test-helpers/dom/focus.js","addon-test-support/@ember/test-helpers/dom/get-root-element.js","addon-test-support/@ember/test-helpers/dom/tap.js","addon-test-support/@ember/test-helpers/dom/trigger-event.js","addon-test-support/@ember/test-helpers/dom/trigger-key-event.js","addon-test-support/@ember/test-helpers/dom/type-in.js","addon-test-support/@ember/test-helpers/dom/wait-for.js","addon-test-support/@ember/test-helpers/global.js","addon-test-support/@ember/test-helpers/has-ember-version.js","addon-test-support/@ember/test-helpers/index.js","addon-test-support/@ember/test-helpers/resolver.js","addon-test-support/@ember/test-helpers/settled.js","addon-test-support/@ember/test-helpers/setup-application-context.js","addon-test-support/@ember/test-helpers/setup-context.js","addon-test-support/@ember/test-helpers/setup-onerror.js","addon-test-support/@ember/test-helpers/setup-rendering-context.js","addon-test-support/@ember/test-helpers/teardown-application-context.js","addon-test-support/@ember/test-helpers/teardown-context.js","addon-test-support/@ember/test-helpers/teardown-rendering-context.js","addon-test-support/@ember/test-helpers/test-metadata.js","addon-test-support/@ember/test-helpers/validate-error-handler.js","addon-test-support/@ember/test-helpers/wait-until.js","addon-test-support/ember-cli-test-loader/test-support/index.js","addon-test-support/ember-qunit/adapter.js","addon-test-support/ember-qunit/index.js","addon-test-support/ember-qunit/legacy-2-x/module-for-component.js","addon-test-support/ember-qunit/legacy-2-x/module-for-model.js","addon-test-support/ember-qunit/legacy-2-x/module-for.js","addon-test-support/ember-qunit/legacy-2-x/qunit-module.js","addon-test-support/ember-qunit/test-isolation-validation.js","addon-test-support/ember-qunit/test-loader.js","addon-test-support/ember-test-helpers/has-ember-version.js","addon-test-support/ember-test-helpers/index.js","addon-test-support/ember-test-helpers/legacy-0-6-x/-legacy-overrides.js","addon-test-support/ember-test-helpers/legacy-0-6-x/abstract-test-module.js","addon-test-support/ember-test-helpers/legacy-0-6-x/build-registry.js","addon-test-support/ember-test-helpers/legacy-0-6-x/ext/rsvp.js","addon-test-support/ember-test-helpers/legacy-0-6-x/test-module-for-acceptance.js","addon-test-support/ember-test-helpers/legacy-0-6-x/test-module-for-component.js","addon-test-support/ember-test-helpers/legacy-0-6-x/test-module-for-model.js","addon-test-support/ember-test-helpers/legacy-0-6-x/test-module.js","addon-test-support/ember-test-helpers/wait.js","addon-test-support/qunit-dom/index.js","addon-test-support/qunit/index.js","vendor/ember-cli/test-support-suffix.js"],"sourcesContent":["\n","/*!\n * @overview Ember - JavaScript Application Framework\n * @copyright Copyright 2011-2019 Tilde Inc. and contributors\n * Portions Copyright 2006-2011 Strobe Inc.\n * Portions Copyright 2008-2011 Apple Inc. All rights reserved.\n * @license Licensed under MIT license\n * See https://raw.github.com/emberjs/ember.js/master/LICENSE\n * @version 3.18.1\n */","/*globals process */\nvar define, require, Ember; // Used in @ember/-internals/environment/lib/global.js\n\n\nmainContext = this; // eslint-disable-line no-undef\n\n(function () {\n var registry;\n var seen;\n\n function missingModule(name, referrerName) {\n if (referrerName) {\n throw new Error('Could not find module ' + name + ' required by: ' + referrerName);\n } else {\n throw new Error('Could not find module ' + name);\n }\n }\n\n function internalRequire(_name, referrerName) {\n var name = _name;\n var mod = registry[name];\n\n if (!mod) {\n name = name + '/index';\n mod = registry[name];\n }\n\n var exports = seen[name];\n\n if (exports !== undefined) {\n return exports;\n }\n\n exports = seen[name] = {};\n\n if (!mod) {\n missingModule(_name, referrerName);\n }\n\n var deps = mod.deps;\n var callback = mod.callback;\n var reified = new Array(deps.length);\n\n for (var i = 0; i < deps.length; i++) {\n if (deps[i] === 'exports') {\n reified[i] = exports;\n } else if (deps[i] === 'require') {\n reified[i] = require;\n } else {\n reified[i] = internalRequire(deps[i], name);\n }\n }\n\n callback.apply(this, reified);\n return exports;\n }\n\n var isNode = typeof window === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]';\n\n if (!isNode) {\n Ember = this.Ember = this.Ember || {};\n }\n\n if (typeof Ember === 'undefined') {\n Ember = {};\n }\n\n if (typeof Ember.__loader === 'undefined') {\n registry = Object.create(null);\n seen = Object.create(null);\n\n define = function (name, deps, callback) {\n var value = {};\n\n if (!callback) {\n value.deps = [];\n value.callback = deps;\n } else {\n value.deps = deps;\n value.callback = callback;\n }\n\n registry[name] = value;\n };\n\n require = function (name) {\n return internalRequire(name, null);\n }; // setup `require` module\n\n\n require['default'] = require;\n\n require.has = function registryHas(moduleName) {\n return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']);\n };\n\n require._eak_seen = registry;\n Ember.__loader = {\n define: define,\n require: require,\n registry: registry\n };\n } else {\n define = Ember.__loader.define;\n require = Ember.__loader.require;\n }\n})();","define(\"@ember/debug/index\", [\"exports\", \"@ember/-internals/browser-environment\", \"@ember/error\", \"@ember/debug/lib/deprecate\", \"@ember/debug/lib/testing\", \"@ember/debug/lib/warn\", \"@ember/debug/lib/capture-render-tree\"], function (_exports, _browserEnvironment, _error, _deprecate2, _testing, _warn2, _captureRenderTree) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"registerDeprecationHandler\", {\n enumerable: true,\n get: function () {\n return _deprecate2.registerHandler;\n }\n });\n Object.defineProperty(_exports, \"isTesting\", {\n enumerable: true,\n get: function () {\n return _testing.isTesting;\n }\n });\n Object.defineProperty(_exports, \"setTesting\", {\n enumerable: true,\n get: function () {\n return _testing.setTesting;\n }\n });\n Object.defineProperty(_exports, \"registerWarnHandler\", {\n enumerable: true,\n get: function () {\n return _warn2.registerHandler;\n }\n });\n Object.defineProperty(_exports, \"captureRenderTree\", {\n enumerable: true,\n get: function () {\n return _captureRenderTree.default;\n }\n });\n _exports._warnIfUsingStrippedFeatureFlags = _exports.getDebugFunction = _exports.setDebugFunction = _exports.deprecateFunc = _exports.runInDebug = _exports.debugFreeze = _exports.debugSeal = _exports.deprecate = _exports.debug = _exports.warn = _exports.info = _exports.assert = void 0;\n\n // These are the default production build versions:\n var noop = () => {};\n\n var assert = noop;\n _exports.assert = assert;\n var info = noop;\n _exports.info = info;\n var warn = noop;\n _exports.warn = warn;\n var debug = noop;\n _exports.debug = debug;\n var deprecate = noop;\n _exports.deprecate = deprecate;\n var debugSeal = noop;\n _exports.debugSeal = debugSeal;\n var debugFreeze = noop;\n _exports.debugFreeze = debugFreeze;\n var runInDebug = noop;\n _exports.runInDebug = runInDebug;\n var setDebugFunction = noop;\n _exports.setDebugFunction = setDebugFunction;\n var getDebugFunction = noop;\n _exports.getDebugFunction = getDebugFunction;\n\n var deprecateFunc = function () {\n return arguments[arguments.length - 1];\n };\n\n _exports.deprecateFunc = deprecateFunc;\n\n if (true\n /* DEBUG */\n ) {\n _exports.setDebugFunction = setDebugFunction = function (type, callback) {\n switch (type) {\n case 'assert':\n return _exports.assert = assert = callback;\n\n case 'info':\n return _exports.info = info = callback;\n\n case 'warn':\n return _exports.warn = warn = callback;\n\n case 'debug':\n return _exports.debug = debug = callback;\n\n case 'deprecate':\n return _exports.deprecate = deprecate = callback;\n\n case 'debugSeal':\n return _exports.debugSeal = debugSeal = callback;\n\n case 'debugFreeze':\n return _exports.debugFreeze = debugFreeze = callback;\n\n case 'runInDebug':\n return _exports.runInDebug = runInDebug = callback;\n\n case 'deprecateFunc':\n return _exports.deprecateFunc = deprecateFunc = callback;\n }\n };\n\n _exports.getDebugFunction = getDebugFunction = function (type) {\n switch (type) {\n case 'assert':\n return assert;\n\n case 'info':\n return info;\n\n case 'warn':\n return warn;\n\n case 'debug':\n return debug;\n\n case 'deprecate':\n return deprecate;\n\n case 'debugSeal':\n return debugSeal;\n\n case 'debugFreeze':\n return debugFreeze;\n\n case 'runInDebug':\n return runInDebug;\n\n case 'deprecateFunc':\n return deprecateFunc;\n }\n };\n }\n /**\n @module @ember/debug\n */\n\n\n if (true\n /* DEBUG */\n ) {\n /**\n Verify that a certain expectation is met, or throw a exception otherwise.\n This is useful for communicating assumptions in the code to other human\n readers as well as catching bugs that accidentally violates these\n expectations.\n Assertions are removed from production builds, so they can be freely added\n for documentation and debugging purposes without worries of incuring any\n performance penalty. However, because of that, they should not be used for\n checks that could reasonably fail during normal usage. Furthermore, care\n should be taken to avoid accidentally relying on side-effects produced from\n evaluating the condition itself, since the code will not run in production.\n ```javascript\n import { assert } from '@ember/debug';\n // Test for truthiness\n assert('Must pass a string', typeof str === 'string');\n // Fail unconditionally\n assert('This code path should never be run');\n ```\n @method assert\n @static\n @for @ember/debug\n @param {String} description Describes the expectation. This will become the\n text of the Error thrown if the assertion fails.\n @param {any} condition Must be truthy for the assertion to pass. If\n falsy, an exception will be thrown.\n @public\n @since 1.0.0\n */\n setDebugFunction('assert', function assert(desc, test) {\n if (!test) {\n throw new _error.default(`Assertion Failed: ${desc}`);\n }\n });\n /**\n Display a debug notice.\n Calls to this function are removed from production builds, so they can be\n freely added for documentation and debugging purposes without worries of\n incuring any performance penalty.\n ```javascript\n import { debug } from '@ember/debug';\n debug('I\\'m a debug notice!');\n ```\n @method debug\n @for @ember/debug\n @static\n @param {String} message A debug message to display.\n @public\n */\n\n setDebugFunction('debug', function debug(message) {\n /* eslint-disable no-console */\n if (console.debug) {\n console.debug(`DEBUG: ${message}`);\n } else {\n console.log(`DEBUG: ${message}`);\n }\n /* eslint-ensable no-console */\n\n });\n /**\n Display an info notice.\n Calls to this function are removed from production builds, so they can be\n freely added for documentation and debugging purposes without worries of\n incuring any performance penalty.\n @method info\n @private\n */\n\n setDebugFunction('info', function info() {\n console.info(...arguments);\n /* eslint-disable-line no-console */\n });\n /**\n @module @ember/debug\n @public\n */\n\n /**\n Alias an old, deprecated method with its new counterpart.\n Display a deprecation warning with the provided message and a stack trace\n (Chrome and Firefox only) when the assigned method is called.\n Calls to this function are removed from production builds, so they can be\n freely added for documentation and debugging purposes without worries of\n incuring any performance penalty.\n ```javascript\n import { deprecateFunc } from '@ember/debug';\n Ember.oldMethod = deprecateFunc('Please use the new, updated method', options, Ember.newMethod);\n ```\n @method deprecateFunc\n @static\n @for @ember/debug\n @param {String} message A description of the deprecation.\n @param {Object} [options] The options object for `deprecate`.\n @param {Function} func The new function called to replace its deprecated counterpart.\n @return {Function} A new function that wraps the original function with a deprecation warning\n @private\n */\n\n setDebugFunction('deprecateFunc', function deprecateFunc(...args) {\n if (args.length === 3) {\n var [message, options, func] = args;\n return function (...args) {\n deprecate(message, false, options);\n return func.apply(this, args);\n };\n } else {\n var [_message, _func] = args;\n return function () {\n deprecate(_message);\n return _func.apply(this, arguments);\n };\n }\n });\n /**\n @module @ember/debug\n @public\n */\n\n /**\n Run a function meant for debugging.\n Calls to this function are removed from production builds, so they can be\n freely added for documentation and debugging purposes without worries of\n incuring any performance penalty.\n ```javascript\n import Component from '@ember/component';\n import { runInDebug } from '@ember/debug';\n runInDebug(() => {\n Component.reopen({\n didInsertElement() {\n console.log(\"I'm happy\");\n }\n });\n });\n ```\n @method runInDebug\n @for @ember/debug\n @static\n @param {Function} func The function to be executed.\n @since 1.5.0\n @public\n */\n\n setDebugFunction('runInDebug', function runInDebug(func) {\n func();\n });\n setDebugFunction('debugSeal', function debugSeal(obj) {\n Object.seal(obj);\n });\n setDebugFunction('debugFreeze', function debugFreeze(obj) {\n // re-freezing an already frozen object introduces a significant\n // performance penalty on Chrome (tested through 59).\n //\n // See: https://bugs.chromium.org/p/v8/issues/detail?id=6450\n if (!Object.isFrozen(obj)) {\n Object.freeze(obj);\n }\n });\n setDebugFunction('deprecate', _deprecate2.default);\n setDebugFunction('warn', _warn2.default);\n }\n\n var _warnIfUsingStrippedFeatureFlags;\n\n _exports._warnIfUsingStrippedFeatureFlags = _warnIfUsingStrippedFeatureFlags;\n\n if (true\n /* DEBUG */\n && !(0, _testing.isTesting)()) {\n if (typeof window !== 'undefined' && (_browserEnvironment.isFirefox || _browserEnvironment.isChrome) && window.addEventListener) {\n window.addEventListener('load', () => {\n if (document.documentElement && document.documentElement.dataset && !document.documentElement.dataset.emberExtension) {\n var downloadURL;\n\n if (_browserEnvironment.isChrome) {\n downloadURL = 'https://chrome.google.com/webstore/detail/ember-inspector/bmdblncegkenkacieihfhpjfppoconhi';\n } else if (_browserEnvironment.isFirefox) {\n downloadURL = 'https://addons.mozilla.org/en-US/firefox/addon/ember-inspector/';\n }\n\n debug(`For more advanced debugging, install the Ember Inspector from ${downloadURL}`);\n }\n }, false);\n }\n }\n});","define(\"@ember/debug/lib/capture-render-tree\", [\"exports\", \"@glimmer/util\"], function (_exports, _util) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = captureRenderTree;\n\n /**\n @module @ember/debug\n */\n\n /**\n Ember Inspector calls this function to capture the current render tree.\n \n In production mode, this requires turning on `ENV._DEBUG_RENDER_TREE`\n before loading Ember.\n \n @private\n @static\n @method captureRenderTree\n @for @ember/debug\n @param app {ApplicationInstance} An `ApplicationInstance`.\n @since 3.14.0\n */\n function captureRenderTree(app) {\n var env = (0, _util.expect)(app.lookup('-environment:main'), 'BUG: owner is missing -environment:main');\n var rendererType = env.isInteractive ? 'renderer:-dom' : 'renderer:-inert';\n var renderer = (0, _util.expect)(app.lookup(rendererType), `BUG: owner is missing ${rendererType}`);\n return renderer.debugRenderTree.capture();\n }\n});","define(\"@ember/debug/lib/deprecate\", [\"exports\", \"@ember/-internals/environment\", \"@ember/debug/index\", \"@ember/debug/lib/handlers\"], function (_exports, _environment, _index, _handlers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.missingOptionsUntilDeprecation = _exports.missingOptionsIdDeprecation = _exports.missingOptionsDeprecation = _exports.registerHandler = _exports.default = void 0;\n\n /**\n @module @ember/debug\n @public\n */\n\n /**\n Allows for runtime registration of handler functions that override the default deprecation behavior.\n Deprecations are invoked by calls to [@ember/debug/deprecate](/ember/release/classes/@ember%2Fdebug/methods/deprecate?anchor=deprecate).\n The following example demonstrates its usage by registering a handler that throws an error if the\n message contains the word \"should\", otherwise defers to the default handler.\n \n ```javascript\n import { registerDeprecationHandler } from '@ember/debug';\n \n registerDeprecationHandler((message, options, next) => {\n if (message.indexOf('should') !== -1) {\n throw new Error(`Deprecation message with should: ${message}`);\n } else {\n // defer to whatever handler was registered before this one\n next(message, options);\n }\n });\n ```\n \n The handler function takes the following arguments:\n \n
        \n
      • message - The message received from the deprecation call.
      • \n
      • options - An object passed in with the deprecation call containing additional information including:
      • \n
          \n
        • id - An id of the deprecation in the form of package-name.specific-deprecation.
        • \n
        • until - The Ember version number the feature and deprecation will be removed in.
        • \n
        \n
      • next - A function that calls into the previously registered handler.
      • \n
      \n \n @public\n @static\n @method registerDeprecationHandler\n @for @ember/debug\n @param handler {Function} A function to handle deprecation calls.\n @since 2.1.0\n */\n var registerHandler = () => {};\n\n _exports.registerHandler = registerHandler;\n var missingOptionsDeprecation;\n _exports.missingOptionsDeprecation = missingOptionsDeprecation;\n var missingOptionsIdDeprecation;\n _exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;\n var missingOptionsUntilDeprecation;\n _exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation;\n\n var deprecate = () => {};\n\n if (true\n /* DEBUG */\n ) {\n _exports.registerHandler = registerHandler = function registerHandler(handler) {\n (0, _handlers.registerHandler)('deprecate', handler);\n };\n\n var formatMessage = function formatMessage(_message, options) {\n var message = _message;\n\n if (options && options.id) {\n message = message + ` [deprecation id: ${options.id}]`;\n }\n\n if (options && options.url) {\n message += ` See ${options.url} for more details.`;\n }\n\n return message;\n };\n\n registerHandler(function logDeprecationToConsole(message, options) {\n var updatedMessage = formatMessage(message, options);\n console.warn(`DEPRECATION: ${updatedMessage}`); // eslint-disable-line no-console\n });\n var captureErrorForStack;\n\n if (new Error().stack) {\n captureErrorForStack = () => new Error();\n } else {\n captureErrorForStack = () => {\n try {\n __fail__.fail();\n } catch (e) {\n return e;\n }\n };\n }\n\n registerHandler(function logDeprecationStackTrace(message, options, next) {\n if (_environment.ENV.LOG_STACKTRACE_ON_DEPRECATION) {\n var stackStr = '';\n var error = captureErrorForStack();\n var stack;\n\n if (error.stack) {\n if (error['arguments']) {\n // Chrome\n stack = error.stack.replace(/^\\s+at\\s+/gm, '').replace(/^([^\\(]+?)([\\n$])/gm, '{anonymous}($1)$2').replace(/^Object.\\s*\\(([^\\)]+)\\)/gm, '{anonymous}($1)').split('\\n');\n stack.shift();\n } else {\n // Firefox\n stack = error.stack.replace(/(?:\\n@:0)?\\s+$/m, '').replace(/^\\(/gm, '{anonymous}(').split('\\n');\n }\n\n stackStr = `\\n ${stack.slice(2).join('\\n ')}`;\n }\n\n var updatedMessage = formatMessage(message, options);\n console.warn(`DEPRECATION: ${updatedMessage}${stackStr}`); // eslint-disable-line no-console\n } else {\n next(message, options);\n }\n });\n registerHandler(function raiseOnDeprecation(message, options, next) {\n if (_environment.ENV.RAISE_ON_DEPRECATION) {\n var updatedMessage = formatMessage(message);\n throw new Error(updatedMessage);\n } else {\n next(message, options);\n }\n });\n _exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `deprecate` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include `id` and `until` properties.';\n _exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `deprecate` you must provide `id` in options.';\n _exports.missingOptionsUntilDeprecation = missingOptionsUntilDeprecation = 'When calling `deprecate` you must provide `until` in options.';\n /**\n @module @ember/debug\n @public\n */\n\n /**\n Display a deprecation warning with the provided message and a stack trace\n (Chrome and Firefox only).\n * In a production build, this method is defined as an empty function (NOP).\n Uses of this method in Ember itself are stripped from the ember.prod.js build.\n @method deprecate\n @for @ember/debug\n @param {String} message A description of the deprecation.\n @param {Boolean} test A boolean. If falsy, the deprecation will be displayed.\n @param {Object} options\n @param {String} options.id A unique id for this deprecation. The id can be\n used by Ember debugging tools to change the behavior (raise, log or silence)\n for that specific deprecation. The id should be namespaced by dots, e.g.\n \"view.helper.select\".\n @param {string} options.until The version of Ember when this deprecation\n warning will be removed.\n @param {String} [options.url] An optional url to the transition guide on the\n emberjs.com website.\n @static\n @public\n @since 1.0.0\n */\n\n deprecate = function deprecate(message, test, options) {\n (0, _index.assert)(missingOptionsDeprecation, Boolean(options && (options.id || options.until)));\n (0, _index.assert)(missingOptionsIdDeprecation, Boolean(options.id));\n (0, _index.assert)(missingOptionsUntilDeprecation, Boolean(options.until));\n (0, _handlers.invoke)('deprecate', message, test, options);\n };\n }\n\n var _default = deprecate;\n _exports.default = _default;\n});","define(\"@ember/debug/lib/handlers\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.invoke = _exports.registerHandler = _exports.HANDLERS = void 0;\n var HANDLERS = {};\n _exports.HANDLERS = HANDLERS;\n\n var registerHandler = () => {};\n\n _exports.registerHandler = registerHandler;\n\n var invoke = () => {};\n\n _exports.invoke = invoke;\n\n if (true\n /* DEBUG */\n ) {\n _exports.registerHandler = registerHandler = function registerHandler(type, callback) {\n var nextHandler = HANDLERS[type] || (() => {});\n\n HANDLERS[type] = (message, options) => {\n callback(message, options, nextHandler);\n };\n };\n\n _exports.invoke = invoke = function invoke(type, message, test, options) {\n if (test) {\n return;\n }\n\n var handlerForType = HANDLERS[type];\n\n if (handlerForType) {\n handlerForType(message, options);\n }\n };\n }\n});","define(\"@ember/debug/lib/testing\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.isTesting = isTesting;\n _exports.setTesting = setTesting;\n var testing = false;\n\n function isTesting() {\n return testing;\n }\n\n function setTesting(value) {\n testing = Boolean(value);\n }\n});","define(\"@ember/debug/lib/warn\", [\"exports\", \"@ember/debug/index\", \"@ember/debug/lib/handlers\"], function (_exports, _index, _handlers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.missingOptionsDeprecation = _exports.missingOptionsIdDeprecation = _exports.registerHandler = _exports.default = void 0;\n\n var registerHandler = () => {};\n\n _exports.registerHandler = registerHandler;\n\n var warn = () => {};\n\n var missingOptionsDeprecation;\n _exports.missingOptionsDeprecation = missingOptionsDeprecation;\n var missingOptionsIdDeprecation;\n /**\n @module @ember/debug\n */\n\n _exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation;\n\n if (true\n /* DEBUG */\n ) {\n /**\n Allows for runtime registration of handler functions that override the default warning behavior.\n Warnings are invoked by calls made to [@ember/debug/warn](/ember/release/classes/@ember%2Fdebug/methods/warn?anchor=warn).\n The following example demonstrates its usage by registering a handler that does nothing overriding Ember's\n default warning behavior.\n ```javascript\n import { registerWarnHandler } from '@ember/debug';\n // next is not called, so no warnings get the default behavior\n registerWarnHandler(() => {});\n ```\n The handler function takes the following arguments:\n
        \n
      • message - The message received from the warn call.
      • \n
      • options - An object passed in with the warn call containing additional information including:
      • \n
          \n
        • id - An id of the warning in the form of package-name.specific-warning.
        • \n
        \n
      • next - A function that calls into the previously registered handler.
      • \n
      \n @public\n @static\n @method registerWarnHandler\n @for @ember/debug\n @param handler {Function} A function to handle warnings.\n @since 2.1.0\n */\n _exports.registerHandler = registerHandler = function registerHandler(handler) {\n (0, _handlers.registerHandler)('warn', handler);\n };\n\n registerHandler(function logWarning(message) {\n /* eslint-disable no-console */\n console.warn(`WARNING: ${message}`);\n /* eslint-enable no-console */\n });\n _exports.missingOptionsDeprecation = missingOptionsDeprecation = 'When calling `warn` you ' + 'must provide an `options` hash as the third parameter. ' + '`options` should include an `id` property.';\n _exports.missingOptionsIdDeprecation = missingOptionsIdDeprecation = 'When calling `warn` you must provide `id` in options.';\n /**\n Display a warning with the provided message.\n * In a production build, this method is defined as an empty function (NOP).\n Uses of this method in Ember itself are stripped from the ember.prod.js build.\n ```javascript\n import { warn } from '@ember/debug';\n import tomsterCount from './tomster-counter'; // a module in my project\n // Log a warning if we have more than 3 tomsters\n warn('Too many tomsters!', tomsterCount <= 3, {\n id: 'ember-debug.too-many-tomsters'\n });\n ```\n @method warn\n @for @ember/debug\n @static\n @param {String} message A warning to display.\n @param {Boolean} test An optional boolean. If falsy, the warning\n will be displayed.\n @param {Object} options An object that can be used to pass a unique\n `id` for this warning. The `id` can be used by Ember debugging tools\n to change the behavior (raise, log, or silence) for that specific warning.\n The `id` should be namespaced by dots, e.g. \"ember-debug.feature-flag-with-features-stripped\"\n @public\n @since 1.0.0\n */\n\n warn = function warn(message, test, options) {\n if (arguments.length === 2 && typeof test === 'object') {\n options = test;\n test = false;\n }\n\n (0, _index.assert)(missingOptionsDeprecation, Boolean(options));\n (0, _index.assert)(missingOptionsIdDeprecation, Boolean(options && options.id));\n (0, _handlers.invoke)('warn', message, test, options);\n };\n }\n\n var _default = warn;\n _exports.default = _default;\n});","define(\"ember-testing/index\", [\"exports\", \"ember-testing/lib/test\", \"ember-testing/lib/adapters/adapter\", \"ember-testing/lib/setup_for_testing\", \"ember-testing/lib/adapters/qunit\", \"ember-testing/lib/support\", \"ember-testing/lib/ext/application\", \"ember-testing/lib/ext/rsvp\", \"ember-testing/lib/helpers\", \"ember-testing/lib/initializers\"], function (_exports, _test, _adapter, _setup_for_testing, _qunit, _support, _application, _rsvp, _helpers, _initializers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"Test\", {\n enumerable: true,\n get: function () {\n return _test.default;\n }\n });\n Object.defineProperty(_exports, \"Adapter\", {\n enumerable: true,\n get: function () {\n return _adapter.default;\n }\n });\n Object.defineProperty(_exports, \"setupForTesting\", {\n enumerable: true,\n get: function () {\n return _setup_for_testing.default;\n }\n });\n Object.defineProperty(_exports, \"QUnitAdapter\", {\n enumerable: true,\n get: function () {\n return _qunit.default;\n }\n });\n});","define(\"ember-testing/lib/adapters/adapter\", [\"exports\", \"@ember/-internals/runtime\"], function (_exports, _runtime) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n function K() {\n return this;\n }\n /**\n @module @ember/test\n */\n\n /**\n The primary purpose of this class is to create hooks that can be implemented\n by an adapter for various test frameworks.\n \n @class TestAdapter\n @public\n */\n\n\n var _default = _runtime.Object.extend({\n /**\n This callback will be called whenever an async operation is about to start.\n Override this to call your framework's methods that handle async\n operations.\n @public\n @method asyncStart\n */\n asyncStart: K,\n\n /**\n This callback will be called whenever an async operation has completed.\n @public\n @method asyncEnd\n */\n asyncEnd: K,\n\n /**\n Override this method with your testing framework's false assertion.\n This function is called whenever an exception occurs causing the testing\n promise to fail.\n QUnit example:\n ```javascript\n exception: function(error) {\n ok(false, error);\n };\n ```\n @public\n @method exception\n @param {String} error The exception to be raised.\n */\n exception(error) {\n throw error;\n }\n\n });\n\n _exports.default = _default;\n});","define(\"ember-testing/lib/adapters/qunit\", [\"exports\", \"@ember/-internals/utils\", \"ember-testing/lib/adapters/adapter\"], function (_exports, _utils, _adapter) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n /* globals QUnit */\n\n /**\n @module ember\n */\n\n /**\n This class implements the methods defined by TestAdapter for the\n QUnit testing framework.\n \n @class QUnitAdapter\n @namespace Ember.Test\n @extends TestAdapter\n @public\n */\n var _default = _adapter.default.extend({\n init() {\n this.doneCallbacks = [];\n },\n\n asyncStart() {\n if (typeof QUnit.stop === 'function') {\n // very old QUnit version\n QUnit.stop();\n } else {\n this.doneCallbacks.push(QUnit.config.current ? QUnit.config.current.assert.async() : null);\n }\n },\n\n asyncEnd() {\n // checking for QUnit.stop here (even though we _need_ QUnit.start) because\n // QUnit.start() still exists in QUnit 2.x (it just throws an error when calling\n // inside a test context)\n if (typeof QUnit.stop === 'function') {\n QUnit.start();\n } else {\n var done = this.doneCallbacks.pop(); // This can be null if asyncStart() was called outside of a test\n\n if (done) {\n done();\n }\n }\n },\n\n exception(error) {\n QUnit.config.current.assert.ok(false, (0, _utils.inspect)(error));\n }\n\n });\n\n _exports.default = _default;\n});","define(\"ember-testing/lib/events\", [\"exports\", \"@ember/runloop\", \"@ember/polyfills\", \"ember-testing/lib/helpers/-is-form-control\"], function (_exports, _runloop, _polyfills, _isFormControl) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.focus = focus;\n _exports.fireEvent = fireEvent;\n var DEFAULT_EVENT_OPTIONS = {\n canBubble: true,\n cancelable: true\n };\n var KEYBOARD_EVENT_TYPES = ['keydown', 'keypress', 'keyup'];\n var MOUSE_EVENT_TYPES = ['click', 'mousedown', 'mouseup', 'dblclick', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover'];\n\n function focus(el) {\n if (!el) {\n return;\n }\n\n if (el.isContentEditable || (0, _isFormControl.default)(el)) {\n var type = el.getAttribute('type');\n\n if (type !== 'checkbox' && type !== 'radio' && type !== 'hidden') {\n (0, _runloop.run)(null, function () {\n var browserIsNotFocused = document.hasFocus && !document.hasFocus(); // makes `document.activeElement` be `element`. If the browser is focused, it also fires a focus event\n\n el.focus(); // Firefox does not trigger the `focusin` event if the window\n // does not have focus. If the document does not have focus then\n // fire `focusin` event as well.\n\n if (browserIsNotFocused) {\n // if the browser is not focused the previous `el.focus()` didn't fire an event, so we simulate it\n fireEvent(el, 'focus', {\n bubbles: false\n });\n fireEvent(el, 'focusin');\n }\n });\n }\n }\n }\n\n function fireEvent(element, type, options = {}) {\n if (!element) {\n return;\n }\n\n var event;\n\n if (KEYBOARD_EVENT_TYPES.indexOf(type) > -1) {\n event = buildKeyboardEvent(type, options);\n } else if (MOUSE_EVENT_TYPES.indexOf(type) > -1) {\n var rect = element.getBoundingClientRect();\n var x = rect.left + 1;\n var y = rect.top + 1;\n var simulatedCoordinates = {\n screenX: x + 5,\n screenY: y + 95,\n clientX: x,\n clientY: y\n };\n event = buildMouseEvent(type, (0, _polyfills.assign)(simulatedCoordinates, options));\n } else {\n event = buildBasicEvent(type, options);\n }\n\n element.dispatchEvent(event);\n }\n\n function buildBasicEvent(type, options = {}) {\n var event = document.createEvent('Events'); // Event.bubbles is read only\n\n var bubbles = options.bubbles !== undefined ? options.bubbles : true;\n var cancelable = options.cancelable !== undefined ? options.cancelable : true;\n delete options.bubbles;\n delete options.cancelable;\n event.initEvent(type, bubbles, cancelable);\n (0, _polyfills.assign)(event, options);\n return event;\n }\n\n function buildMouseEvent(type, options = {}) {\n var event;\n\n try {\n event = document.createEvent('MouseEvents');\n var eventOpts = (0, _polyfills.assign)({}, DEFAULT_EVENT_OPTIONS, options);\n event.initMouseEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget);\n } catch (e) {\n event = buildBasicEvent(type, options);\n }\n\n return event;\n }\n\n function buildKeyboardEvent(type, options = {}) {\n var event;\n\n try {\n event = document.createEvent('KeyEvents');\n var eventOpts = (0, _polyfills.assign)({}, DEFAULT_EVENT_OPTIONS, options);\n event.initKeyEvent(type, eventOpts.canBubble, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode);\n } catch (e) {\n event = buildBasicEvent(type, options);\n }\n\n return event;\n }\n});","define(\"ember-testing/lib/ext/application\", [\"@ember/application\", \"ember-testing/lib/setup_for_testing\", \"ember-testing/lib/test/helpers\", \"ember-testing/lib/test/promise\", \"ember-testing/lib/test/run\", \"ember-testing/lib/test/on_inject_helpers\", \"ember-testing/lib/test/adapter\"], function (_application, _setup_for_testing, _helpers, _promise, _run, _on_inject_helpers, _adapter) {\n \"use strict\";\n\n _application.default.reopen({\n /**\n This property contains the testing helpers for the current application. These\n are created once you call `injectTestHelpers` on your `Application`\n instance. The included helpers are also available on the `window` object by\n default, but can be used from this object on the individual application also.\n @property testHelpers\n @type {Object}\n @default {}\n @public\n */\n testHelpers: {},\n\n /**\n This property will contain the original methods that were registered\n on the `helperContainer` before `injectTestHelpers` is called.\n When `removeTestHelpers` is called, these methods are restored to the\n `helperContainer`.\n @property originalMethods\n @type {Object}\n @default {}\n @private\n @since 1.3.0\n */\n originalMethods: {},\n\n /**\n This property indicates whether or not this application is currently in\n testing mode. This is set when `setupForTesting` is called on the current\n application.\n @property testing\n @type {Boolean}\n @default false\n @since 1.3.0\n @public\n */\n testing: false,\n\n /**\n This hook defers the readiness of the application, so that you can start\n the app when your tests are ready to run. It also sets the router's\n location to 'none', so that the window's location will not be modified\n (preventing both accidental leaking of state between tests and interference\n with your testing framework). `setupForTesting` should only be called after\n setting a custom `router` class (for example `App.Router = Router.extend(`).\n Example:\n ```\n App.setupForTesting();\n ```\n @method setupForTesting\n @public\n */\n setupForTesting() {\n (0, _setup_for_testing.default)();\n this.testing = true;\n this.resolveRegistration('router:main').reopen({\n location: 'none'\n });\n },\n\n /**\n This will be used as the container to inject the test helpers into. By\n default the helpers are injected into `window`.\n @property helperContainer\n @type {Object} The object to be used for test helpers.\n @default window\n @since 1.2.0\n @private\n */\n helperContainer: null,\n\n /**\n This injects the test helpers into the `helperContainer` object. If an object is provided\n it will be used as the helperContainer. If `helperContainer` is not set it will default\n to `window`. If a function of the same name has already been defined it will be cached\n (so that it can be reset if the helper is removed with `unregisterHelper` or\n `removeTestHelpers`).\n Any callbacks registered with `onInjectHelpers` will be called once the\n helpers have been injected.\n Example:\n ```\n App.injectTestHelpers();\n ```\n @method injectTestHelpers\n @public\n */\n injectTestHelpers(helperContainer) {\n if (helperContainer) {\n this.helperContainer = helperContainer;\n } else {\n this.helperContainer = window;\n }\n\n this.reopen({\n willDestroy() {\n this._super(...arguments);\n\n this.removeTestHelpers();\n }\n\n });\n this.testHelpers = {};\n\n for (var name in _helpers.helpers) {\n this.originalMethods[name] = this.helperContainer[name];\n this.testHelpers[name] = this.helperContainer[name] = helper(this, name);\n protoWrap(_promise.default.prototype, name, helper(this, name), _helpers.helpers[name].meta.wait);\n }\n\n (0, _on_inject_helpers.invokeInjectHelpersCallbacks)(this);\n },\n\n /**\n This removes all helpers that have been registered, and resets and functions\n that were overridden by the helpers.\n Example:\n ```javascript\n App.removeTestHelpers();\n ```\n @public\n @method removeTestHelpers\n */\n removeTestHelpers() {\n if (!this.helperContainer) {\n return;\n }\n\n for (var name in _helpers.helpers) {\n this.helperContainer[name] = this.originalMethods[name];\n delete _promise.default.prototype[name];\n delete this.testHelpers[name];\n delete this.originalMethods[name];\n }\n }\n\n }); // This method is no longer needed\n // But still here for backwards compatibility\n // of helper chaining\n\n\n function protoWrap(proto, name, callback, isAsync) {\n proto[name] = function (...args) {\n if (isAsync) {\n return callback.apply(this, args);\n } else {\n return this.then(function () {\n return callback.apply(this, args);\n });\n }\n };\n }\n\n function helper(app, name) {\n var fn = _helpers.helpers[name].method;\n var meta = _helpers.helpers[name].meta;\n\n if (!meta.wait) {\n return (...args) => fn.apply(app, [app, ...args]);\n }\n\n return (...args) => {\n var lastPromise = (0, _run.default)(() => (0, _promise.resolve)((0, _promise.getLastPromise)())); // wait for last helper's promise to resolve and then\n // execute. To be safe, we need to tell the adapter we're going\n // asynchronous here, because fn may not be invoked before we\n // return.\n\n (0, _adapter.asyncStart)();\n return lastPromise.then(() => fn.apply(app, [app, ...args])).finally(_adapter.asyncEnd);\n };\n }\n});","define(\"ember-testing/lib/ext/rsvp\", [\"exports\", \"@ember/-internals/runtime\", \"@ember/runloop\", \"@ember/debug\", \"ember-testing/lib/test/adapter\"], function (_exports, _runtime, _runloop, _debug, _adapter) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n _runtime.RSVP.configure('async', function (callback, promise) {\n // if schedule will cause autorun, we need to inform adapter\n if ((0, _debug.isTesting)() && !_runloop.backburner.currentInstance) {\n (0, _adapter.asyncStart)();\n\n _runloop.backburner.schedule('actions', () => {\n (0, _adapter.asyncEnd)();\n callback(promise);\n });\n } else {\n _runloop.backburner.schedule('actions', () => callback(promise));\n }\n });\n\n var _default = _runtime.RSVP;\n _exports.default = _default;\n});","define(\"ember-testing/lib/helpers\", [\"ember-testing/lib/test/helpers\", \"ember-testing/lib/helpers/and_then\", \"ember-testing/lib/helpers/click\", \"ember-testing/lib/helpers/current_path\", \"ember-testing/lib/helpers/current_route_name\", \"ember-testing/lib/helpers/current_url\", \"ember-testing/lib/helpers/fill_in\", \"ember-testing/lib/helpers/find\", \"ember-testing/lib/helpers/find_with_assert\", \"ember-testing/lib/helpers/key_event\", \"ember-testing/lib/helpers/pause_test\", \"ember-testing/lib/helpers/trigger_event\", \"ember-testing/lib/helpers/visit\", \"ember-testing/lib/helpers/wait\"], function (_helpers, _and_then, _click, _current_path, _current_route_name, _current_url, _fill_in, _find, _find_with_assert, _key_event, _pause_test, _trigger_event, _visit, _wait) {\n \"use strict\";\n\n (0, _helpers.registerAsyncHelper)('visit', _visit.default);\n (0, _helpers.registerAsyncHelper)('click', _click.default);\n (0, _helpers.registerAsyncHelper)('keyEvent', _key_event.default);\n (0, _helpers.registerAsyncHelper)('fillIn', _fill_in.default);\n (0, _helpers.registerAsyncHelper)('wait', _wait.default);\n (0, _helpers.registerAsyncHelper)('andThen', _and_then.default);\n (0, _helpers.registerAsyncHelper)('pauseTest', _pause_test.pauseTest);\n (0, _helpers.registerAsyncHelper)('triggerEvent', _trigger_event.default);\n (0, _helpers.registerHelper)('find', _find.default);\n (0, _helpers.registerHelper)('findWithAssert', _find_with_assert.default);\n (0, _helpers.registerHelper)('currentRouteName', _current_route_name.default);\n (0, _helpers.registerHelper)('currentPath', _current_path.default);\n (0, _helpers.registerHelper)('currentURL', _current_url.default);\n (0, _helpers.registerHelper)('resumeTest', _pause_test.resumeTest);\n});","define(\"ember-testing/lib/helpers/-is-form-control\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = isFormControl;\n var FORM_CONTROL_TAGS = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'];\n /**\n @private\n @param {Element} element the element to check\n @returns {boolean} `true` when the element is a form control, `false` otherwise\n */\n\n function isFormControl(element) {\n var {\n tagName,\n type\n } = element;\n\n if (type === 'hidden') {\n return false;\n }\n\n return FORM_CONTROL_TAGS.indexOf(tagName) > -1;\n }\n});","define(\"ember-testing/lib/helpers/and_then\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = andThen;\n\n function andThen(app, callback) {\n return app.testHelpers.wait(callback(app));\n }\n});","define(\"ember-testing/lib/helpers/click\", [\"exports\", \"ember-testing/lib/events\"], function (_exports, _events) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = click;\n\n /**\n @module ember\n */\n\n /**\n Clicks an element and triggers any actions triggered by the element's `click`\n event.\n \n Example:\n \n ```javascript\n click('.some-jQuery-selector').then(function() {\n // assert something\n });\n ```\n \n @method click\n @param {String} selector jQuery selector for finding element on the DOM\n @param {Object} context A DOM Element, Document, or jQuery to use as context\n @return {RSVP.Promise}\n @public\n */\n function click(app, selector, context) {\n var $el = app.testHelpers.findWithAssert(selector, context);\n var el = $el[0];\n (0, _events.fireEvent)(el, 'mousedown');\n (0, _events.focus)(el);\n (0, _events.fireEvent)(el, 'mouseup');\n (0, _events.fireEvent)(el, 'click');\n return app.testHelpers.wait();\n }\n});","define(\"ember-testing/lib/helpers/current_path\", [\"exports\", \"@ember/-internals/metal\"], function (_exports, _metal) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = currentPath;\n\n /**\n @module ember\n */\n\n /**\n Returns the current path.\n \n Example:\n \n ```javascript\n function validateURL() {\n equal(currentPath(), 'some.path.index', \"correct path was transitioned into.\");\n }\n \n click('#some-link-id').then(validateURL);\n ```\n \n @method currentPath\n @return {Object} The currently active path.\n @since 1.5.0\n @public\n */\n function currentPath(app) {\n var routingService = app.__container__.lookup('service:-routing');\n\n return (0, _metal.get)(routingService, 'currentPath');\n }\n});","define(\"ember-testing/lib/helpers/current_route_name\", [\"exports\", \"@ember/-internals/metal\"], function (_exports, _metal) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = currentRouteName;\n\n /**\n @module ember\n */\n\n /**\n Returns the currently active route name.\n \n Example:\n \n ```javascript\n function validateRouteName() {\n equal(currentRouteName(), 'some.path', \"correct route was transitioned into.\");\n }\n visit('/some/path').then(validateRouteName)\n ```\n \n @method currentRouteName\n @return {Object} The name of the currently active route.\n @since 1.5.0\n @public\n */\n function currentRouteName(app) {\n var routingService = app.__container__.lookup('service:-routing');\n\n return (0, _metal.get)(routingService, 'currentRouteName');\n }\n});","define(\"ember-testing/lib/helpers/current_url\", [\"exports\", \"@ember/-internals/metal\"], function (_exports, _metal) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = currentURL;\n\n /**\n @module ember\n */\n\n /**\n Returns the current URL.\n \n Example:\n \n ```javascript\n function validateURL() {\n equal(currentURL(), '/some/path', \"correct URL was transitioned into.\");\n }\n \n click('#some-link-id').then(validateURL);\n ```\n \n @method currentURL\n @return {Object} The currently active URL.\n @since 1.5.0\n @public\n */\n function currentURL(app) {\n var router = app.__container__.lookup('router:main');\n\n return (0, _metal.get)(router, 'location').getURL();\n }\n});","define(\"ember-testing/lib/helpers/fill_in\", [\"exports\", \"ember-testing/lib/events\", \"ember-testing/lib/helpers/-is-form-control\"], function (_exports, _events, _isFormControl) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = fillIn;\n\n /**\n @module ember\n */\n\n /**\n Fills in an input element with some text.\n \n Example:\n \n ```javascript\n fillIn('#email', 'you@example.com').then(function() {\n // assert something\n });\n ```\n \n @method fillIn\n @param {String} selector jQuery selector finding an input element on the DOM\n to fill text with\n @param {String} text text to place inside the input element\n @return {RSVP.Promise}\n @public\n */\n function fillIn(app, selector, contextOrText, text) {\n var $el, el, context;\n\n if (text === undefined) {\n text = contextOrText;\n } else {\n context = contextOrText;\n }\n\n $el = app.testHelpers.findWithAssert(selector, context);\n el = $el[0];\n (0, _events.focus)(el);\n\n if ((0, _isFormControl.default)(el)) {\n el.value = text;\n } else {\n el.innerHTML = text;\n }\n\n (0, _events.fireEvent)(el, 'input');\n (0, _events.fireEvent)(el, 'change');\n return app.testHelpers.wait();\n }\n});","define(\"ember-testing/lib/helpers/find\", [\"exports\", \"@ember/-internals/metal\", \"@ember/debug\", \"@ember/-internals/views\"], function (_exports, _metal, _debug, _views) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = find;\n\n /**\n @module ember\n */\n\n /**\n Finds an element in the context of the app's container element. A simple alias\n for `app.$(selector)`.\n \n Example:\n \n ```javascript\n var $el = find('.my-selector');\n ```\n \n With the `context` param:\n \n ```javascript\n var $el = find('.my-selector', '.parent-element-class');\n ```\n \n @method find\n @param {String} selector jQuery selector for element lookup\n @param {String} [context] (optional) jQuery selector that will limit the selector\n argument to find only within the context's children\n @return {Object} DOM element representing the results of the query\n @public\n */\n function find(app, selector, context) {\n if (_views.jQueryDisabled) {\n (true && !(false) && (0, _debug.assert)('If jQuery is disabled, please import and use helpers from @ember/test-helpers [https://github.com/emberjs/ember-test-helpers]. Note: `find` is not an available helper.'));\n }\n\n var $el;\n context = context || (0, _metal.get)(app, 'rootElement');\n $el = app.$(selector, context);\n return $el;\n }\n});","define(\"ember-testing/lib/helpers/find_with_assert\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = findWithAssert;\n\n /**\n @module ember\n */\n\n /**\n Like `find`, but throws an error if the element selector returns no results.\n \n Example:\n \n ```javascript\n var $el = findWithAssert('.doesnt-exist'); // throws error\n ```\n \n With the `context` param:\n \n ```javascript\n var $el = findWithAssert('.selector-id', '.parent-element-class'); // assert will pass\n ```\n \n @method findWithAssert\n @param {String} selector jQuery selector string for finding an element within\n the DOM\n @param {String} [context] (optional) jQuery selector that will limit the\n selector argument to find only within the context's children\n @return {Object} jQuery object representing the results of the query\n @throws {Error} throws error if object returned has a length of 0\n @public\n */\n function findWithAssert(app, selector, context) {\n var $el = app.testHelpers.find(selector, context);\n\n if ($el.length === 0) {\n throw new Error('Element ' + selector + ' not found.');\n }\n\n return $el;\n }\n});","define(\"ember-testing/lib/helpers/key_event\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = keyEvent;\n\n /**\n @module ember\n */\n\n /**\n Simulates a key event, e.g. `keypress`, `keydown`, `keyup` with the desired keyCode\n Example:\n ```javascript\n keyEvent('.some-jQuery-selector', 'keypress', 13).then(function() {\n // assert something\n });\n ```\n @method keyEvent\n @param {String} selector jQuery selector for finding element on the DOM\n @param {String} type the type of key event, e.g. `keypress`, `keydown`, `keyup`\n @param {Number} keyCode the keyCode of the simulated key event\n @return {RSVP.Promise}\n @since 1.5.0\n @public\n */\n function keyEvent(app, selector, contextOrType, typeOrKeyCode, keyCode) {\n var context, type;\n\n if (keyCode === undefined) {\n context = null;\n keyCode = typeOrKeyCode;\n type = contextOrType;\n } else {\n context = contextOrType;\n type = typeOrKeyCode;\n }\n\n return app.testHelpers.triggerEvent(selector, context, type, {\n keyCode,\n which: keyCode\n });\n }\n});","define(\"ember-testing/lib/helpers/pause_test\", [\"exports\", \"@ember/-internals/runtime\", \"@ember/debug\"], function (_exports, _runtime, _debug) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.resumeTest = resumeTest;\n _exports.pauseTest = pauseTest;\n\n /**\n @module ember\n */\n var resume;\n /**\n Resumes a test paused by `pauseTest`.\n \n @method resumeTest\n @return {void}\n @public\n */\n\n function resumeTest() {\n (true && !(resume) && (0, _debug.assert)('Testing has not been paused. There is nothing to resume.', resume));\n resume();\n resume = undefined;\n }\n /**\n Pauses the current test - this is useful for debugging while testing or for test-driving.\n It allows you to inspect the state of your application at any point.\n Example (The test will pause before clicking the button):\n \n ```javascript\n visit('/')\n return pauseTest();\n click('.btn');\n ```\n \n You may want to turn off the timeout before pausing.\n \n qunit (timeout available to use as of 2.4.0):\n \n ```\n visit('/');\n assert.timeout(0);\n return pauseTest();\n click('.btn');\n ```\n \n mocha (timeout happens automatically as of ember-mocha v0.14.0):\n \n ```\n visit('/');\n this.timeout(0);\n return pauseTest();\n click('.btn');\n ```\n \n \n @since 1.9.0\n @method pauseTest\n @return {Object} A promise that will never resolve\n @public\n */\n\n\n function pauseTest() {\n (0, _debug.info)('Testing paused. Use `resumeTest()` to continue.');\n return new _runtime.RSVP.Promise(resolve => {\n resume = resolve;\n }, 'TestAdapter paused promise');\n }\n});","define(\"ember-testing/lib/helpers/trigger_event\", [\"exports\", \"ember-testing/lib/events\"], function (_exports, _events) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = triggerEvent;\n\n /**\n @module ember\n */\n\n /**\n Triggers the given DOM event on the element identified by the provided selector.\n Example:\n ```javascript\n triggerEvent('#some-elem-id', 'blur');\n ```\n This is actually used internally by the `keyEvent` helper like so:\n ```javascript\n triggerEvent('#some-elem-id', 'keypress', { keyCode: 13 });\n ```\n @method triggerEvent\n @param {String} selector jQuery selector for finding element on the DOM\n @param {String} [context] jQuery selector that will limit the selector\n argument to find only within the context's children\n @param {String} type The event type to be triggered.\n @param {Object} [options] The options to be passed to jQuery.Event.\n @return {RSVP.Promise}\n @since 1.5.0\n @public\n */\n function triggerEvent(app, selector, contextOrType, typeOrOptions, possibleOptions) {\n var arity = arguments.length;\n var context, type, options;\n\n if (arity === 3) {\n // context and options are optional, so this is\n // app, selector, type\n context = null;\n type = contextOrType;\n options = {};\n } else if (arity === 4) {\n // context and options are optional, so this is\n if (typeof typeOrOptions === 'object') {\n // either\n // app, selector, type, options\n context = null;\n type = contextOrType;\n options = typeOrOptions;\n } else {\n // or\n // app, selector, context, type\n context = contextOrType;\n type = typeOrOptions;\n options = {};\n }\n } else {\n context = contextOrType;\n type = typeOrOptions;\n options = possibleOptions;\n }\n\n var $el = app.testHelpers.findWithAssert(selector, context);\n var el = $el[0];\n (0, _events.fireEvent)(el, type, options);\n return app.testHelpers.wait();\n }\n});","define(\"ember-testing/lib/helpers/visit\", [\"exports\", \"@ember/runloop\"], function (_exports, _runloop) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = visit;\n\n /**\n Loads a route, sets up any controllers, and renders any templates associated\n with the route as though a real user had triggered the route change while\n using your app.\n \n Example:\n \n ```javascript\n visit('posts/index').then(function() {\n // assert something\n });\n ```\n \n @method visit\n @param {String} url the name of the route\n @return {RSVP.Promise}\n @public\n */\n function visit(app, url) {\n var router = app.__container__.lookup('router:main');\n\n var shouldHandleURL = false;\n app.boot().then(() => {\n router.location.setURL(url);\n\n if (shouldHandleURL) {\n (0, _runloop.run)(app.__deprecatedInstance__, 'handleURL', url);\n }\n });\n\n if (app._readinessDeferrals > 0) {\n router.initialURL = url;\n (0, _runloop.run)(app, 'advanceReadiness');\n delete router.initialURL;\n } else {\n shouldHandleURL = true;\n }\n\n return app.testHelpers.wait();\n }\n});","define(\"ember-testing/lib/helpers/wait\", [\"exports\", \"ember-testing/lib/test/waiters\", \"@ember/-internals/runtime\", \"@ember/runloop\", \"ember-testing/lib/test/pending_requests\"], function (_exports, _waiters, _runtime, _runloop, _pending_requests) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = wait;\n\n /**\n @module ember\n */\n\n /**\n Causes the run loop to process any pending events. This is used to ensure that\n any async operations from other helpers (or your assertions) have been processed.\n \n This is most often used as the return value for the helper functions (see 'click',\n 'fillIn','visit',etc). However, there is a method to register a test helper which\n utilizes this method without the need to actually call `wait()` in your helpers.\n \n The `wait` helper is built into `registerAsyncHelper` by default. You will not need\n to `return app.testHelpers.wait();` - the wait behavior is provided for you.\n \n Example:\n \n ```javascript\n import { registerAsyncHelper } from '@ember/test';\n \n registerAsyncHelper('loginUser', function(app, username, password) {\n visit('secured/path/here')\n .fillIn('#username', username)\n .fillIn('#password', password)\n .click('.submit');\n });\n ```\n \n @method wait\n @param {Object} value The value to be returned.\n @return {RSVP.Promise} Promise that resolves to the passed value.\n @public\n @since 1.0.0\n */\n function wait(app, value) {\n return new _runtime.RSVP.Promise(function (resolve) {\n var router = app.__container__.lookup('router:main'); // Every 10ms, poll for the async thing to have finished\n\n\n var watcher = setInterval(() => {\n // 1. If the router is loading, keep polling\n var routerIsLoading = router._routerMicrolib && Boolean(router._routerMicrolib.activeTransition);\n\n if (routerIsLoading) {\n return;\n } // 2. If there are pending Ajax requests, keep polling\n\n\n if ((0, _pending_requests.pendingRequests)()) {\n return;\n } // 3. If there are scheduled timers or we are inside of a run loop, keep polling\n\n\n if ((0, _runloop.hasScheduledTimers)() || (0, _runloop.getCurrentRunLoop)()) {\n return;\n }\n\n if ((0, _waiters.checkWaiters)()) {\n return;\n } // Stop polling\n\n\n clearInterval(watcher); // Synchronously resolve the promise\n\n (0, _runloop.run)(null, resolve, value);\n }, 10);\n });\n }\n});","define(\"ember-testing/lib/initializers\", [\"@ember/application\"], function (_application) {\n \"use strict\";\n\n var name = 'deferReadiness in `testing` mode';\n (0, _application.onLoad)('Ember.Application', function (Application) {\n if (!Application.initializers[name]) {\n Application.initializer({\n name: name,\n\n initialize(application) {\n if (application.testing) {\n application.deferReadiness();\n }\n }\n\n });\n }\n });\n});","define(\"ember-testing/lib/setup_for_testing\", [\"exports\", \"@ember/debug\", \"@ember/-internals/views\", \"ember-testing/lib/test/adapter\", \"ember-testing/lib/test/pending_requests\", \"ember-testing/lib/adapters/adapter\", \"ember-testing/lib/adapters/qunit\"], function (_exports, _debug, _views, _adapter, _pending_requests, _adapter2, _qunit) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = setupForTesting;\n\n /* global self */\n\n /**\n Sets Ember up for testing. This is useful to perform\n basic setup steps in order to unit test.\n \n Use `App.setupForTesting` to perform integration tests (full\n application testing).\n \n @method setupForTesting\n @namespace Ember\n @since 1.5.0\n @private\n */\n function setupForTesting() {\n (0, _debug.setTesting)(true);\n var adapter = (0, _adapter.getAdapter)(); // if adapter is not manually set default to QUnit\n\n if (!adapter) {\n (0, _adapter.setAdapter)(typeof self.QUnit === 'undefined' ? _adapter2.default.create() : _qunit.default.create());\n }\n\n if (!_views.jQueryDisabled) {\n (0, _views.jQuery)(document).off('ajaxSend', _pending_requests.incrementPendingRequests);\n (0, _views.jQuery)(document).off('ajaxComplete', _pending_requests.decrementPendingRequests);\n (0, _pending_requests.clearPendingRequests)();\n (0, _views.jQuery)(document).on('ajaxSend', _pending_requests.incrementPendingRequests);\n (0, _views.jQuery)(document).on('ajaxComplete', _pending_requests.decrementPendingRequests);\n }\n }\n});","define(\"ember-testing/lib/support\", [\"@ember/debug\", \"@ember/-internals/views\", \"@ember/-internals/browser-environment\"], function (_debug, _views, _browserEnvironment) {\n \"use strict\";\n\n /**\n @module ember\n */\n var $ = _views.jQuery;\n /**\n This method creates a checkbox and triggers the click event to fire the\n passed in handler. It is used to correct for a bug in older versions\n of jQuery (e.g 1.8.3).\n \n @private\n @method testCheckboxClick\n */\n\n function testCheckboxClick(handler) {\n var input = document.createElement('input');\n $(input).attr('type', 'checkbox').css({\n position: 'absolute',\n left: '-1000px',\n top: '-1000px'\n }).appendTo('body').on('click', handler).trigger('click').remove();\n }\n\n if (_browserEnvironment.hasDOM && !_views.jQueryDisabled) {\n $(function () {\n /*\n Determine whether a checkbox checked using jQuery's \"click\" method will have\n the correct value for its checked property.\n If we determine that the current jQuery version exhibits this behavior,\n patch it to work correctly as in the commit for the actual fix:\n https://github.com/jquery/jquery/commit/1fb2f92.\n */\n testCheckboxClick(function () {\n if (!this.checked && !$.event.special.click) {\n $.event.special.click = {\n // For checkbox, fire native event so checked state will be right\n trigger() {\n if (this.nodeName === 'INPUT' && this.type === 'checkbox' && this.click) {\n this.click();\n return false;\n }\n }\n\n };\n }\n }); // Try again to verify that the patch took effect or blow up.\n\n testCheckboxClick(function () {\n (true && (0, _debug.warn)(\"clicked checkboxes should be checked! the jQuery patch didn't work\", this.checked, {\n id: 'ember-testing.test-checkbox-click'\n }));\n });\n });\n }\n});","define(\"ember-testing/lib/test\", [\"exports\", \"ember-testing/lib/test/helpers\", \"ember-testing/lib/test/on_inject_helpers\", \"ember-testing/lib/test/promise\", \"ember-testing/lib/test/waiters\", \"ember-testing/lib/test/adapter\"], function (_exports, _helpers, _on_inject_helpers, _promise, _waiters, _adapter) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n /**\n @module ember\n */\n\n /**\n This is a container for an assortment of testing related functionality:\n \n * Choose your default test adapter (for your framework of choice).\n * Register/Unregister additional test helpers.\n * Setup callbacks to be fired when the test helpers are injected into\n your application.\n \n @class Test\n @namespace Ember\n @public\n */\n var Test = {\n /**\n Hash containing all known test helpers.\n @property _helpers\n @private\n @since 1.7.0\n */\n _helpers: _helpers.helpers,\n registerHelper: _helpers.registerHelper,\n registerAsyncHelper: _helpers.registerAsyncHelper,\n unregisterHelper: _helpers.unregisterHelper,\n onInjectHelpers: _on_inject_helpers.onInjectHelpers,\n Promise: _promise.default,\n promise: _promise.promise,\n resolve: _promise.resolve,\n registerWaiter: _waiters.registerWaiter,\n unregisterWaiter: _waiters.unregisterWaiter,\n checkWaiters: _waiters.checkWaiters\n };\n /**\n Used to allow ember-testing to communicate with a specific testing\n framework.\n \n You can manually set it before calling `App.setupForTesting()`.\n \n Example:\n \n ```javascript\n Ember.Test.adapter = MyCustomAdapter.create()\n ```\n \n If you do not set it, ember-testing will default to `Ember.Test.QUnitAdapter`.\n \n @public\n @for Ember.Test\n @property adapter\n @type {Class} The adapter to be used.\n @default Ember.Test.QUnitAdapter\n */\n\n Object.defineProperty(Test, 'adapter', {\n get: _adapter.getAdapter,\n set: _adapter.setAdapter\n });\n var _default = Test;\n _exports.default = _default;\n});","define(\"ember-testing/lib/test/adapter\", [\"exports\", \"@ember/-internals/error-handling\"], function (_exports, _errorHandling) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.getAdapter = getAdapter;\n _exports.setAdapter = setAdapter;\n _exports.asyncStart = asyncStart;\n _exports.asyncEnd = asyncEnd;\n var adapter;\n\n function getAdapter() {\n return adapter;\n }\n\n function setAdapter(value) {\n adapter = value;\n\n if (value && typeof value.exception === 'function') {\n (0, _errorHandling.setDispatchOverride)(adapterDispatch);\n } else {\n (0, _errorHandling.setDispatchOverride)(null);\n }\n }\n\n function asyncStart() {\n if (adapter) {\n adapter.asyncStart();\n }\n }\n\n function asyncEnd() {\n if (adapter) {\n adapter.asyncEnd();\n }\n }\n\n function adapterDispatch(error) {\n adapter.exception(error);\n console.error(error.stack); // eslint-disable-line no-console\n }\n});","define(\"ember-testing/lib/test/helpers\", [\"exports\", \"ember-testing/lib/test/promise\"], function (_exports, _promise) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.registerHelper = registerHelper;\n _exports.registerAsyncHelper = registerAsyncHelper;\n _exports.unregisterHelper = unregisterHelper;\n _exports.helpers = void 0;\n var helpers = {};\n /**\n @module @ember/test\n */\n\n /**\n `registerHelper` is used to register a test helper that will be injected\n when `App.injectTestHelpers` is called.\n \n The helper method will always be called with the current Application as\n the first parameter.\n \n For example:\n \n ```javascript\n import { registerHelper } from '@ember/test';\n import { run } from '@ember/runloop';\n \n registerHelper('boot', function(app) {\n run(app, app.advanceReadiness);\n });\n ```\n \n This helper can later be called without arguments because it will be\n called with `app` as the first parameter.\n \n ```javascript\n import Application from '@ember/application';\n \n App = Application.create();\n App.injectTestHelpers();\n boot();\n ```\n \n @public\n @for @ember/test\n @static\n @method registerHelper\n @param {String} name The name of the helper method to add.\n @param {Function} helperMethod\n @param options {Object}\n */\n\n _exports.helpers = helpers;\n\n function registerHelper(name, helperMethod) {\n helpers[name] = {\n method: helperMethod,\n meta: {\n wait: false\n }\n };\n }\n /**\n `registerAsyncHelper` is used to register an async test helper that will be injected\n when `App.injectTestHelpers` is called.\n \n The helper method will always be called with the current Application as\n the first parameter.\n \n For example:\n \n ```javascript\n import { registerAsyncHelper } from '@ember/test';\n import { run } from '@ember/runloop';\n \n registerAsyncHelper('boot', function(app) {\n run(app, app.advanceReadiness);\n });\n ```\n \n The advantage of an async helper is that it will not run\n until the last async helper has completed. All async helpers\n after it will wait for it complete before running.\n \n \n For example:\n \n ```javascript\n import { registerAsyncHelper } from '@ember/test';\n \n registerAsyncHelper('deletePost', function(app, postId) {\n click('.delete-' + postId);\n });\n \n // ... in your test\n visit('/post/2');\n deletePost(2);\n visit('/post/3');\n deletePost(3);\n ```\n \n @public\n @for @ember/test\n @method registerAsyncHelper\n @param {String} name The name of the helper method to add.\n @param {Function} helperMethod\n @since 1.2.0\n */\n\n\n function registerAsyncHelper(name, helperMethod) {\n helpers[name] = {\n method: helperMethod,\n meta: {\n wait: true\n }\n };\n }\n /**\n Remove a previously added helper method.\n \n Example:\n \n ```javascript\n import { unregisterHelper } from '@ember/test';\n \n unregisterHelper('wait');\n ```\n \n @public\n @method unregisterHelper\n @static\n @for @ember/test\n @param {String} name The helper to remove.\n */\n\n\n function unregisterHelper(name) {\n delete helpers[name];\n delete _promise.default.prototype[name];\n }\n});","define(\"ember-testing/lib/test/on_inject_helpers\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.onInjectHelpers = onInjectHelpers;\n _exports.invokeInjectHelpersCallbacks = invokeInjectHelpersCallbacks;\n _exports.callbacks = void 0;\n var callbacks = [];\n /**\n Used to register callbacks to be fired whenever `App.injectTestHelpers`\n is called.\n \n The callback will receive the current application as an argument.\n \n Example:\n \n ```javascript\n import $ from 'jquery';\n \n Ember.Test.onInjectHelpers(function() {\n $(document).ajaxSend(function() {\n Test.pendingRequests++;\n });\n \n $(document).ajaxComplete(function() {\n Test.pendingRequests--;\n });\n });\n ```\n \n @public\n @for Ember.Test\n @method onInjectHelpers\n @param {Function} callback The function to be called.\n */\n\n _exports.callbacks = callbacks;\n\n function onInjectHelpers(callback) {\n callbacks.push(callback);\n }\n\n function invokeInjectHelpersCallbacks(app) {\n for (var i = 0; i < callbacks.length; i++) {\n callbacks[i](app);\n }\n }\n});","define(\"ember-testing/lib/test/pending_requests\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.pendingRequests = pendingRequests;\n _exports.clearPendingRequests = clearPendingRequests;\n _exports.incrementPendingRequests = incrementPendingRequests;\n _exports.decrementPendingRequests = decrementPendingRequests;\n var requests = [];\n\n function pendingRequests() {\n return requests.length;\n }\n\n function clearPendingRequests() {\n requests.length = 0;\n }\n\n function incrementPendingRequests(_, xhr) {\n requests.push(xhr);\n }\n\n function decrementPendingRequests(_, xhr) {\n setTimeout(function () {\n for (var i = 0; i < requests.length; i++) {\n if (xhr === requests[i]) {\n requests.splice(i, 1);\n break;\n }\n }\n }, 0);\n }\n});","define(\"ember-testing/lib/test/promise\", [\"exports\", \"@ember/-internals/runtime\", \"ember-testing/lib/test/run\"], function (_exports, _runtime, _run) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.promise = promise;\n _exports.resolve = resolve;\n _exports.getLastPromise = getLastPromise;\n _exports.default = void 0;\n var lastPromise;\n\n class TestPromise extends _runtime.RSVP.Promise {\n constructor() {\n super(...arguments);\n lastPromise = this;\n }\n\n then(_onFulfillment, ...args) {\n var onFulfillment = typeof _onFulfillment === 'function' ? result => isolate(_onFulfillment, result) : undefined;\n return super.then(onFulfillment, ...args);\n }\n\n }\n /**\n This returns a thenable tailored for testing. It catches failed\n `onSuccess` callbacks and invokes the `Ember.Test.adapter.exception`\n callback in the last chained then.\n \n This method should be returned by async helpers such as `wait`.\n \n @public\n @for Ember.Test\n @method promise\n @param {Function} resolver The function used to resolve the promise.\n @param {String} label An optional string for identifying the promise.\n */\n\n\n _exports.default = TestPromise;\n\n function promise(resolver, label) {\n var fullLabel = `Ember.Test.promise: ${label || ''}`;\n return new TestPromise(resolver, fullLabel);\n }\n /**\n Replacement for `Ember.RSVP.resolve`\n The only difference is this uses\n an instance of `Ember.Test.Promise`\n \n @public\n @for Ember.Test\n @method resolve\n @param {Mixed} The value to resolve\n @since 1.2.0\n */\n\n\n function resolve(result, label) {\n return TestPromise.resolve(result, label);\n }\n\n function getLastPromise() {\n return lastPromise;\n } // This method isolates nested async methods\n // so that they don't conflict with other last promises.\n //\n // 1. Set `Ember.Test.lastPromise` to null\n // 2. Invoke method\n // 3. Return the last promise created during method\n\n\n function isolate(onFulfillment, result) {\n // Reset lastPromise for nested helpers\n lastPromise = null;\n var value = onFulfillment(result);\n var promise = lastPromise;\n lastPromise = null; // If the method returned a promise\n // return that promise. If not,\n // return the last async helper's promise\n\n if (value && value instanceof TestPromise || !promise) {\n return value;\n } else {\n return (0, _run.default)(() => resolve(promise).then(() => value));\n }\n }\n});","define(\"ember-testing/lib/test/run\", [\"exports\", \"@ember/runloop\"], function (_exports, _runloop) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = run;\n\n function run(fn) {\n if (!(0, _runloop.getCurrentRunLoop)()) {\n return (0, _runloop.run)(fn);\n } else {\n return fn();\n }\n }\n});","define(\"ember-testing/lib/test/waiters\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.registerWaiter = registerWaiter;\n _exports.unregisterWaiter = unregisterWaiter;\n _exports.checkWaiters = checkWaiters;\n\n /**\n @module @ember/test\n */\n var contexts = [];\n var callbacks = [];\n /**\n This allows ember-testing to play nicely with other asynchronous\n events, such as an application that is waiting for a CSS3\n transition or an IndexDB transaction. The waiter runs periodically\n after each async helper (i.e. `click`, `andThen`, `visit`, etc) has executed,\n until the returning result is truthy. After the waiters finish, the next async helper\n is executed and the process repeats.\n \n For example:\n \n ```javascript\n import { registerWaiter } from '@ember/test';\n \n registerWaiter(function() {\n return myPendingTransactions() === 0;\n });\n ```\n The `context` argument allows you to optionally specify the `this`\n with which your callback will be invoked.\n \n For example:\n \n ```javascript\n import { registerWaiter } from '@ember/test';\n \n registerWaiter(MyDB, MyDB.hasPendingTransactions);\n ```\n \n @public\n @for @ember/test\n @static\n @method registerWaiter\n @param {Object} context (optional)\n @param {Function} callback\n @since 1.2.0\n */\n\n function registerWaiter(context, callback) {\n if (arguments.length === 1) {\n callback = context;\n context = null;\n }\n\n if (indexOf(context, callback) > -1) {\n return;\n }\n\n contexts.push(context);\n callbacks.push(callback);\n }\n /**\n `unregisterWaiter` is used to unregister a callback that was\n registered with `registerWaiter`.\n \n @public\n @for @ember/test\n @static\n @method unregisterWaiter\n @param {Object} context (optional)\n @param {Function} callback\n @since 1.2.0\n */\n\n\n function unregisterWaiter(context, callback) {\n if (!callbacks.length) {\n return;\n }\n\n if (arguments.length === 1) {\n callback = context;\n context = null;\n }\n\n var i = indexOf(context, callback);\n\n if (i === -1) {\n return;\n }\n\n contexts.splice(i, 1);\n callbacks.splice(i, 1);\n }\n /**\n Iterates through each registered test waiter, and invokes\n its callback. If any waiter returns false, this method will return\n true indicating that the waiters have not settled yet.\n \n This is generally used internally from the acceptance/integration test\n infrastructure.\n \n @public\n @for @ember/test\n @static\n @method checkWaiters\n */\n\n\n function checkWaiters() {\n if (!callbacks.length) {\n return false;\n }\n\n for (var i = 0; i < callbacks.length; i++) {\n var context = contexts[i];\n var callback = callbacks[i];\n\n if (!callback.call(context)) {\n return true;\n }\n }\n\n return false;\n }\n\n function indexOf(context, callback) {\n for (var i = 0; i < callbacks.length; i++) {\n if (callbacks[i] === callback && contexts[i] === context) {\n return i;\n }\n }\n\n return -1;\n }\n});","/* globals require, Ember, jQuery */\n(() => {\n if (typeof jQuery !== 'undefined') {\n let _Ember;\n\n if (typeof Ember !== 'undefined') {\n _Ember = Ember;\n } else {\n _Ember = require('ember').default;\n }\n\n let pendingRequests;\n\n if (Ember.__loader.registry['ember-testing/test/pending_requests']) {\n // Ember <= 3.1\n pendingRequests = Ember.__loader.require('ember-testing/test/pending_requests');\n } else if (Ember.__loader.registry['ember-testing/lib/test/pending_requests']) {\n // Ember >= 3.2\n pendingRequests = Ember.__loader.require('ember-testing/lib/test/pending_requests');\n }\n\n if (pendingRequests) {\n // This exists to ensure that the AJAX listeners setup by Ember itself\n // (which as of 2.17 are not properly torn down) get cleared and released\n // when the application is destroyed. Without this, any AJAX requests\n // that happen _between_ acceptance tests will always share\n // `pendingRequests`.\n _Ember.Application.reopen({\n willDestroy() {\n jQuery(document).off('ajaxSend', pendingRequests.incrementPendingRequests);\n jQuery(document).off('ajaxComplete', pendingRequests.decrementPendingRequests);\n pendingRequests.clearPendingRequests();\n\n this._super(...arguments);\n }\n\n });\n }\n }\n})();","/*!\n * QUnit 2.12.0\n * https://qunitjs.com/\n *\n * Copyright OpenJS Foundation and other contributors\n * Released under the MIT license\n * https://jquery.org/license\n *\n * Date: 2020-11-09T00:20Z\n */\n(function (global$1) {\n\t'use strict';\n\n\tfunction _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\n\tvar global__default = /*#__PURE__*/_interopDefaultLegacy(global$1);\n\n\tvar window$1 = global__default['default'].window;\n\tvar self$1 = global__default['default'].self;\n\tvar console = global__default['default'].console;\n\tvar setTimeout$1 = global__default['default'].setTimeout;\n\tvar clearTimeout = global__default['default'].clearTimeout;\n\tvar document$1 = window$1 && window$1.document;\n\tvar navigator = window$1 && window$1.navigator;\n\tvar localSessionStorage = function () {\n\t var x = \"qunit-test-string\";\n\n\t try {\n\t global__default['default'].sessionStorage.setItem(x, x);\n\t global__default['default'].sessionStorage.removeItem(x);\n\t return global__default['default'].sessionStorage;\n\t } catch (e) {\n\t return undefined;\n\t }\n\t}(); // Support IE 9-10: Fallback for fuzzysort.js used by /reporter/html.js\n\n\tif (!global__default['default'].Map) {\n\t global__default['default'].Map = function StringMap() {\n\t var store = Object.create(null);\n\n\t this.get = function (strKey) {\n\t return store[strKey];\n\t };\n\n\t this.set = function (strKey, val) {\n\t store[strKey] = val;\n\t return this;\n\t };\n\n\t this.clear = function () {\n\t store = Object.create(null);\n\t };\n\t };\n\t}\n\n\tfunction _typeof(obj) {\n\t \"@babel/helpers - typeof\";\n\n\t if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n\t _typeof = function (obj) {\n\t return typeof obj;\n\t };\n\t } else {\n\t _typeof = function (obj) {\n\t return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n\t };\n\t }\n\n\t return _typeof(obj);\n\t}\n\n\tfunction _classCallCheck(instance, Constructor) {\n\t if (!(instance instanceof Constructor)) {\n\t throw new TypeError(\"Cannot call a class as a function\");\n\t }\n\t}\n\n\tfunction _defineProperties(target, props) {\n\t for (var i = 0; i < props.length; i++) {\n\t var descriptor = props[i];\n\t descriptor.enumerable = descriptor.enumerable || false;\n\t descriptor.configurable = true;\n\t if (\"value\" in descriptor) descriptor.writable = true;\n\t Object.defineProperty(target, descriptor.key, descriptor);\n\t }\n\t}\n\n\tfunction _createClass(Constructor, protoProps, staticProps) {\n\t if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n\t if (staticProps) _defineProperties(Constructor, staticProps);\n\t return Constructor;\n\t}\n\n\tfunction _toConsumableArray(arr) {\n\t return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n\t}\n\n\tfunction _arrayWithoutHoles(arr) {\n\t if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n\t}\n\n\tfunction _iterableToArray(iter) {\n\t if (typeof Symbol !== \"undefined\" && Symbol.iterator in Object(iter)) return Array.from(iter);\n\t}\n\n\tfunction _unsupportedIterableToArray(o, minLen) {\n\t if (!o) return;\n\t if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n\t var n = Object.prototype.toString.call(o).slice(8, -1);\n\t if (n === \"Object\" && o.constructor) n = o.constructor.name;\n\t if (n === \"Map\" || n === \"Set\") return Array.from(o);\n\t if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n\t}\n\n\tfunction _arrayLikeToArray(arr, len) {\n\t if (len == null || len > arr.length) len = arr.length;\n\n\t for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n\t return arr2;\n\t}\n\n\tfunction _nonIterableSpread() {\n\t throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t}\n\n\tfunction _createForOfIteratorHelper(o, allowArrayLike) {\n\t var it;\n\n\t if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n\t if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n\t if (it) o = it;\n\t var i = 0;\n\n\t var F = function () {};\n\n\t return {\n\t s: F,\n\t n: function () {\n\t if (i >= o.length) return {\n\t done: true\n\t };\n\t return {\n\t done: false,\n\t value: o[i++]\n\t };\n\t },\n\t e: function (e) {\n\t throw e;\n\t },\n\t f: F\n\t };\n\t }\n\n\t throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n\t }\n\n\t var normalCompletion = true,\n\t didErr = false,\n\t err;\n\t return {\n\t s: function () {\n\t it = o[Symbol.iterator]();\n\t },\n\t n: function () {\n\t var step = it.next();\n\t normalCompletion = step.done;\n\t return step;\n\t },\n\t e: function (e) {\n\t didErr = true;\n\t err = e;\n\t },\n\t f: function () {\n\t try {\n\t if (!normalCompletion && it.return != null) it.return();\n\t } finally {\n\t if (didErr) throw err;\n\t }\n\t }\n\t };\n\t}\n\n\t// This allows support for IE 9, which doesn't have a console\n\t// object if the developer tools are not open.\n\n\tvar Logger = {\n\t warn: console ? console.warn.bind(console) : function () {}\n\t};\n\n\tvar toString = Object.prototype.toString;\n\tvar hasOwn = Object.prototype.hasOwnProperty;\n\tvar now = Date.now || function () {\n\t return new Date().getTime();\n\t};\n\tvar nativePerf = getNativePerf();\n\n\tfunction getNativePerf() {\n\t if (window$1 && typeof window$1.performance !== \"undefined\" && typeof window$1.performance.mark === \"function\" && typeof window$1.performance.measure === \"function\") {\n\t return window$1.performance;\n\t } else {\n\t return undefined;\n\t }\n\t}\n\n\tvar performance = {\n\t now: nativePerf ? nativePerf.now.bind(nativePerf) : now,\n\t measure: nativePerf ? function (comment, startMark, endMark) {\n\t // `performance.measure` may fail if the mark could not be found.\n\t // reasons a specific mark could not be found include: outside code invoking `performance.clearMarks()`\n\t try {\n\t nativePerf.measure(comment, startMark, endMark);\n\t } catch (ex) {\n\t Logger.warn(\"performance.measure could not be executed because of \", ex.message);\n\t }\n\t } : function () {},\n\t mark: nativePerf ? nativePerf.mark.bind(nativePerf) : function () {}\n\t}; // Returns a new Array with the elements that are in a but not in b\n\n\tfunction diff(a, b) {\n\t var i,\n\t j,\n\t result = a.slice();\n\n\t for (i = 0; i < result.length; i++) {\n\t for (j = 0; j < b.length; j++) {\n\t if (result[i] === b[j]) {\n\t result.splice(i, 1);\n\t i--;\n\t break;\n\t }\n\t }\n\t }\n\n\t return result;\n\t}\n\t/**\n\t * Determines whether an element exists in a given array or not.\n\t *\n\t * @method inArray\n\t * @param {Any} elem\n\t * @param {Array} array\n\t * @return {Boolean}\n\t */\n\n\tfunction inArray(elem, array) {\n\t return array.indexOf(elem) !== -1;\n\t}\n\t/**\n\t * Makes a clone of an object using only Array or Object as base,\n\t * and copies over the own enumerable properties.\n\t *\n\t * @param {Object} obj\n\t * @return {Object} New object with only the own properties (recursively).\n\t */\n\n\tfunction objectValues(obj) {\n\t var key,\n\t val,\n\t vals = is(\"array\", obj) ? [] : {};\n\n\t for (key in obj) {\n\t if (hasOwn.call(obj, key)) {\n\t val = obj[key];\n\t vals[key] = val === Object(val) ? objectValues(val) : val;\n\t }\n\t }\n\n\t return vals;\n\t}\n\tfunction extend(a, b, undefOnly) {\n\t for (var prop in b) {\n\t if (hasOwn.call(b, prop)) {\n\t if (b[prop] === undefined) {\n\t delete a[prop];\n\t } else if (!(undefOnly && typeof a[prop] !== \"undefined\")) {\n\t a[prop] = b[prop];\n\t }\n\t }\n\t }\n\n\t return a;\n\t}\n\tfunction objectType(obj) {\n\t if (typeof obj === \"undefined\") {\n\t return \"undefined\";\n\t } // Consider: typeof null === object\n\n\n\t if (obj === null) {\n\t return \"null\";\n\t }\n\n\t var match = toString.call(obj).match(/^\\[object\\s(.*)\\]$/),\n\t type = match && match[1];\n\n\t switch (type) {\n\t case \"Number\":\n\t if (isNaN(obj)) {\n\t return \"nan\";\n\t }\n\n\t return \"number\";\n\n\t case \"String\":\n\t case \"Boolean\":\n\t case \"Array\":\n\t case \"Set\":\n\t case \"Map\":\n\t case \"Date\":\n\t case \"RegExp\":\n\t case \"Function\":\n\t case \"Symbol\":\n\t return type.toLowerCase();\n\n\t default:\n\t return _typeof(obj);\n\t }\n\t} // Safe object type checking\n\n\tfunction is(type, obj) {\n\t return objectType(obj) === type;\n\t} // Based on Java's String.hashCode, a simple but not\n\t// rigorously collision resistant hashing function\n\n\tfunction generateHash(module, testName) {\n\t var str = module + \"\\x1C\" + testName;\n\t var hash = 0;\n\n\t for (var i = 0; i < str.length; i++) {\n\t hash = (hash << 5) - hash + str.charCodeAt(i);\n\t hash |= 0;\n\t } // Convert the possibly negative integer hash code into an 8 character hex string, which isn't\n\t // strictly necessary but increases user understanding that the id is a SHA-like hash\n\n\n\t var hex = (0x100000000 + hash).toString(16);\n\n\t if (hex.length < 8) {\n\t hex = \"0000000\" + hex;\n\t }\n\n\t return hex.slice(-8);\n\t}\n\n\t// Authors: Philippe Rathé , David Chan \n\n\tvar equiv = (function () {\n\t // Value pairs queued for comparison. Used for breadth-first processing order, recursion\n\t // detection and avoiding repeated comparison (see below for details).\n\t // Elements are { a: val, b: val }.\n\t var pairs = [];\n\n\t var getProto = Object.getPrototypeOf || function (obj) {\n\t return obj.__proto__;\n\t };\n\n\t function useStrictEquality(a, b) {\n\t // This only gets called if a and b are not strict equal, and is used to compare on\n\t // the primitive values inside object wrappers. For example:\n\t // `var i = 1;`\n\t // `var j = new Number(1);`\n\t // Neither a nor b can be null, as a !== b and they have the same type.\n\t if (_typeof(a) === \"object\") {\n\t a = a.valueOf();\n\t }\n\n\t if (_typeof(b) === \"object\") {\n\t b = b.valueOf();\n\t }\n\n\t return a === b;\n\t }\n\n\t function compareConstructors(a, b) {\n\t var protoA = getProto(a);\n\t var protoB = getProto(b); // Comparing constructors is more strict than using `instanceof`\n\n\t if (a.constructor === b.constructor) {\n\t return true;\n\t } // Ref #851\n\t // If the obj prototype descends from a null constructor, treat it\n\t // as a null prototype.\n\n\n\t if (protoA && protoA.constructor === null) {\n\t protoA = null;\n\t }\n\n\t if (protoB && protoB.constructor === null) {\n\t protoB = null;\n\t } // Allow objects with no prototype to be equivalent to\n\t // objects with Object as their constructor.\n\n\n\t if (protoA === null && protoB === Object.prototype || protoB === null && protoA === Object.prototype) {\n\t return true;\n\t }\n\n\t return false;\n\t }\n\n\t function getRegExpFlags(regexp) {\n\t return \"flags\" in regexp ? regexp.flags : regexp.toString().match(/[gimuy]*$/)[0];\n\t }\n\n\t function isContainer(val) {\n\t return [\"object\", \"array\", \"map\", \"set\"].indexOf(objectType(val)) !== -1;\n\t }\n\n\t function breadthFirstCompareChild(a, b) {\n\t // If a is a container not reference-equal to b, postpone the comparison to the\n\t // end of the pairs queue -- unless (a, b) has been seen before, in which case skip\n\t // over the pair.\n\t if (a === b) {\n\t return true;\n\t }\n\n\t if (!isContainer(a)) {\n\t return typeEquiv(a, b);\n\t }\n\n\t if (pairs.every(function (pair) {\n\t return pair.a !== a || pair.b !== b;\n\t })) {\n\t // Not yet started comparing this pair\n\t pairs.push({\n\t a: a,\n\t b: b\n\t });\n\t }\n\n\t return true;\n\t }\n\n\t var callbacks = {\n\t \"string\": useStrictEquality,\n\t \"boolean\": useStrictEquality,\n\t \"number\": useStrictEquality,\n\t \"null\": useStrictEquality,\n\t \"undefined\": useStrictEquality,\n\t \"symbol\": useStrictEquality,\n\t \"date\": useStrictEquality,\n\t \"nan\": function nan() {\n\t return true;\n\t },\n\t \"regexp\": function regexp(a, b) {\n\t return a.source === b.source && // Include flags in the comparison\n\t getRegExpFlags(a) === getRegExpFlags(b);\n\t },\n\t // abort (identical references / instance methods were skipped earlier)\n\t \"function\": function _function() {\n\t return false;\n\t },\n\t \"array\": function array(a, b) {\n\t var i, len;\n\t len = a.length;\n\n\t if (len !== b.length) {\n\t // Safe and faster\n\t return false;\n\t }\n\n\t for (i = 0; i < len; i++) {\n\t // Compare non-containers; queue non-reference-equal containers\n\t if (!breadthFirstCompareChild(a[i], b[i])) {\n\t return false;\n\t }\n\t }\n\n\t return true;\n\t },\n\t // Define sets a and b to be equivalent if for each element aVal in a, there\n\t // is some element bVal in b such that aVal and bVal are equivalent. Element\n\t // repetitions are not counted, so these are equivalent:\n\t // a = new Set( [ {}, [], [] ] );\n\t // b = new Set( [ {}, {}, [] ] );\n\t \"set\": function set(a, b) {\n\t var innerEq,\n\t outerEq = true;\n\n\t if (a.size !== b.size) {\n\t // This optimization has certain quirks because of the lack of\n\t // repetition counting. For instance, adding the same\n\t // (reference-identical) element to two equivalent sets can\n\t // make them non-equivalent.\n\t return false;\n\t }\n\n\t a.forEach(function (aVal) {\n\t // Short-circuit if the result is already known. (Using for...of\n\t // with a break clause would be cleaner here, but it would cause\n\t // a syntax error on older Javascript implementations even if\n\t // Set is unused)\n\t if (!outerEq) {\n\t return;\n\t }\n\n\t innerEq = false;\n\t b.forEach(function (bVal) {\n\t var parentPairs; // Likewise, short-circuit if the result is already known\n\n\t if (innerEq) {\n\t return;\n\t } // Swap out the global pairs list, as the nested call to\n\t // innerEquiv will clobber its contents\n\n\n\t parentPairs = pairs;\n\n\t if (innerEquiv(bVal, aVal)) {\n\t innerEq = true;\n\t } // Replace the global pairs list\n\n\n\t pairs = parentPairs;\n\t });\n\n\t if (!innerEq) {\n\t outerEq = false;\n\t }\n\t });\n\t return outerEq;\n\t },\n\t // Define maps a and b to be equivalent if for each key-value pair (aKey, aVal)\n\t // in a, there is some key-value pair (bKey, bVal) in b such that\n\t // [ aKey, aVal ] and [ bKey, bVal ] are equivalent. Key repetitions are not\n\t // counted, so these are equivalent:\n\t // a = new Map( [ [ {}, 1 ], [ {}, 1 ], [ [], 1 ] ] );\n\t // b = new Map( [ [ {}, 1 ], [ [], 1 ], [ [], 1 ] ] );\n\t \"map\": function map(a, b) {\n\t var innerEq,\n\t outerEq = true;\n\n\t if (a.size !== b.size) {\n\t // This optimization has certain quirks because of the lack of\n\t // repetition counting. For instance, adding the same\n\t // (reference-identical) key-value pair to two equivalent maps\n\t // can make them non-equivalent.\n\t return false;\n\t }\n\n\t a.forEach(function (aVal, aKey) {\n\t // Short-circuit if the result is already known. (Using for...of\n\t // with a break clause would be cleaner here, but it would cause\n\t // a syntax error on older Javascript implementations even if\n\t // Map is unused)\n\t if (!outerEq) {\n\t return;\n\t }\n\n\t innerEq = false;\n\t b.forEach(function (bVal, bKey) {\n\t var parentPairs; // Likewise, short-circuit if the result is already known\n\n\t if (innerEq) {\n\t return;\n\t } // Swap out the global pairs list, as the nested call to\n\t // innerEquiv will clobber its contents\n\n\n\t parentPairs = pairs;\n\n\t if (innerEquiv([bVal, bKey], [aVal, aKey])) {\n\t innerEq = true;\n\t } // Replace the global pairs list\n\n\n\t pairs = parentPairs;\n\t });\n\n\t if (!innerEq) {\n\t outerEq = false;\n\t }\n\t });\n\t return outerEq;\n\t },\n\t \"object\": function object(a, b) {\n\t var i,\n\t aProperties = [],\n\t bProperties = [];\n\n\t if (compareConstructors(a, b) === false) {\n\t return false;\n\t } // Be strict: don't ensure hasOwnProperty and go deep\n\n\n\t for (i in a) {\n\t // Collect a's properties\n\t aProperties.push(i); // Skip OOP methods that look the same\n\n\t if (a.constructor !== Object && typeof a.constructor !== \"undefined\" && typeof a[i] === \"function\" && typeof b[i] === \"function\" && a[i].toString() === b[i].toString()) {\n\t continue;\n\t } // Compare non-containers; queue non-reference-equal containers\n\n\n\t if (!breadthFirstCompareChild(a[i], b[i])) {\n\t return false;\n\t }\n\t }\n\n\t for (i in b) {\n\t // Collect b's properties\n\t bProperties.push(i);\n\t } // Ensures identical properties name\n\n\n\t return typeEquiv(aProperties.sort(), bProperties.sort());\n\t }\n\t };\n\n\t function typeEquiv(a, b) {\n\t var type = objectType(a); // Callbacks for containers will append to the pairs queue to achieve breadth-first\n\t // search order. The pairs queue is also used to avoid reprocessing any pair of\n\t // containers that are reference-equal to a previously visited pair (a special case\n\t // this being recursion detection).\n\t //\n\t // Because of this approach, once typeEquiv returns a false value, it should not be\n\t // called again without clearing the pair queue else it may wrongly report a visited\n\t // pair as being equivalent.\n\n\t return objectType(b) === type && callbacks[type](a, b);\n\t }\n\n\t function innerEquiv(a, b) {\n\t var i, pair; // We're done when there's nothing more to compare\n\n\t if (arguments.length < 2) {\n\t return true;\n\t } // Clear the global pair queue and add the top-level values being compared\n\n\n\t pairs = [{\n\t a: a,\n\t b: b\n\t }];\n\n\t for (i = 0; i < pairs.length; i++) {\n\t pair = pairs[i]; // Perform type-specific comparison on any pairs that are not strictly\n\t // equal. For container types, that comparison will postpone comparison\n\t // of any sub-container pair to the end of the pair queue. This gives\n\t // breadth-first search order. It also avoids the reprocessing of\n\t // reference-equal siblings, cousins etc, which can have a significant speed\n\t // impact when comparing a container of small objects each of which has a\n\t // reference to the same (singleton) large object.\n\n\t if (pair.a !== pair.b && !typeEquiv(pair.a, pair.b)) {\n\t return false;\n\t }\n\t } // ...across all consecutive argument pairs\n\n\n\t return arguments.length === 2 || innerEquiv.apply(this, [].slice.call(arguments, 1));\n\t }\n\n\t return function () {\n\t var result = innerEquiv.apply(void 0, arguments); // Release any retained objects\n\n\t pairs.length = 0;\n\t return result;\n\t };\n\t})();\n\n\t/**\n\t * Config object: Maintain internal state\n\t * Later exposed as QUnit.config\n\t * `config` initialized at top of scope\n\t */\n\n\tvar config = {\n\t // The queue of tests to run\n\t queue: [],\n\t // Block until document ready\n\t blocking: true,\n\t // By default, run previously failed tests first\n\t // very useful in combination with \"Hide passed tests\" checked\n\t reorder: true,\n\t // By default, modify document.title when suite is done\n\t altertitle: true,\n\t // HTML Reporter: collapse every test except the first failing test\n\t // If false, all failing tests will be expanded\n\t collapse: true,\n\t // By default, scroll to top of the page when suite is done\n\t scrolltop: true,\n\t // Depth up-to which object will be dumped\n\t maxDepth: 5,\n\t // When enabled, all tests must call expect()\n\t requireExpects: false,\n\t // Placeholder for user-configurable form-exposed URL parameters\n\t urlConfig: [],\n\t // Set of all modules.\n\t modules: [],\n\t // The first unnamed module\n\t currentModule: {\n\t name: \"\",\n\t tests: [],\n\t childModules: [],\n\t testsRun: 0,\n\t unskippedTestsRun: 0,\n\t hooks: {\n\t before: [],\n\t beforeEach: [],\n\t afterEach: [],\n\t after: []\n\t }\n\t },\n\t callbacks: {},\n\t // The storage module to use for reordering tests\n\t storage: localSessionStorage\n\t}; // take a predefined QUnit.config and extend the defaults\n\n\tvar globalConfig = window$1 && window$1.QUnit && window$1.QUnit.config; // only extend the global config if there is no QUnit overload\n\n\tif (window$1 && window$1.QUnit && !window$1.QUnit.version) {\n\t extend(config, globalConfig);\n\t} // Push a loose unnamed module to the modules collection\n\n\n\tconfig.modules.push(config.currentModule);\n\n\t// https://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html\n\n\tvar dump = (function () {\n\t function quote(str) {\n\t return \"\\\"\" + str.toString().replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, \"\\\\\\\"\") + \"\\\"\";\n\t }\n\n\t function literal(o) {\n\t return o + \"\";\n\t }\n\n\t function join(pre, arr, post) {\n\t var s = dump.separator(),\n\t base = dump.indent(),\n\t inner = dump.indent(1);\n\n\t if (arr.join) {\n\t arr = arr.join(\",\" + s + inner);\n\t }\n\n\t if (!arr) {\n\t return pre + post;\n\t }\n\n\t return [pre, inner + arr, base + post].join(s);\n\t }\n\n\t function array(arr, stack) {\n\t var i = arr.length,\n\t ret = new Array(i);\n\n\t if (dump.maxDepth && dump.depth > dump.maxDepth) {\n\t return \"[object Array]\";\n\t }\n\n\t this.up();\n\n\t while (i--) {\n\t ret[i] = this.parse(arr[i], undefined, stack);\n\t }\n\n\t this.down();\n\t return join(\"[\", ret, \"]\");\n\t }\n\n\t function isArray(obj) {\n\t return (//Native Arrays\n\t toString.call(obj) === \"[object Array]\" || // NodeList objects\n\t typeof obj.length === \"number\" && obj.item !== undefined && (obj.length ? obj.item(0) === obj[0] : obj.item(0) === null && obj[0] === undefined)\n\t );\n\t }\n\n\t var reName = /^function (\\w+)/,\n\t dump = {\n\t // The objType is used mostly internally, you can fix a (custom) type in advance\n\t parse: function parse(obj, objType, stack) {\n\t stack = stack || [];\n\t var res,\n\t parser,\n\t parserType,\n\t objIndex = stack.indexOf(obj);\n\n\t if (objIndex !== -1) {\n\t return \"recursion(\".concat(objIndex - stack.length, \")\");\n\t }\n\n\t objType = objType || this.typeOf(obj);\n\t parser = this.parsers[objType];\n\t parserType = _typeof(parser);\n\n\t if (parserType === \"function\") {\n\t stack.push(obj);\n\t res = parser.call(this, obj, stack);\n\t stack.pop();\n\t return res;\n\t }\n\n\t return parserType === \"string\" ? parser : this.parsers.error;\n\t },\n\t typeOf: function typeOf(obj) {\n\t var type;\n\n\t if (obj === null) {\n\t type = \"null\";\n\t } else if (typeof obj === \"undefined\") {\n\t type = \"undefined\";\n\t } else if (is(\"regexp\", obj)) {\n\t type = \"regexp\";\n\t } else if (is(\"date\", obj)) {\n\t type = \"date\";\n\t } else if (is(\"function\", obj)) {\n\t type = \"function\";\n\t } else if (obj.setInterval !== undefined && obj.document !== undefined && obj.nodeType === undefined) {\n\t type = \"window\";\n\t } else if (obj.nodeType === 9) {\n\t type = \"document\";\n\t } else if (obj.nodeType) {\n\t type = \"node\";\n\t } else if (isArray(obj)) {\n\t type = \"array\";\n\t } else if (obj.constructor === Error.prototype.constructor) {\n\t type = \"error\";\n\t } else {\n\t type = _typeof(obj);\n\t }\n\n\t return type;\n\t },\n\t separator: function separator() {\n\t if (this.multiline) {\n\t return this.HTML ? \"
      \" : \"\\n\";\n\t } else {\n\t return this.HTML ? \" \" : \" \";\n\t }\n\t },\n\t // Extra can be a number, shortcut for increasing-calling-decreasing\n\t indent: function indent(extra) {\n\t if (!this.multiline) {\n\t return \"\";\n\t }\n\n\t var chr = this.indentChar;\n\n\t if (this.HTML) {\n\t chr = chr.replace(/\\t/g, \" \").replace(/ /g, \" \");\n\t }\n\n\t return new Array(this.depth + (extra || 0)).join(chr);\n\t },\n\t up: function up(a) {\n\t this.depth += a || 1;\n\t },\n\t down: function down(a) {\n\t this.depth -= a || 1;\n\t },\n\t setParser: function setParser(name, parser) {\n\t this.parsers[name] = parser;\n\t },\n\t // The next 3 are exposed so you can use them\n\t quote: quote,\n\t literal: literal,\n\t join: join,\n\t depth: 1,\n\t maxDepth: config.maxDepth,\n\t // This is the list of parsers, to modify them, use dump.setParser\n\t parsers: {\n\t window: \"[Window]\",\n\t document: \"[Document]\",\n\t error: function error(_error) {\n\t return \"Error(\\\"\" + _error.message + \"\\\")\";\n\t },\n\t unknown: \"[Unknown]\",\n\t \"null\": \"null\",\n\t \"undefined\": \"undefined\",\n\t \"function\": function _function(fn) {\n\t var ret = \"function\",\n\t // Functions never have name in IE\n\t name = \"name\" in fn ? fn.name : (reName.exec(fn) || [])[1];\n\n\t if (name) {\n\t ret += \" \" + name;\n\t }\n\n\t ret += \"(\";\n\t ret = [ret, dump.parse(fn, \"functionArgs\"), \"){\"].join(\"\");\n\t return join(ret, dump.parse(fn, \"functionCode\"), \"}\");\n\t },\n\t array: array,\n\t nodelist: array,\n\t \"arguments\": array,\n\t object: function object(map, stack) {\n\t var keys,\n\t key,\n\t val,\n\t i,\n\t nonEnumerableProperties,\n\t ret = [];\n\n\t if (dump.maxDepth && dump.depth > dump.maxDepth) {\n\t return \"[object Object]\";\n\t }\n\n\t dump.up();\n\t keys = [];\n\n\t for (key in map) {\n\t keys.push(key);\n\t } // Some properties are not always enumerable on Error objects.\n\n\n\t nonEnumerableProperties = [\"message\", \"name\"];\n\n\t for (i in nonEnumerableProperties) {\n\t key = nonEnumerableProperties[i];\n\n\t if (key in map && !inArray(key, keys)) {\n\t keys.push(key);\n\t }\n\t }\n\n\t keys.sort();\n\n\t for (i = 0; i < keys.length; i++) {\n\t key = keys[i];\n\t val = map[key];\n\t ret.push(dump.parse(key, \"key\") + \": \" + dump.parse(val, undefined, stack));\n\t }\n\n\t dump.down();\n\t return join(\"{\", ret, \"}\");\n\t },\n\t node: function node(_node) {\n\t var len,\n\t i,\n\t val,\n\t open = dump.HTML ? \"<\" : \"<\",\n\t close = dump.HTML ? \">\" : \">\",\n\t tag = _node.nodeName.toLowerCase(),\n\t ret = open + tag,\n\t attrs = _node.attributes;\n\n\t if (attrs) {\n\t for (i = 0, len = attrs.length; i < len; i++) {\n\t val = attrs[i].nodeValue; // IE6 includes all attributes in .attributes, even ones not explicitly\n\t // set. Those have values like undefined, null, 0, false, \"\" or\n\t // \"inherit\".\n\n\t if (val && val !== \"inherit\") {\n\t ret += \" \" + attrs[i].nodeName + \"=\" + dump.parse(val, \"attribute\");\n\t }\n\t }\n\t }\n\n\t ret += close; // Show content of TextNode or CDATASection\n\n\t if (_node.nodeType === 3 || _node.nodeType === 4) {\n\t ret += _node.nodeValue;\n\t }\n\n\t return ret + open + \"/\" + tag + close;\n\t },\n\t // Function calls it internally, it's the arguments part of the function\n\t functionArgs: function functionArgs(fn) {\n\t var args,\n\t l = fn.length;\n\n\t if (!l) {\n\t return \"\";\n\t }\n\n\t args = new Array(l);\n\n\t while (l--) {\n\t // 97 is 'a'\n\t args[l] = String.fromCharCode(97 + l);\n\t }\n\n\t return \" \" + args.join(\", \") + \" \";\n\t },\n\t // Object calls it internally, the key part of an item in a map\n\t key: quote,\n\t // Function calls it internally, it's the content of the function\n\t functionCode: \"[code]\",\n\t // Node calls it internally, it's a html attribute value\n\t attribute: quote,\n\t string: quote,\n\t date: quote,\n\t regexp: literal,\n\t number: literal,\n\t \"boolean\": literal,\n\t symbol: function symbol(sym) {\n\t return sym.toString();\n\t }\n\t },\n\t // If true, entities are escaped ( <, >, \\t, space and \\n )\n\t HTML: false,\n\t // Indentation unit\n\t indentChar: \" \",\n\t // If true, items in a collection, are separated by a \\n, else just a space.\n\t multiline: true\n\t };\n\t return dump;\n\t})();\n\n\tvar SuiteReport = /*#__PURE__*/function () {\n\t function SuiteReport(name, parentSuite) {\n\t _classCallCheck(this, SuiteReport);\n\n\t this.name = name;\n\t this.fullName = parentSuite ? parentSuite.fullName.concat(name) : [];\n\t this.tests = [];\n\t this.childSuites = [];\n\n\t if (parentSuite) {\n\t parentSuite.pushChildSuite(this);\n\t }\n\t }\n\n\t _createClass(SuiteReport, [{\n\t key: \"start\",\n\t value: function start(recordTime) {\n\t if (recordTime) {\n\t this._startTime = performance.now();\n\t var suiteLevel = this.fullName.length;\n\t performance.mark(\"qunit_suite_\".concat(suiteLevel, \"_start\"));\n\t }\n\n\t return {\n\t name: this.name,\n\t fullName: this.fullName.slice(),\n\t tests: this.tests.map(function (test) {\n\t return test.start();\n\t }),\n\t childSuites: this.childSuites.map(function (suite) {\n\t return suite.start();\n\t }),\n\t testCounts: {\n\t total: this.getTestCounts().total\n\t }\n\t };\n\t }\n\t }, {\n\t key: \"end\",\n\t value: function end(recordTime) {\n\t if (recordTime) {\n\t this._endTime = performance.now();\n\t var suiteLevel = this.fullName.length;\n\t var suiteName = this.fullName.join(\" – \");\n\t performance.mark(\"qunit_suite_\".concat(suiteLevel, \"_end\"));\n\t performance.measure(suiteLevel === 0 ? \"QUnit Test Run\" : \"QUnit Test Suite: \".concat(suiteName), \"qunit_suite_\".concat(suiteLevel, \"_start\"), \"qunit_suite_\".concat(suiteLevel, \"_end\"));\n\t }\n\n\t return {\n\t name: this.name,\n\t fullName: this.fullName.slice(),\n\t tests: this.tests.map(function (test) {\n\t return test.end();\n\t }),\n\t childSuites: this.childSuites.map(function (suite) {\n\t return suite.end();\n\t }),\n\t testCounts: this.getTestCounts(),\n\t runtime: this.getRuntime(),\n\t status: this.getStatus()\n\t };\n\t }\n\t }, {\n\t key: \"pushChildSuite\",\n\t value: function pushChildSuite(suite) {\n\t this.childSuites.push(suite);\n\t }\n\t }, {\n\t key: \"pushTest\",\n\t value: function pushTest(test) {\n\t this.tests.push(test);\n\t }\n\t }, {\n\t key: \"getRuntime\",\n\t value: function getRuntime() {\n\t return this._endTime - this._startTime;\n\t }\n\t }, {\n\t key: \"getTestCounts\",\n\t value: function getTestCounts() {\n\t var counts = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {\n\t passed: 0,\n\t failed: 0,\n\t skipped: 0,\n\t todo: 0,\n\t total: 0\n\t };\n\t counts = this.tests.reduce(function (counts, test) {\n\t if (test.valid) {\n\t counts[test.getStatus()]++;\n\t counts.total++;\n\t }\n\n\t return counts;\n\t }, counts);\n\t return this.childSuites.reduce(function (counts, suite) {\n\t return suite.getTestCounts(counts);\n\t }, counts);\n\t }\n\t }, {\n\t key: \"getStatus\",\n\t value: function getStatus() {\n\t var _this$getTestCounts = this.getTestCounts(),\n\t total = _this$getTestCounts.total,\n\t failed = _this$getTestCounts.failed,\n\t skipped = _this$getTestCounts.skipped,\n\t todo = _this$getTestCounts.todo;\n\n\t if (failed) {\n\t return \"failed\";\n\t } else {\n\t if (skipped === total) {\n\t return \"skipped\";\n\t } else if (todo === total) {\n\t return \"todo\";\n\t } else {\n\t return \"passed\";\n\t }\n\t }\n\t }\n\t }]);\n\n\t return SuiteReport;\n\t}();\n\n\tvar focused = false;\n\tvar moduleStack = [];\n\n\tfunction isParentModuleInQueue() {\n\t var modulesInQueue = config.modules.map(function (module) {\n\t return module.moduleId;\n\t });\n\t return moduleStack.some(function (module) {\n\t return modulesInQueue.includes(module.moduleId);\n\t });\n\t}\n\n\tfunction createModule(name, testEnvironment, modifiers) {\n\t var parentModule = moduleStack.length ? moduleStack.slice(-1)[0] : null;\n\t var moduleName = parentModule !== null ? [parentModule.name, name].join(\" > \") : name;\n\t var parentSuite = parentModule ? parentModule.suiteReport : globalSuite;\n\t var skip = parentModule !== null && parentModule.skip || modifiers.skip;\n\t var todo = parentModule !== null && parentModule.todo || modifiers.todo;\n\t var module = {\n\t name: moduleName,\n\t parentModule: parentModule,\n\t tests: [],\n\t moduleId: generateHash(moduleName),\n\t testsRun: 0,\n\t unskippedTestsRun: 0,\n\t childModules: [],\n\t suiteReport: new SuiteReport(name, parentSuite),\n\t // Pass along `skip` and `todo` properties from parent module, in case\n\t // there is one, to childs. And use own otherwise.\n\t // This property will be used to mark own tests and tests of child suites\n\t // as either `skipped` or `todo`.\n\t skip: skip,\n\t todo: skip ? false : todo\n\t };\n\t var env = {};\n\n\t if (parentModule) {\n\t parentModule.childModules.push(module);\n\t extend(env, parentModule.testEnvironment);\n\t }\n\n\t extend(env, testEnvironment);\n\t module.testEnvironment = env;\n\t config.modules.push(module);\n\t return module;\n\t}\n\n\tfunction processModule(name, options, executeNow) {\n\t var modifiers = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n\t if (objectType(options) === \"function\") {\n\t executeNow = options;\n\t options = undefined;\n\t }\n\n\t var module = createModule(name, options, modifiers); // Move any hooks to a 'hooks' object\n\n\t var testEnvironment = module.testEnvironment;\n\t var hooks = module.hooks = {};\n\t setHookFromEnvironment(hooks, testEnvironment, \"before\");\n\t setHookFromEnvironment(hooks, testEnvironment, \"beforeEach\");\n\t setHookFromEnvironment(hooks, testEnvironment, \"afterEach\");\n\t setHookFromEnvironment(hooks, testEnvironment, \"after\");\n\t var moduleFns = {\n\t before: setHookFunction(module, \"before\"),\n\t beforeEach: setHookFunction(module, \"beforeEach\"),\n\t afterEach: setHookFunction(module, \"afterEach\"),\n\t after: setHookFunction(module, \"after\")\n\t };\n\t var currentModule = config.currentModule;\n\n\t if (objectType(executeNow) === \"function\") {\n\t moduleStack.push(module);\n\t config.currentModule = module;\n\t executeNow.call(module.testEnvironment, moduleFns);\n\t moduleStack.pop();\n\t module = module.parentModule || currentModule;\n\t }\n\n\t config.currentModule = module;\n\n\t function setHookFromEnvironment(hooks, environment, name) {\n\t var potentialHook = environment[name];\n\t hooks[name] = typeof potentialHook === \"function\" ? [potentialHook] : [];\n\t delete environment[name];\n\t }\n\n\t function setHookFunction(module, hookName) {\n\t return function setHook(callback) {\n\t module.hooks[hookName].push(callback);\n\t };\n\t }\n\t}\n\n\tfunction module$1(name, options, executeNow) {\n\t if (focused && !isParentModuleInQueue()) {\n\t return;\n\t }\n\n\t processModule(name, options, executeNow);\n\t}\n\n\tmodule$1.only = function () {\n\t if (!focused) {\n\t config.modules.length = 0;\n\t config.queue.length = 0;\n\t }\n\n\t processModule.apply(void 0, arguments);\n\t focused = true;\n\t};\n\n\tmodule$1.skip = function (name, options, executeNow) {\n\t if (focused) {\n\t return;\n\t }\n\n\t processModule(name, options, executeNow, {\n\t skip: true\n\t });\n\t};\n\n\tmodule$1.todo = function (name, options, executeNow) {\n\t if (focused) {\n\t return;\n\t }\n\n\t processModule(name, options, executeNow, {\n\t todo: true\n\t });\n\t};\n\n\tvar LISTENERS = Object.create(null);\n\tvar SUPPORTED_EVENTS = [\"runStart\", \"suiteStart\", \"testStart\", \"assertion\", \"testEnd\", \"suiteEnd\", \"runEnd\"];\n\t/**\n\t * Emits an event with the specified data to all currently registered listeners.\n\t * Callbacks will fire in the order in which they are registered (FIFO). This\n\t * function is not exposed publicly; it is used by QUnit internals to emit\n\t * logging events.\n\t *\n\t * @private\n\t * @method emit\n\t * @param {String} eventName\n\t * @param {Object} data\n\t * @return {Void}\n\t */\n\n\tfunction emit(eventName, data) {\n\t if (objectType(eventName) !== \"string\") {\n\t throw new TypeError(\"eventName must be a string when emitting an event\");\n\t } // Clone the callbacks in case one of them registers a new callback\n\n\n\t var originalCallbacks = LISTENERS[eventName];\n\t var callbacks = originalCallbacks ? _toConsumableArray(originalCallbacks) : [];\n\n\t for (var i = 0; i < callbacks.length; i++) {\n\t callbacks[i](data);\n\t }\n\t}\n\t/**\n\t * Registers a callback as a listener to the specified event.\n\t *\n\t * @public\n\t * @method on\n\t * @param {String} eventName\n\t * @param {Function} callback\n\t * @return {Void}\n\t */\n\n\tfunction on(eventName, callback) {\n\t if (objectType(eventName) !== \"string\") {\n\t throw new TypeError(\"eventName must be a string when registering a listener\");\n\t } else if (!inArray(eventName, SUPPORTED_EVENTS)) {\n\t var events = SUPPORTED_EVENTS.join(\", \");\n\t throw new Error(\"\\\"\".concat(eventName, \"\\\" is not a valid event; must be one of: \").concat(events, \".\"));\n\t } else if (objectType(callback) !== \"function\") {\n\t throw new TypeError(\"callback must be a function when registering a listener\");\n\t }\n\n\t if (!LISTENERS[eventName]) {\n\t LISTENERS[eventName] = [];\n\t } // Don't register the same callback more than once\n\n\n\t if (!inArray(callback, LISTENERS[eventName])) {\n\t LISTENERS[eventName].push(callback);\n\t }\n\t}\n\n\tvar commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};\n\n\tfunction createCommonjsModule(fn, basedir, module) {\n\t\treturn module = {\n\t\t path: basedir,\n\t\t exports: {},\n\t\t require: function (path, base) {\n\t return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);\n\t }\n\t\t}, fn(module, module.exports), module.exports;\n\t}\n\n\tfunction commonjsRequire () {\n\t\tthrow new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');\n\t}\n\n\tvar es6Promise = createCommonjsModule(function (module, exports) {\n\t /*!\n\t * @overview es6-promise - a tiny implementation of Promises/A+.\n\t * @copyright Copyright (c) 2014 Yehuda Katz, Tom Dale, Stefan Penner and contributors (Conversion to ES6 API by Jake Archibald)\n\t * @license Licensed under MIT license\n\t * See https://raw.githubusercontent.com/stefanpenner/es6-promise/master/LICENSE\n\t * @version v4.2.8+1e68dce6\n\t */\n\t (function (global, factory) {\n\t module.exports = factory() ;\n\t })(commonjsGlobal, function () {\n\n\t function objectOrFunction(x) {\n\t var type = typeof x;\n\t return x !== null && (type === 'object' || type === 'function');\n\t }\n\n\t function isFunction(x) {\n\t return typeof x === 'function';\n\t }\n\n\t var _isArray = void 0;\n\n\t if (Array.isArray) {\n\t _isArray = Array.isArray;\n\t } else {\n\t _isArray = function (x) {\n\t return Object.prototype.toString.call(x) === '[object Array]';\n\t };\n\t }\n\n\t var isArray = _isArray;\n\t var len = 0;\n\t var vertxNext = void 0;\n\t var customSchedulerFn = void 0;\n\n\t var asap = function asap(callback, arg) {\n\t queue[len] = callback;\n\t queue[len + 1] = arg;\n\t len += 2;\n\n\t if (len === 2) {\n\t // If len is 2, that means that we need to schedule an async flush.\n\t // If additional callbacks are queued before the queue is flushed, they\n\t // will be processed by this flush that we are scheduling.\n\t if (customSchedulerFn) {\n\t customSchedulerFn(flush);\n\t } else {\n\t scheduleFlush();\n\t }\n\t }\n\t };\n\n\t function setScheduler(scheduleFn) {\n\t customSchedulerFn = scheduleFn;\n\t }\n\n\t function setAsap(asapFn) {\n\t asap = asapFn;\n\t }\n\n\t var browserWindow = typeof window !== 'undefined' ? window : undefined;\n\t var browserGlobal = browserWindow || {};\n\t var BrowserMutationObserver = browserGlobal.MutationObserver || browserGlobal.WebKitMutationObserver;\n\t var isNode = typeof self === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; // test for web worker but not in IE10\n\n\t var isWorker = typeof Uint8ClampedArray !== 'undefined' && typeof importScripts !== 'undefined' && typeof MessageChannel !== 'undefined'; // node\n\n\t function useNextTick() {\n\t // node version 0.10.x displays a deprecation warning when nextTick is used recursively\n\t // see https://github.com/cujojs/when/issues/410 for details\n\t return function () {\n\t return process.nextTick(flush);\n\t };\n\t } // vertx\n\n\n\t function useVertxTimer() {\n\t if (typeof vertxNext !== 'undefined') {\n\t return function () {\n\t vertxNext(flush);\n\t };\n\t }\n\n\t return useSetTimeout();\n\t }\n\n\t function useMutationObserver() {\n\t var iterations = 0;\n\t var observer = new BrowserMutationObserver(flush);\n\t var node = document.createTextNode('');\n\t observer.observe(node, {\n\t characterData: true\n\t });\n\t return function () {\n\t node.data = iterations = ++iterations % 2;\n\t };\n\t } // web worker\n\n\n\t function useMessageChannel() {\n\t var channel = new MessageChannel();\n\t channel.port1.onmessage = flush;\n\t return function () {\n\t return channel.port2.postMessage(0);\n\t };\n\t }\n\n\t function useSetTimeout() {\n\t // Store setTimeout reference so es6-promise will be unaffected by\n\t // other code modifying setTimeout (like sinon.useFakeTimers())\n\t var globalSetTimeout = setTimeout;\n\t return function () {\n\t return globalSetTimeout(flush, 1);\n\t };\n\t }\n\n\t var queue = new Array(1000);\n\n\t function flush() {\n\t for (var i = 0; i < len; i += 2) {\n\t var callback = queue[i];\n\t var arg = queue[i + 1];\n\t callback(arg);\n\t queue[i] = undefined;\n\t queue[i + 1] = undefined;\n\t }\n\n\t len = 0;\n\t }\n\n\t function attemptVertx() {\n\t try {\n\t var vertx = Function('return this')().require('vertx');\n\n\t vertxNext = vertx.runOnLoop || vertx.runOnContext;\n\t return useVertxTimer();\n\t } catch (e) {\n\t return useSetTimeout();\n\t }\n\t }\n\n\t var scheduleFlush = void 0; // Decide what async method to use to triggering processing of queued callbacks:\n\n\t if (isNode) {\n\t scheduleFlush = useNextTick();\n\t } else if (BrowserMutationObserver) {\n\t scheduleFlush = useMutationObserver();\n\t } else if (isWorker) {\n\t scheduleFlush = useMessageChannel();\n\t } else if (browserWindow === undefined && typeof commonjsRequire === 'function') {\n\t scheduleFlush = attemptVertx();\n\t } else {\n\t scheduleFlush = useSetTimeout();\n\t }\n\n\t function then(onFulfillment, onRejection) {\n\t var parent = this;\n\t var child = new this.constructor(noop);\n\n\t if (child[PROMISE_ID] === undefined) {\n\t makePromise(child);\n\t }\n\n\t var _state = parent._state;\n\n\t if (_state) {\n\t var callback = arguments[_state - 1];\n\t asap(function () {\n\t return invokeCallback(_state, child, callback, parent._result);\n\t });\n\t } else {\n\t subscribe(parent, child, onFulfillment, onRejection);\n\t }\n\n\t return child;\n\t }\n\t /**\n\t `Promise.resolve` returns a promise that will become resolved with the\n\t passed `value`. It is shorthand for the following:\n\t \n\t ```javascript\n\t let promise = new Promise(function(resolve, reject){\n\t resolve(1);\n\t });\n\t \n\t promise.then(function(value){\n\t // value === 1\n\t });\n\t ```\n\t \n\t Instead of writing the above, your code now simply becomes the following:\n\t \n\t ```javascript\n\t let promise = Promise.resolve(1);\n\t \n\t promise.then(function(value){\n\t // value === 1\n\t });\n\t ```\n\t \n\t @method resolve\n\t @static\n\t @param {Any} value value that the returned promise will be resolved with\n\t Useful for tooling.\n\t @return {Promise} a promise that will become fulfilled with the given\n\t `value`\n\t */\n\n\n\t function resolve$1(object) {\n\t /*jshint validthis:true */\n\t var Constructor = this;\n\n\t if (object && typeof object === 'object' && object.constructor === Constructor) {\n\t return object;\n\t }\n\n\t var promise = new Constructor(noop);\n\t resolve(promise, object);\n\t return promise;\n\t }\n\n\t var PROMISE_ID = Math.random().toString(36).substring(2);\n\n\t function noop() {}\n\n\t var PENDING = void 0;\n\t var FULFILLED = 1;\n\t var REJECTED = 2;\n\n\t function selfFulfillment() {\n\t return new TypeError(\"You cannot resolve a promise with itself\");\n\t }\n\n\t function cannotReturnOwn() {\n\t return new TypeError('A promises callback cannot return that same promise.');\n\t }\n\n\t function tryThen(then$$1, value, fulfillmentHandler, rejectionHandler) {\n\t try {\n\t then$$1.call(value, fulfillmentHandler, rejectionHandler);\n\t } catch (e) {\n\t return e;\n\t }\n\t }\n\n\t function handleForeignThenable(promise, thenable, then$$1) {\n\t asap(function (promise) {\n\t var sealed = false;\n\t var error = tryThen(then$$1, thenable, function (value) {\n\t if (sealed) {\n\t return;\n\t }\n\n\t sealed = true;\n\n\t if (thenable !== value) {\n\t resolve(promise, value);\n\t } else {\n\t fulfill(promise, value);\n\t }\n\t }, function (reason) {\n\t if (sealed) {\n\t return;\n\t }\n\n\t sealed = true;\n\t reject(promise, reason);\n\t }, 'Settle: ' + (promise._label || ' unknown promise'));\n\n\t if (!sealed && error) {\n\t sealed = true;\n\t reject(promise, error);\n\t }\n\t }, promise);\n\t }\n\n\t function handleOwnThenable(promise, thenable) {\n\t if (thenable._state === FULFILLED) {\n\t fulfill(promise, thenable._result);\n\t } else if (thenable._state === REJECTED) {\n\t reject(promise, thenable._result);\n\t } else {\n\t subscribe(thenable, undefined, function (value) {\n\t return resolve(promise, value);\n\t }, function (reason) {\n\t return reject(promise, reason);\n\t });\n\t }\n\t }\n\n\t function handleMaybeThenable(promise, maybeThenable, then$$1) {\n\t if (maybeThenable.constructor === promise.constructor && then$$1 === then && maybeThenable.constructor.resolve === resolve$1) {\n\t handleOwnThenable(promise, maybeThenable);\n\t } else {\n\t if (then$$1 === undefined) {\n\t fulfill(promise, maybeThenable);\n\t } else if (isFunction(then$$1)) {\n\t handleForeignThenable(promise, maybeThenable, then$$1);\n\t } else {\n\t fulfill(promise, maybeThenable);\n\t }\n\t }\n\t }\n\n\t function resolve(promise, value) {\n\t if (promise === value) {\n\t reject(promise, selfFulfillment());\n\t } else if (objectOrFunction(value)) {\n\t var then$$1 = void 0;\n\n\t try {\n\t then$$1 = value.then;\n\t } catch (error) {\n\t reject(promise, error);\n\t return;\n\t }\n\n\t handleMaybeThenable(promise, value, then$$1);\n\t } else {\n\t fulfill(promise, value);\n\t }\n\t }\n\n\t function publishRejection(promise) {\n\t if (promise._onerror) {\n\t promise._onerror(promise._result);\n\t }\n\n\t publish(promise);\n\t }\n\n\t function fulfill(promise, value) {\n\t if (promise._state !== PENDING) {\n\t return;\n\t }\n\n\t promise._result = value;\n\t promise._state = FULFILLED;\n\n\t if (promise._subscribers.length !== 0) {\n\t asap(publish, promise);\n\t }\n\t }\n\n\t function reject(promise, reason) {\n\t if (promise._state !== PENDING) {\n\t return;\n\t }\n\n\t promise._state = REJECTED;\n\t promise._result = reason;\n\t asap(publishRejection, promise);\n\t }\n\n\t function subscribe(parent, child, onFulfillment, onRejection) {\n\t var _subscribers = parent._subscribers;\n\t var length = _subscribers.length;\n\t parent._onerror = null;\n\t _subscribers[length] = child;\n\t _subscribers[length + FULFILLED] = onFulfillment;\n\t _subscribers[length + REJECTED] = onRejection;\n\n\t if (length === 0 && parent._state) {\n\t asap(publish, parent);\n\t }\n\t }\n\n\t function publish(promise) {\n\t var subscribers = promise._subscribers;\n\t var settled = promise._state;\n\n\t if (subscribers.length === 0) {\n\t return;\n\t }\n\n\t var child = void 0,\n\t callback = void 0,\n\t detail = promise._result;\n\n\t for (var i = 0; i < subscribers.length; i += 3) {\n\t child = subscribers[i];\n\t callback = subscribers[i + settled];\n\n\t if (child) {\n\t invokeCallback(settled, child, callback, detail);\n\t } else {\n\t callback(detail);\n\t }\n\t }\n\n\t promise._subscribers.length = 0;\n\t }\n\n\t function invokeCallback(settled, promise, callback, detail) {\n\t var hasCallback = isFunction(callback),\n\t value = void 0,\n\t error = void 0,\n\t succeeded = true;\n\n\t if (hasCallback) {\n\t try {\n\t value = callback(detail);\n\t } catch (e) {\n\t succeeded = false;\n\t error = e;\n\t }\n\n\t if (promise === value) {\n\t reject(promise, cannotReturnOwn());\n\t return;\n\t }\n\t } else {\n\t value = detail;\n\t }\n\n\t if (promise._state !== PENDING) ; else if (hasCallback && succeeded) {\n\t resolve(promise, value);\n\t } else if (succeeded === false) {\n\t reject(promise, error);\n\t } else if (settled === FULFILLED) {\n\t fulfill(promise, value);\n\t } else if (settled === REJECTED) {\n\t reject(promise, value);\n\t }\n\t }\n\n\t function initializePromise(promise, resolver) {\n\t try {\n\t resolver(function resolvePromise(value) {\n\t resolve(promise, value);\n\t }, function rejectPromise(reason) {\n\t reject(promise, reason);\n\t });\n\t } catch (e) {\n\t reject(promise, e);\n\t }\n\t }\n\n\t var id = 0;\n\n\t function nextId() {\n\t return id++;\n\t }\n\n\t function makePromise(promise) {\n\t promise[PROMISE_ID] = id++;\n\t promise._state = undefined;\n\t promise._result = undefined;\n\t promise._subscribers = [];\n\t }\n\n\t function validationError() {\n\t return new Error('Array Methods must be provided an Array');\n\t }\n\n\t var Enumerator = function () {\n\t function Enumerator(Constructor, input) {\n\t this._instanceConstructor = Constructor;\n\t this.promise = new Constructor(noop);\n\n\t if (!this.promise[PROMISE_ID]) {\n\t makePromise(this.promise);\n\t }\n\n\t if (isArray(input)) {\n\t this.length = input.length;\n\t this._remaining = input.length;\n\t this._result = new Array(this.length);\n\n\t if (this.length === 0) {\n\t fulfill(this.promise, this._result);\n\t } else {\n\t this.length = this.length || 0;\n\n\t this._enumerate(input);\n\n\t if (this._remaining === 0) {\n\t fulfill(this.promise, this._result);\n\t }\n\t }\n\t } else {\n\t reject(this.promise, validationError());\n\t }\n\t }\n\n\t Enumerator.prototype._enumerate = function _enumerate(input) {\n\t for (var i = 0; this._state === PENDING && i < input.length; i++) {\n\t this._eachEntry(input[i], i);\n\t }\n\t };\n\n\t Enumerator.prototype._eachEntry = function _eachEntry(entry, i) {\n\t var c = this._instanceConstructor;\n\t var resolve$$1 = c.resolve;\n\n\t if (resolve$$1 === resolve$1) {\n\t var _then = void 0;\n\n\t var error = void 0;\n\t var didError = false;\n\n\t try {\n\t _then = entry.then;\n\t } catch (e) {\n\t didError = true;\n\t error = e;\n\t }\n\n\t if (_then === then && entry._state !== PENDING) {\n\t this._settledAt(entry._state, i, entry._result);\n\t } else if (typeof _then !== 'function') {\n\t this._remaining--;\n\t this._result[i] = entry;\n\t } else if (c === Promise$1) {\n\t var promise = new c(noop);\n\n\t if (didError) {\n\t reject(promise, error);\n\t } else {\n\t handleMaybeThenable(promise, entry, _then);\n\t }\n\n\t this._willSettleAt(promise, i);\n\t } else {\n\t this._willSettleAt(new c(function (resolve$$1) {\n\t return resolve$$1(entry);\n\t }), i);\n\t }\n\t } else {\n\t this._willSettleAt(resolve$$1(entry), i);\n\t }\n\t };\n\n\t Enumerator.prototype._settledAt = function _settledAt(state, i, value) {\n\t var promise = this.promise;\n\n\t if (promise._state === PENDING) {\n\t this._remaining--;\n\n\t if (state === REJECTED) {\n\t reject(promise, value);\n\t } else {\n\t this._result[i] = value;\n\t }\n\t }\n\n\t if (this._remaining === 0) {\n\t fulfill(promise, this._result);\n\t }\n\t };\n\n\t Enumerator.prototype._willSettleAt = function _willSettleAt(promise, i) {\n\t var enumerator = this;\n\t subscribe(promise, undefined, function (value) {\n\t return enumerator._settledAt(FULFILLED, i, value);\n\t }, function (reason) {\n\t return enumerator._settledAt(REJECTED, i, reason);\n\t });\n\t };\n\n\t return Enumerator;\n\t }();\n\t /**\n\t `Promise.all` accepts an array of promises, and returns a new promise which\n\t is fulfilled with an array of fulfillment values for the passed promises, or\n\t rejected with the reason of the first passed promise to be rejected. It casts all\n\t elements of the passed iterable to promises as it runs this algorithm.\n\t \n\t Example:\n\t \n\t ```javascript\n\t let promise1 = resolve(1);\n\t let promise2 = resolve(2);\n\t let promise3 = resolve(3);\n\t let promises = [ promise1, promise2, promise3 ];\n\t \n\t Promise.all(promises).then(function(array){\n\t // The array here would be [ 1, 2, 3 ];\n\t });\n\t ```\n\t \n\t If any of the `promises` given to `all` are rejected, the first promise\n\t that is rejected will be given as an argument to the returned promises's\n\t rejection handler. For example:\n\t \n\t Example:\n\t \n\t ```javascript\n\t let promise1 = resolve(1);\n\t let promise2 = reject(new Error(\"2\"));\n\t let promise3 = reject(new Error(\"3\"));\n\t let promises = [ promise1, promise2, promise3 ];\n\t \n\t Promise.all(promises).then(function(array){\n\t // Code here never runs because there are rejected promises!\n\t }, function(error) {\n\t // error.message === \"2\"\n\t });\n\t ```\n\t \n\t @method all\n\t @static\n\t @param {Array} entries array of promises\n\t @param {String} label optional string for labeling the promise.\n\t Useful for tooling.\n\t @return {Promise} promise that is fulfilled when all `promises` have been\n\t fulfilled, or rejected if any of them become rejected.\n\t @static\n\t */\n\n\n\t function all(entries) {\n\t return new Enumerator(this, entries).promise;\n\t }\n\t /**\n\t `Promise.race` returns a new promise which is settled in the same way as the\n\t first passed promise to settle.\n\t \n\t Example:\n\t \n\t ```javascript\n\t let promise1 = new Promise(function(resolve, reject){\n\t setTimeout(function(){\n\t resolve('promise 1');\n\t }, 200);\n\t });\n\t \n\t let promise2 = new Promise(function(resolve, reject){\n\t setTimeout(function(){\n\t resolve('promise 2');\n\t }, 100);\n\t });\n\t \n\t Promise.race([promise1, promise2]).then(function(result){\n\t // result === 'promise 2' because it was resolved before promise1\n\t // was resolved.\n\t });\n\t ```\n\t \n\t `Promise.race` is deterministic in that only the state of the first\n\t settled promise matters. For example, even if other promises given to the\n\t `promises` array argument are resolved, but the first settled promise has\n\t become rejected before the other promises became fulfilled, the returned\n\t promise will become rejected:\n\t \n\t ```javascript\n\t let promise1 = new Promise(function(resolve, reject){\n\t setTimeout(function(){\n\t resolve('promise 1');\n\t }, 200);\n\t });\n\t \n\t let promise2 = new Promise(function(resolve, reject){\n\t setTimeout(function(){\n\t reject(new Error('promise 2'));\n\t }, 100);\n\t });\n\t \n\t Promise.race([promise1, promise2]).then(function(result){\n\t // Code here never runs\n\t }, function(reason){\n\t // reason.message === 'promise 2' because promise 2 became rejected before\n\t // promise 1 became fulfilled\n\t });\n\t ```\n\t \n\t An example real-world use case is implementing timeouts:\n\t \n\t ```javascript\n\t Promise.race([ajax('foo.json'), timeout(5000)])\n\t ```\n\t \n\t @method race\n\t @static\n\t @param {Array} promises array of promises to observe\n\t Useful for tooling.\n\t @return {Promise} a promise which settles in the same way as the first passed\n\t promise to settle.\n\t */\n\n\n\t function race(entries) {\n\t /*jshint validthis:true */\n\t var Constructor = this;\n\n\t if (!isArray(entries)) {\n\t return new Constructor(function (_, reject) {\n\t return reject(new TypeError('You must pass an array to race.'));\n\t });\n\t } else {\n\t return new Constructor(function (resolve, reject) {\n\t var length = entries.length;\n\n\t for (var i = 0; i < length; i++) {\n\t Constructor.resolve(entries[i]).then(resolve, reject);\n\t }\n\t });\n\t }\n\t }\n\t /**\n\t `Promise.reject` returns a promise rejected with the passed `reason`.\n\t It is shorthand for the following:\n\t \n\t ```javascript\n\t let promise = new Promise(function(resolve, reject){\n\t reject(new Error('WHOOPS'));\n\t });\n\t \n\t promise.then(function(value){\n\t // Code here doesn't run because the promise is rejected!\n\t }, function(reason){\n\t // reason.message === 'WHOOPS'\n\t });\n\t ```\n\t \n\t Instead of writing the above, your code now simply becomes the following:\n\t \n\t ```javascript\n\t let promise = Promise.reject(new Error('WHOOPS'));\n\t \n\t promise.then(function(value){\n\t // Code here doesn't run because the promise is rejected!\n\t }, function(reason){\n\t // reason.message === 'WHOOPS'\n\t });\n\t ```\n\t \n\t @method reject\n\t @static\n\t @param {Any} reason value that the returned promise will be rejected with.\n\t Useful for tooling.\n\t @return {Promise} a promise rejected with the given `reason`.\n\t */\n\n\n\t function reject$1(reason) {\n\t /*jshint validthis:true */\n\t var Constructor = this;\n\t var promise = new Constructor(noop);\n\t reject(promise, reason);\n\t return promise;\n\t }\n\n\t function needsResolver() {\n\t throw new TypeError('You must pass a resolver function as the first argument to the promise constructor');\n\t }\n\n\t function needsNew() {\n\t throw new TypeError(\"Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.\");\n\t }\n\t /**\n\t Promise objects represent the eventual result of an asynchronous operation. The\n\t primary way of interacting with a promise is through its `then` method, which\n\t registers callbacks to receive either a promise's eventual value or the reason\n\t why the promise cannot be fulfilled.\n\t \n\t Terminology\n\t -----------\n\t \n\t - `promise` is an object or function with a `then` method whose behavior conforms to this specification.\n\t - `thenable` is an object or function that defines a `then` method.\n\t - `value` is any legal JavaScript value (including undefined, a thenable, or a promise).\n\t - `exception` is a value that is thrown using the throw statement.\n\t - `reason` is a value that indicates why a promise was rejected.\n\t - `settled` the final resting state of a promise, fulfilled or rejected.\n\t \n\t A promise can be in one of three states: pending, fulfilled, or rejected.\n\t \n\t Promises that are fulfilled have a fulfillment value and are in the fulfilled\n\t state. Promises that are rejected have a rejection reason and are in the\n\t rejected state. A fulfillment value is never a thenable.\n\t \n\t Promises can also be said to *resolve* a value. If this value is also a\n\t promise, then the original promise's settled state will match the value's\n\t settled state. So a promise that *resolves* a promise that rejects will\n\t itself reject, and a promise that *resolves* a promise that fulfills will\n\t itself fulfill.\n\t \n\t \n\t Basic Usage:\n\t ------------\n\t \n\t ```js\n\t let promise = new Promise(function(resolve, reject) {\n\t // on success\n\t resolve(value);\n\t \n\t // on failure\n\t reject(reason);\n\t });\n\t \n\t promise.then(function(value) {\n\t // on fulfillment\n\t }, function(reason) {\n\t // on rejection\n\t });\n\t ```\n\t \n\t Advanced Usage:\n\t ---------------\n\t \n\t Promises shine when abstracting away asynchronous interactions such as\n\t `XMLHttpRequest`s.\n\t \n\t ```js\n\t function getJSON(url) {\n\t return new Promise(function(resolve, reject){\n\t let xhr = new XMLHttpRequest();\n\t \n\t xhr.open('GET', url);\n\t xhr.onreadystatechange = handler;\n\t xhr.responseType = 'json';\n\t xhr.setRequestHeader('Accept', 'application/json');\n\t xhr.send();\n\t \n\t function handler() {\n\t if (this.readyState === this.DONE) {\n\t if (this.status === 200) {\n\t resolve(this.response);\n\t } else {\n\t reject(new Error('getJSON: `' + url + '` failed with status: [' + this.status + ']'));\n\t }\n\t }\n\t };\n\t });\n\t }\n\t \n\t getJSON('/posts.json').then(function(json) {\n\t // on fulfillment\n\t }, function(reason) {\n\t // on rejection\n\t });\n\t ```\n\t \n\t Unlike callbacks, promises are great composable primitives.\n\t \n\t ```js\n\t Promise.all([\n\t getJSON('/posts'),\n\t getJSON('/comments')\n\t ]).then(function(values){\n\t values[0] // => postsJSON\n\t values[1] // => commentsJSON\n\t \n\t return values;\n\t });\n\t ```\n\t \n\t @class Promise\n\t @param {Function} resolver\n\t Useful for tooling.\n\t @constructor\n\t */\n\n\n\t var Promise$1 = function () {\n\t function Promise(resolver) {\n\t this[PROMISE_ID] = nextId();\n\t this._result = this._state = undefined;\n\t this._subscribers = [];\n\n\t if (noop !== resolver) {\n\t typeof resolver !== 'function' && needsResolver();\n\t this instanceof Promise ? initializePromise(this, resolver) : needsNew();\n\t }\n\t }\n\t /**\n\t The primary way of interacting with a promise is through its `then` method,\n\t which registers callbacks to receive either a promise's eventual value or the\n\t reason why the promise cannot be fulfilled.\n\t ```js\n\t findUser().then(function(user){\n\t // user is available\n\t }, function(reason){\n\t // user is unavailable, and you are given the reason why\n\t });\n\t ```\n\t Chaining\n\t --------\n\t The return value of `then` is itself a promise. This second, 'downstream'\n\t promise is resolved with the return value of the first promise's fulfillment\n\t or rejection handler, or rejected if the handler throws an exception.\n\t ```js\n\t findUser().then(function (user) {\n\t return user.name;\n\t }, function (reason) {\n\t return 'default name';\n\t }).then(function (userName) {\n\t // If `findUser` fulfilled, `userName` will be the user's name, otherwise it\n\t // will be `'default name'`\n\t });\n\t findUser().then(function (user) {\n\t throw new Error('Found user, but still unhappy');\n\t }, function (reason) {\n\t throw new Error('`findUser` rejected and we're unhappy');\n\t }).then(function (value) {\n\t // never reached\n\t }, function (reason) {\n\t // if `findUser` fulfilled, `reason` will be 'Found user, but still unhappy'.\n\t // If `findUser` rejected, `reason` will be '`findUser` rejected and we're unhappy'.\n\t });\n\t ```\n\t If the downstream promise does not specify a rejection handler, rejection reasons will be propagated further downstream.\n\t ```js\n\t findUser().then(function (user) {\n\t throw new PedagogicalException('Upstream error');\n\t }).then(function (value) {\n\t // never reached\n\t }).then(function (value) {\n\t // never reached\n\t }, function (reason) {\n\t // The `PedgagocialException` is propagated all the way down to here\n\t });\n\t ```\n\t Assimilation\n\t ------------\n\t Sometimes the value you want to propagate to a downstream promise can only be\n\t retrieved asynchronously. This can be achieved by returning a promise in the\n\t fulfillment or rejection handler. The downstream promise will then be pending\n\t until the returned promise is settled. This is called *assimilation*.\n\t ```js\n\t findUser().then(function (user) {\n\t return findCommentsByAuthor(user);\n\t }).then(function (comments) {\n\t // The user's comments are now available\n\t });\n\t ```\n\t If the assimliated promise rejects, then the downstream promise will also reject.\n\t ```js\n\t findUser().then(function (user) {\n\t return findCommentsByAuthor(user);\n\t }).then(function (comments) {\n\t // If `findCommentsByAuthor` fulfills, we'll have the value here\n\t }, function (reason) {\n\t // If `findCommentsByAuthor` rejects, we'll have the reason here\n\t });\n\t ```\n\t Simple Example\n\t --------------\n\t Synchronous Example\n\t ```javascript\n\t let result;\n\t try {\n\t result = findResult();\n\t // success\n\t } catch(reason) {\n\t // failure\n\t }\n\t ```\n\t Errback Example\n\t ```js\n\t findResult(function(result, err){\n\t if (err) {\n\t // failure\n\t } else {\n\t // success\n\t }\n\t });\n\t ```\n\t Promise Example;\n\t ```javascript\n\t findResult().then(function(result){\n\t // success\n\t }, function(reason){\n\t // failure\n\t });\n\t ```\n\t Advanced Example\n\t --------------\n\t Synchronous Example\n\t ```javascript\n\t let author, books;\n\t try {\n\t author = findAuthor();\n\t books = findBooksByAuthor(author);\n\t // success\n\t } catch(reason) {\n\t // failure\n\t }\n\t ```\n\t Errback Example\n\t ```js\n\t function foundBooks(books) {\n\t }\n\t function failure(reason) {\n\t }\n\t findAuthor(function(author, err){\n\t if (err) {\n\t failure(err);\n\t // failure\n\t } else {\n\t try {\n\t findBoooksByAuthor(author, function(books, err) {\n\t if (err) {\n\t failure(err);\n\t } else {\n\t try {\n\t foundBooks(books);\n\t } catch(reason) {\n\t failure(reason);\n\t }\n\t }\n\t });\n\t } catch(error) {\n\t failure(err);\n\t }\n\t // success\n\t }\n\t });\n\t ```\n\t Promise Example;\n\t ```javascript\n\t findAuthor().\n\t then(findBooksByAuthor).\n\t then(function(books){\n\t // found books\n\t }).catch(function(reason){\n\t // something went wrong\n\t });\n\t ```\n\t @method then\n\t @param {Function} onFulfilled\n\t @param {Function} onRejected\n\t Useful for tooling.\n\t @return {Promise}\n\t */\n\n\t /**\n\t `catch` is simply sugar for `then(undefined, onRejection)` which makes it the same\n\t as the catch block of a try/catch statement.\n\t ```js\n\t function findAuthor(){\n\t throw new Error('couldn't find that author');\n\t }\n\t // synchronous\n\t try {\n\t findAuthor();\n\t } catch(reason) {\n\t // something went wrong\n\t }\n\t // async with promises\n\t findAuthor().catch(function(reason){\n\t // something went wrong\n\t });\n\t ```\n\t @method catch\n\t @param {Function} onRejection\n\t Useful for tooling.\n\t @return {Promise}\n\t */\n\n\n\t Promise.prototype.catch = function _catch(onRejection) {\n\t return this.then(null, onRejection);\n\t };\n\t /**\n\t `finally` will be invoked regardless of the promise's fate just as native\n\t try/catch/finally behaves\n\t \n\t Synchronous example:\n\t \n\t ```js\n\t findAuthor() {\n\t if (Math.random() > 0.5) {\n\t throw new Error();\n\t }\n\t return new Author();\n\t }\n\t \n\t try {\n\t return findAuthor(); // succeed or fail\n\t } catch(error) {\n\t return findOtherAuther();\n\t } finally {\n\t // always runs\n\t // doesn't affect the return value\n\t }\n\t ```\n\t \n\t Asynchronous example:\n\t \n\t ```js\n\t findAuthor().catch(function(reason){\n\t return findOtherAuther();\n\t }).finally(function(){\n\t // author was either found, or not\n\t });\n\t ```\n\t \n\t @method finally\n\t @param {Function} callback\n\t @return {Promise}\n\t */\n\n\n\t Promise.prototype.finally = function _finally(callback) {\n\t var promise = this;\n\t var constructor = promise.constructor;\n\n\t if (isFunction(callback)) {\n\t return promise.then(function (value) {\n\t return constructor.resolve(callback()).then(function () {\n\t return value;\n\t });\n\t }, function (reason) {\n\t return constructor.resolve(callback()).then(function () {\n\t throw reason;\n\t });\n\t });\n\t }\n\n\t return promise.then(callback, callback);\n\t };\n\n\t return Promise;\n\t }();\n\n\t Promise$1.prototype.then = then;\n\t Promise$1.all = all;\n\t Promise$1.race = race;\n\t Promise$1.resolve = resolve$1;\n\t Promise$1.reject = reject$1;\n\t Promise$1._setScheduler = setScheduler;\n\t Promise$1._setAsap = setAsap;\n\t Promise$1._asap = asap;\n\t /*global self*/\n\n\t function polyfill() {\n\t var local = void 0;\n\n\t if (typeof commonjsGlobal !== 'undefined') {\n\t local = commonjsGlobal;\n\t } else if (typeof self !== 'undefined') {\n\t local = self;\n\t } else {\n\t try {\n\t local = Function('return this')();\n\t } catch (e) {\n\t throw new Error('polyfill failed because global object is unavailable in this environment');\n\t }\n\t }\n\n\t var P = local.Promise;\n\n\t if (P) {\n\t var promiseToString = null;\n\n\t try {\n\t promiseToString = Object.prototype.toString.call(P.resolve());\n\t } catch (e) {// silently ignored\n\t }\n\n\t if (promiseToString === '[object Promise]' && !P.cast) {\n\t return;\n\t }\n\t }\n\n\t local.Promise = Promise$1;\n\t } // Strange compat..\n\n\n\t Promise$1.polyfill = polyfill;\n\t Promise$1.Promise = Promise$1;\n\t return Promise$1;\n\t });\n\t});\n\n\tvar Promise$1 = typeof Promise !== \"undefined\" ? Promise : es6Promise;\n\n\tfunction registerLoggingCallbacks(obj) {\n\t var i,\n\t l,\n\t key,\n\t callbackNames = [\"begin\", \"done\", \"log\", \"testStart\", \"testDone\", \"moduleStart\", \"moduleDone\"];\n\n\t function registerLoggingCallback(key) {\n\t var loggingCallback = function loggingCallback(callback) {\n\t if (objectType(callback) !== \"function\") {\n\t throw new Error(\"QUnit logging methods require a callback function as their first parameters.\");\n\t }\n\n\t config.callbacks[key].push(callback);\n\t };\n\n\t return loggingCallback;\n\t }\n\n\t for (i = 0, l = callbackNames.length; i < l; i++) {\n\t key = callbackNames[i]; // Initialize key collection of logging callback\n\n\t if (objectType(config.callbacks[key]) === \"undefined\") {\n\t config.callbacks[key] = [];\n\t }\n\n\t obj[key] = registerLoggingCallback(key);\n\t }\n\t}\n\tfunction runLoggingCallbacks(key, args) {\n\t var callbacks = config.callbacks[key]; // Handling 'log' callbacks separately. Unlike the other callbacks,\n\t // the log callback is not controlled by the processing queue,\n\t // but rather used by asserts. Hence to promisfy the 'log' callback\n\t // would mean promisfying each step of a test\n\n\t if (key === \"log\") {\n\t callbacks.map(function (callback) {\n\t return callback(args);\n\t });\n\t return;\n\t } // ensure that each callback is executed serially\n\n\n\t return callbacks.reduce(function (promiseChain, callback) {\n\t return promiseChain.then(function () {\n\t return Promise$1.resolve(callback(args));\n\t });\n\t }, Promise$1.resolve([]));\n\t}\n\n\t// Doesn't support IE9, it will return undefined on these browsers\n\t// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack\n\tvar fileName = (sourceFromStacktrace(0) || \"\").replace(/(:\\d+)+\\)?/, \"\").replace(/.+\\//, \"\");\n\tfunction extractStacktrace(e, offset) {\n\t offset = offset === undefined ? 4 : offset;\n\t var stack, include, i;\n\n\t if (e && e.stack) {\n\t stack = e.stack.split(\"\\n\");\n\n\t if (/^error$/i.test(stack[0])) {\n\t stack.shift();\n\t }\n\n\t if (fileName) {\n\t include = [];\n\n\t for (i = offset; i < stack.length; i++) {\n\t if (stack[i].indexOf(fileName) !== -1) {\n\t break;\n\t }\n\n\t include.push(stack[i]);\n\t }\n\n\t if (include.length) {\n\t return include.join(\"\\n\");\n\t }\n\t }\n\n\t return stack[offset];\n\t }\n\t}\n\tfunction sourceFromStacktrace(offset) {\n\t var error = new Error(); // Support: Safari <=7 only, IE <=10 - 11 only\n\t // Not all browsers generate the `stack` property for `new Error()`, see also #636\n\n\t if (!error.stack) {\n\t try {\n\t throw error;\n\t } catch (err) {\n\t error = err;\n\t }\n\t }\n\n\t return extractStacktrace(error, offset);\n\t}\n\n\tvar priorityCount = 0;\n\tvar unitSampler; // This is a queue of functions that are tasks within a single test.\n\t// After tests are dequeued from config.queue they are expanded into\n\t// a set of tasks in this queue.\n\n\tvar taskQueue = [];\n\t/**\n\t * Advances the taskQueue to the next task. If the taskQueue is empty,\n\t * process the testQueue\n\t */\n\n\tfunction advance() {\n\t advanceTaskQueue();\n\n\t if (!taskQueue.length && !config.blocking && !config.current) {\n\t advanceTestQueue();\n\t }\n\t}\n\t/**\n\t * Advances the taskQueue with an increased depth\n\t */\n\n\n\tfunction advanceTaskQueue() {\n\t var start = now();\n\t config.depth = (config.depth || 0) + 1;\n\t processTaskQueue(start);\n\t config.depth--;\n\t}\n\t/**\n\t * Process the first task on the taskQueue as a promise.\n\t * Each task is a function returned by https://github.com/qunitjs/qunit/blob/master/src/test.js#L381\n\t */\n\n\n\tfunction processTaskQueue(start) {\n\t if (taskQueue.length && !config.blocking) {\n\t var elapsedTime = now() - start;\n\n\t if (!setTimeout$1 || config.updateRate <= 0 || elapsedTime < config.updateRate) {\n\t var task = taskQueue.shift();\n\t Promise$1.resolve(task()).then(function () {\n\t if (!taskQueue.length) {\n\t advance();\n\t } else {\n\t processTaskQueue(start);\n\t }\n\t });\n\t } else {\n\t setTimeout$1(advance);\n\t }\n\t }\n\t}\n\t/**\n\t * Advance the testQueue to the next test to process. Call done() if testQueue completes.\n\t */\n\n\n\tfunction advanceTestQueue() {\n\t if (!config.blocking && !config.queue.length && config.depth === 0) {\n\t done();\n\t return;\n\t }\n\n\t var testTasks = config.queue.shift();\n\t addToTaskQueue(testTasks());\n\n\t if (priorityCount > 0) {\n\t priorityCount--;\n\t }\n\n\t advance();\n\t}\n\t/**\n\t * Enqueue the tasks for a test into the task queue.\n\t * @param {Array} tasksArray\n\t */\n\n\n\tfunction addToTaskQueue(tasksArray) {\n\t taskQueue.push.apply(taskQueue, _toConsumableArray(tasksArray));\n\t}\n\t/**\n\t * Return the number of tasks remaining in the task queue to be processed.\n\t * @return {Number}\n\t */\n\n\n\tfunction taskQueueLength() {\n\t return taskQueue.length;\n\t}\n\t/**\n\t * Adds a test to the TestQueue for execution.\n\t * @param {Function} testTasksFunc\n\t * @param {Boolean} prioritize\n\t * @param {String} seed\n\t */\n\n\n\tfunction addToTestQueue(testTasksFunc, prioritize, seed) {\n\t if (prioritize) {\n\t config.queue.splice(priorityCount++, 0, testTasksFunc);\n\t } else if (seed) {\n\t if (!unitSampler) {\n\t unitSampler = unitSamplerGenerator(seed);\n\t } // Insert into a random position after all prioritized items\n\n\n\t var index = Math.floor(unitSampler() * (config.queue.length - priorityCount + 1));\n\t config.queue.splice(priorityCount + index, 0, testTasksFunc);\n\t } else {\n\t config.queue.push(testTasksFunc);\n\t }\n\t}\n\t/**\n\t * Creates a seeded \"sample\" generator which is used for randomizing tests.\n\t */\n\n\n\tfunction unitSamplerGenerator(seed) {\n\t // 32-bit xorshift, requires only a nonzero seed\n\t // https://excamera.com/sphinx/article-xorshift.html\n\t var sample = parseInt(generateHash(seed), 16) || -1;\n\t return function () {\n\t sample ^= sample << 13;\n\t sample ^= sample >>> 17;\n\t sample ^= sample << 5; // ECMAScript has no unsigned number type\n\n\t if (sample < 0) {\n\t sample += 0x100000000;\n\t }\n\n\t return sample / 0x100000000;\n\t };\n\t}\n\t/**\n\t * This function is called when the ProcessingQueue is done processing all\n\t * items. It handles emitting the final run events.\n\t */\n\n\n\tfunction done() {\n\t var storage = config.storage;\n\t ProcessingQueue.finished = true;\n\t var runtime = now() - config.started;\n\t var passed = config.stats.all - config.stats.bad;\n\n\t if (config.stats.testCount === 0) {\n\t if (config.filter && config.filter.length) {\n\t throw new Error(\"No tests matched the filter \\\"\".concat(config.filter, \"\\\".\"));\n\t }\n\n\t if (config.module && config.module.length) {\n\t throw new Error(\"No tests matched the module \\\"\".concat(config.module, \"\\\".\"));\n\t }\n\n\t if (config.moduleId && config.moduleId.length) {\n\t throw new Error(\"No tests matched the moduleId \\\"\".concat(config.moduleId, \"\\\".\"));\n\t }\n\n\t if (config.testId && config.testId.length) {\n\t throw new Error(\"No tests matched the testId \\\"\".concat(config.testId, \"\\\".\"));\n\t }\n\n\t throw new Error(\"No tests were run.\");\n\t }\n\n\t emit(\"runEnd\", globalSuite.end(true));\n\t runLoggingCallbacks(\"done\", {\n\t passed: passed,\n\t failed: config.stats.bad,\n\t total: config.stats.all,\n\t runtime: runtime\n\t }).then(function () {\n\t // Clear own storage items if all tests passed\n\t if (storage && config.stats.bad === 0) {\n\t for (var i = storage.length - 1; i >= 0; i--) {\n\t var key = storage.key(i);\n\n\t if (key.indexOf(\"qunit-test-\") === 0) {\n\t storage.removeItem(key);\n\t }\n\t }\n\t }\n\t });\n\t}\n\n\tvar ProcessingQueue = {\n\t finished: false,\n\t add: addToTestQueue,\n\t advance: advance,\n\t taskCount: taskQueueLength\n\t};\n\n\tvar TestReport = /*#__PURE__*/function () {\n\t function TestReport(name, suite, options) {\n\t _classCallCheck(this, TestReport);\n\n\t this.name = name;\n\t this.suiteName = suite.name;\n\t this.fullName = suite.fullName.concat(name);\n\t this.runtime = 0;\n\t this.assertions = [];\n\t this.skipped = !!options.skip;\n\t this.todo = !!options.todo;\n\t this.valid = options.valid;\n\t this._startTime = 0;\n\t this._endTime = 0;\n\t suite.pushTest(this);\n\t }\n\n\t _createClass(TestReport, [{\n\t key: \"start\",\n\t value: function start(recordTime) {\n\t if (recordTime) {\n\t this._startTime = performance.now();\n\t performance.mark(\"qunit_test_start\");\n\t }\n\n\t return {\n\t name: this.name,\n\t suiteName: this.suiteName,\n\t fullName: this.fullName.slice()\n\t };\n\t }\n\t }, {\n\t key: \"end\",\n\t value: function end(recordTime) {\n\t if (recordTime) {\n\t this._endTime = performance.now();\n\n\t if (performance) {\n\t performance.mark(\"qunit_test_end\");\n\t var testName = this.fullName.join(\" – \");\n\t performance.measure(\"QUnit Test: \".concat(testName), \"qunit_test_start\", \"qunit_test_end\");\n\t }\n\t }\n\n\t return extend(this.start(), {\n\t runtime: this.getRuntime(),\n\t status: this.getStatus(),\n\t errors: this.getFailedAssertions(),\n\t assertions: this.getAssertions()\n\t });\n\t }\n\t }, {\n\t key: \"pushAssertion\",\n\t value: function pushAssertion(assertion) {\n\t this.assertions.push(assertion);\n\t }\n\t }, {\n\t key: \"getRuntime\",\n\t value: function getRuntime() {\n\t return this._endTime - this._startTime;\n\t }\n\t }, {\n\t key: \"getStatus\",\n\t value: function getStatus() {\n\t if (this.skipped) {\n\t return \"skipped\";\n\t }\n\n\t var testPassed = this.getFailedAssertions().length > 0 ? this.todo : !this.todo;\n\n\t if (!testPassed) {\n\t return \"failed\";\n\t } else if (this.todo) {\n\t return \"todo\";\n\t } else {\n\t return \"passed\";\n\t }\n\t }\n\t }, {\n\t key: \"getFailedAssertions\",\n\t value: function getFailedAssertions() {\n\t return this.assertions.filter(function (assertion) {\n\t return !assertion.passed;\n\t });\n\t }\n\t }, {\n\t key: \"getAssertions\",\n\t value: function getAssertions() {\n\t return this.assertions.slice();\n\t } // Remove actual and expected values from assertions. This is to prevent\n\t // leaking memory throughout a test suite.\n\n\t }, {\n\t key: \"slimAssertions\",\n\t value: function slimAssertions() {\n\t this.assertions = this.assertions.map(function (assertion) {\n\t delete assertion.actual;\n\t delete assertion.expected;\n\t return assertion;\n\t });\n\t }\n\t }]);\n\n\t return TestReport;\n\t}();\n\n\tvar focused$1 = false;\n\tfunction Test(settings) {\n\t var i, l;\n\t ++Test.count;\n\t this.expected = null;\n\t this.assertions = [];\n\t this.semaphore = 0;\n\t this.module = config.currentModule;\n\t this.steps = [];\n\t this.timeout = undefined;\n\t this.errorForStack = new Error(); // If a module is skipped, all its tests and the tests of the child suites\n\t // should be treated as skipped even if they are defined as `only` or `todo`.\n\t // As for `todo` module, all its tests will be treated as `todo` except for\n\t // tests defined as `skip` which will be left intact.\n\t //\n\t // So, if a test is defined as `todo` and is inside a skipped module, we should\n\t // then treat that test as if was defined as `skip`.\n\n\t if (this.module.skip) {\n\t settings.skip = true;\n\t settings.todo = false; // Skipped tests should be left intact\n\t } else if (this.module.todo && !settings.skip) {\n\t settings.todo = true;\n\t }\n\n\t extend(this, settings);\n\t this.testReport = new TestReport(settings.testName, this.module.suiteReport, {\n\t todo: settings.todo,\n\t skip: settings.skip,\n\t valid: this.valid()\n\t }); // Register unique strings\n\n\t for (i = 0, l = this.module.tests; i < l.length; i++) {\n\t if (this.module.tests[i].name === this.testName) {\n\t this.testName += \" \";\n\t }\n\t }\n\n\t this.testId = generateHash(this.module.name, this.testName);\n\t this.module.tests.push({\n\t name: this.testName,\n\t testId: this.testId,\n\t skip: !!settings.skip\n\t });\n\n\t if (settings.skip) {\n\t // Skipped tests will fully ignore any sent callback\n\t this.callback = function () {};\n\n\t this.async = false;\n\t this.expected = 0;\n\t } else {\n\t if (typeof this.callback !== \"function\") {\n\t var method = this.todo ? \"todo\" : \"test\"; // eslint-disable-next-line max-len\n\n\t throw new TypeError(\"You must provide a function as a test callback to QUnit.\".concat(method, \"(\\\"\").concat(settings.testName, \"\\\")\"));\n\t }\n\n\t this.assert = new Assert(this);\n\t }\n\t}\n\tTest.count = 0;\n\n\tfunction getNotStartedModules(startModule) {\n\t var module = startModule,\n\t modules = [];\n\n\t while (module && module.testsRun === 0) {\n\t modules.push(module);\n\t module = module.parentModule;\n\t } // The above push modules from the child to the parent\n\t // return a reversed order with the top being the top most parent module\n\n\n\t return modules.reverse();\n\t}\n\n\tTest.prototype = {\n\t // generating a stack trace can be expensive, so using a getter defers this until we need it\n\t get stack() {\n\t return extractStacktrace(this.errorForStack, 2);\n\t },\n\n\t before: function before() {\n\t var _this = this;\n\n\t var module = this.module,\n\t notStartedModules = getNotStartedModules(module); // ensure the callbacks are executed serially for each module\n\n\t var callbackPromises = notStartedModules.reduce(function (promiseChain, startModule) {\n\t return promiseChain.then(function () {\n\t startModule.stats = {\n\t all: 0,\n\t bad: 0,\n\t started: now()\n\t };\n\t emit(\"suiteStart\", startModule.suiteReport.start(true));\n\t return runLoggingCallbacks(\"moduleStart\", {\n\t name: startModule.name,\n\t tests: startModule.tests\n\t });\n\t });\n\t }, Promise$1.resolve([]));\n\t return callbackPromises.then(function () {\n\t config.current = _this;\n\t _this.testEnvironment = extend({}, module.testEnvironment);\n\t _this.started = now();\n\t emit(\"testStart\", _this.testReport.start(true));\n\t return runLoggingCallbacks(\"testStart\", {\n\t name: _this.testName,\n\t module: module.name,\n\t testId: _this.testId,\n\t previousFailure: _this.previousFailure\n\t }).then(function () {\n\t if (!config.pollution) {\n\t saveGlobal();\n\t }\n\t });\n\t });\n\t },\n\t run: function run() {\n\t var promise;\n\t config.current = this;\n\t this.callbackStarted = now();\n\n\t if (config.notrycatch) {\n\t runTest(this);\n\t return;\n\t }\n\n\t try {\n\t runTest(this);\n\t } catch (e) {\n\t this.pushFailure(\"Died on test #\" + (this.assertions.length + 1) + \" \" + this.stack + \": \" + (e.message || e), extractStacktrace(e, 0)); // Else next test will carry the responsibility\n\n\t saveGlobal(); // Restart the tests if they're blocking\n\n\t if (config.blocking) {\n\t internalRecover(this);\n\t }\n\t }\n\n\t function runTest(test) {\n\t promise = test.callback.call(test.testEnvironment, test.assert);\n\t test.resolvePromise(promise); // If the test has a \"lock\" on it, but the timeout is 0, then we push a\n\t // failure as the test should be synchronous.\n\n\t if (test.timeout === 0 && test.semaphore !== 0) {\n\t pushFailure(\"Test did not finish synchronously even though assert.timeout( 0 ) was used.\", sourceFromStacktrace(2));\n\t }\n\t }\n\t },\n\t after: function after() {\n\t checkPollution();\n\t },\n\t queueHook: function queueHook(hook, hookName, hookOwner) {\n\t var _this2 = this;\n\n\t var callHook = function callHook() {\n\t var promise = hook.call(_this2.testEnvironment, _this2.assert);\n\n\t _this2.resolvePromise(promise, hookName);\n\t };\n\n\t var runHook = function runHook() {\n\t if (hookName === \"before\") {\n\t if (hookOwner.unskippedTestsRun !== 0) {\n\t return;\n\t }\n\n\t _this2.preserveEnvironment = true;\n\t } // The 'after' hook should only execute when there are not tests left and\n\t // when the 'after' and 'finish' tasks are the only tasks left to process\n\n\n\t if (hookName === \"after\" && hookOwner.unskippedTestsRun !== numberOfUnskippedTests(hookOwner) - 1 && (config.queue.length > 0 || ProcessingQueue.taskCount() > 2)) {\n\t return;\n\t }\n\n\t config.current = _this2;\n\n\t if (config.notrycatch) {\n\t callHook();\n\t return;\n\t }\n\n\t try {\n\t callHook();\n\t } catch (error) {\n\t _this2.pushFailure(hookName + \" failed on \" + _this2.testName + \": \" + (error.message || error), extractStacktrace(error, 0));\n\t }\n\t };\n\n\t return runHook;\n\t },\n\t // Currently only used for module level hooks, can be used to add global level ones\n\t hooks: function hooks(handler) {\n\t var hooks = [];\n\n\t function processHooks(test, module) {\n\t if (module.parentModule) {\n\t processHooks(test, module.parentModule);\n\t }\n\n\t if (module.hooks[handler].length) {\n\t for (var i = 0; i < module.hooks[handler].length; i++) {\n\t hooks.push(test.queueHook(module.hooks[handler][i], handler, module));\n\t }\n\t }\n\t } // Hooks are ignored on skipped tests\n\n\n\t if (!this.skip) {\n\t processHooks(this, this.module);\n\t }\n\n\t return hooks;\n\t },\n\t finish: function finish() {\n\t config.current = this; // Release the test callback to ensure that anything referenced has been\n\t // released to be garbage collected.\n\n\t this.callback = undefined;\n\n\t if (this.steps.length) {\n\t var stepsList = this.steps.join(\", \");\n\t this.pushFailure(\"Expected assert.verifySteps() to be called before end of test \" + \"after using assert.step(). Unverified steps: \".concat(stepsList), this.stack);\n\t }\n\n\t if (config.requireExpects && this.expected === null) {\n\t this.pushFailure(\"Expected number of assertions to be defined, but expect() was \" + \"not called.\", this.stack);\n\t } else if (this.expected !== null && this.expected !== this.assertions.length) {\n\t this.pushFailure(\"Expected \" + this.expected + \" assertions, but \" + this.assertions.length + \" were run\", this.stack);\n\t } else if (this.expected === null && !this.assertions.length) {\n\t this.pushFailure(\"Expected at least one assertion, but none were run - call \" + \"expect(0) to accept zero assertions.\", this.stack);\n\t }\n\n\t var i,\n\t module = this.module,\n\t moduleName = module.name,\n\t testName = this.testName,\n\t skipped = !!this.skip,\n\t todo = !!this.todo,\n\t bad = 0,\n\t storage = config.storage;\n\t this.runtime = now() - this.started;\n\t config.stats.all += this.assertions.length;\n\t config.stats.testCount += 1;\n\t module.stats.all += this.assertions.length;\n\n\t for (i = 0; i < this.assertions.length; i++) {\n\t if (!this.assertions[i].result) {\n\t bad++;\n\t config.stats.bad++;\n\t module.stats.bad++;\n\t }\n\t }\n\n\t notifyTestsRan(module, skipped); // Store result when possible\n\n\t if (storage) {\n\t if (bad) {\n\t storage.setItem(\"qunit-test-\" + moduleName + \"-\" + testName, bad);\n\t } else {\n\t storage.removeItem(\"qunit-test-\" + moduleName + \"-\" + testName);\n\t }\n\t } // After emitting the js-reporters event we cleanup the assertion data to\n\t // avoid leaking it. It is not used by the legacy testDone callbacks.\n\n\n\t emit(\"testEnd\", this.testReport.end(true));\n\t this.testReport.slimAssertions();\n\t var test = this;\n\t return runLoggingCallbacks(\"testDone\", {\n\t name: testName,\n\t module: moduleName,\n\t skipped: skipped,\n\t todo: todo,\n\t failed: bad,\n\t passed: this.assertions.length - bad,\n\t total: this.assertions.length,\n\t runtime: skipped ? 0 : this.runtime,\n\t // HTML Reporter use\n\t assertions: this.assertions,\n\t testId: this.testId,\n\n\t // Source of Test\n\t // generating stack trace is expensive, so using a getter will help defer this until we need it\n\t get source() {\n\t return test.stack;\n\t }\n\n\t }).then(function () {\n\t if (module.testsRun === numberOfTests(module)) {\n\t var completedModules = [module]; // Check if the parent modules, iteratively, are done. If that the case,\n\t // we emit the `suiteEnd` event and trigger `moduleDone` callback.\n\n\t var parent = module.parentModule;\n\n\t while (parent && parent.testsRun === numberOfTests(parent)) {\n\t completedModules.push(parent);\n\t parent = parent.parentModule;\n\t }\n\n\t return completedModules.reduce(function (promiseChain, completedModule) {\n\t return promiseChain.then(function () {\n\t return logSuiteEnd(completedModule);\n\t });\n\t }, Promise$1.resolve([]));\n\t }\n\t }).then(function () {\n\t config.current = undefined;\n\t });\n\n\t function logSuiteEnd(module) {\n\t // Reset `module.hooks` to ensure that anything referenced in these hooks\n\t // has been released to be garbage collected.\n\t module.hooks = {};\n\t emit(\"suiteEnd\", module.suiteReport.end(true));\n\t return runLoggingCallbacks(\"moduleDone\", {\n\t name: module.name,\n\t tests: module.tests,\n\t failed: module.stats.bad,\n\t passed: module.stats.all - module.stats.bad,\n\t total: module.stats.all,\n\t runtime: now() - module.stats.started\n\t });\n\t }\n\t },\n\t preserveTestEnvironment: function preserveTestEnvironment() {\n\t if (this.preserveEnvironment) {\n\t this.module.testEnvironment = this.testEnvironment;\n\t this.testEnvironment = extend({}, this.module.testEnvironment);\n\t }\n\t },\n\t queue: function queue() {\n\t var test = this;\n\n\t if (!this.valid()) {\n\t return;\n\t }\n\n\t function runTest() {\n\t return [function () {\n\t return test.before();\n\t }].concat(_toConsumableArray(test.hooks(\"before\")), [function () {\n\t test.preserveTestEnvironment();\n\t }], _toConsumableArray(test.hooks(\"beforeEach\")), [function () {\n\t test.run();\n\t }], _toConsumableArray(test.hooks(\"afterEach\").reverse()), _toConsumableArray(test.hooks(\"after\").reverse()), [function () {\n\t test.after();\n\t }, function () {\n\t return test.finish();\n\t }]);\n\t }\n\n\t var previousFailCount = config.storage && +config.storage.getItem(\"qunit-test-\" + this.module.name + \"-\" + this.testName); // Prioritize previously failed tests, detected from storage\n\n\t var prioritize = config.reorder && !!previousFailCount;\n\t this.previousFailure = !!previousFailCount;\n\t ProcessingQueue.add(runTest, prioritize, config.seed); // If the queue has already finished, we manually process the new test\n\n\t if (ProcessingQueue.finished) {\n\t ProcessingQueue.advance();\n\t }\n\t },\n\t pushResult: function pushResult(resultInfo) {\n\t if (this !== config.current) {\n\t throw new Error(\"Assertion occurred after test had finished.\");\n\t } // Destructure of resultInfo = { result, actual, expected, message, negative }\n\n\n\t var source,\n\t details = {\n\t module: this.module.name,\n\t name: this.testName,\n\t result: resultInfo.result,\n\t message: resultInfo.message,\n\t actual: resultInfo.actual,\n\t testId: this.testId,\n\t negative: resultInfo.negative || false,\n\t runtime: now() - this.started,\n\t todo: !!this.todo\n\t };\n\n\t if (hasOwn.call(resultInfo, \"expected\")) {\n\t details.expected = resultInfo.expected;\n\t }\n\n\t if (!resultInfo.result) {\n\t source = resultInfo.source || sourceFromStacktrace();\n\n\t if (source) {\n\t details.source = source;\n\t }\n\t }\n\n\t this.logAssertion(details);\n\t this.assertions.push({\n\t result: !!resultInfo.result,\n\t message: resultInfo.message\n\t });\n\t },\n\t pushFailure: function pushFailure(message, source, actual) {\n\t if (!(this instanceof Test)) {\n\t throw new Error(\"pushFailure() assertion outside test context, was \" + sourceFromStacktrace(2));\n\t }\n\n\t this.pushResult({\n\t result: false,\n\t message: message || \"error\",\n\t actual: actual || null,\n\t source: source\n\t });\n\t },\n\n\t /**\n\t * Log assertion details using both the old QUnit.log interface and\n\t * QUnit.on( \"assertion\" ) interface.\n\t *\n\t * @private\n\t */\n\t logAssertion: function logAssertion(details) {\n\t runLoggingCallbacks(\"log\", details);\n\t var assertion = {\n\t passed: details.result,\n\t actual: details.actual,\n\t expected: details.expected,\n\t message: details.message,\n\t stack: details.source,\n\t todo: details.todo\n\t };\n\t this.testReport.pushAssertion(assertion);\n\t emit(\"assertion\", assertion);\n\t },\n\t resolvePromise: function resolvePromise(promise, phase) {\n\t var then,\n\t resume,\n\t message,\n\t test = this;\n\n\t if (promise != null) {\n\t then = promise.then;\n\n\t if (objectType(then) === \"function\") {\n\t resume = internalStop(test);\n\n\t if (config.notrycatch) {\n\t then.call(promise, function () {\n\t resume();\n\t });\n\t } else {\n\t then.call(promise, function () {\n\t resume();\n\t }, function (error) {\n\t message = \"Promise rejected \" + (!phase ? \"during\" : phase.replace(/Each$/, \"\")) + \" \\\"\" + test.testName + \"\\\": \" + (error && error.message || error);\n\t test.pushFailure(message, extractStacktrace(error, 0)); // Else next test will carry the responsibility\n\n\t saveGlobal(); // Unblock\n\n\t internalRecover(test);\n\t });\n\t }\n\t }\n\t }\n\t },\n\t valid: function valid() {\n\t var filter = config.filter,\n\t regexFilter = /^(!?)\\/([\\w\\W]*)\\/(i?$)/.exec(filter),\n\t module = config.module && config.module.toLowerCase(),\n\t fullName = this.module.name + \": \" + this.testName;\n\n\t function moduleChainNameMatch(testModule) {\n\t var testModuleName = testModule.name ? testModule.name.toLowerCase() : null;\n\n\t if (testModuleName === module) {\n\t return true;\n\t } else if (testModule.parentModule) {\n\t return moduleChainNameMatch(testModule.parentModule);\n\t } else {\n\t return false;\n\t }\n\t }\n\n\t function moduleChainIdMatch(testModule) {\n\t return inArray(testModule.moduleId, config.moduleId) || testModule.parentModule && moduleChainIdMatch(testModule.parentModule);\n\t } // Internally-generated tests are always valid\n\n\n\t if (this.callback && this.callback.validTest) {\n\t return true;\n\t }\n\n\t if (config.moduleId && config.moduleId.length > 0 && !moduleChainIdMatch(this.module)) {\n\t return false;\n\t }\n\n\t if (config.testId && config.testId.length > 0 && !inArray(this.testId, config.testId)) {\n\t return false;\n\t }\n\n\t if (module && !moduleChainNameMatch(this.module)) {\n\t return false;\n\t }\n\n\t if (!filter) {\n\t return true;\n\t }\n\n\t return regexFilter ? this.regexFilter(!!regexFilter[1], regexFilter[2], regexFilter[3], fullName) : this.stringFilter(filter, fullName);\n\t },\n\t regexFilter: function regexFilter(exclude, pattern, flags, fullName) {\n\t var regex = new RegExp(pattern, flags);\n\t var match = regex.test(fullName);\n\t return match !== exclude;\n\t },\n\t stringFilter: function stringFilter(filter, fullName) {\n\t filter = filter.toLowerCase();\n\t fullName = fullName.toLowerCase();\n\t var include = filter.charAt(0) !== \"!\";\n\n\t if (!include) {\n\t filter = filter.slice(1);\n\t } // If the filter matches, we need to honour include\n\n\n\t if (fullName.indexOf(filter) !== -1) {\n\t return include;\n\t } // Otherwise, do the opposite\n\n\n\t return !include;\n\t }\n\t};\n\tfunction pushFailure() {\n\t if (!config.current) {\n\t throw new Error(\"pushFailure() assertion outside test context, in \" + sourceFromStacktrace(2));\n\t } // Gets current test obj\n\n\n\t var currentTest = config.current;\n\t return currentTest.pushFailure.apply(currentTest, arguments);\n\t}\n\n\tfunction saveGlobal() {\n\t config.pollution = [];\n\n\t if (config.noglobals) {\n\t for (var key in global__default['default']) {\n\t if (hasOwn.call(global__default['default'], key)) {\n\t // In Opera sometimes DOM element ids show up here, ignore them\n\t if (/^qunit-test-output/.test(key)) {\n\t continue;\n\t }\n\n\t config.pollution.push(key);\n\t }\n\t }\n\t }\n\t}\n\n\tfunction checkPollution() {\n\t var newGlobals,\n\t deletedGlobals,\n\t old = config.pollution;\n\t saveGlobal();\n\t newGlobals = diff(config.pollution, old);\n\n\t if (newGlobals.length > 0) {\n\t pushFailure(\"Introduced global variable(s): \" + newGlobals.join(\", \"));\n\t }\n\n\t deletedGlobals = diff(old, config.pollution);\n\n\t if (deletedGlobals.length > 0) {\n\t pushFailure(\"Deleted global variable(s): \" + deletedGlobals.join(\", \"));\n\t }\n\t} // Will be exposed as QUnit.test\n\n\n\tfunction test(testName, callback) {\n\t if (focused$1) {\n\t return;\n\t }\n\n\t var newTest = new Test({\n\t testName: testName,\n\t callback: callback\n\t });\n\t newTest.queue();\n\t}\n\textend(test, {\n\t todo: function todo(testName, callback) {\n\t if (focused$1) {\n\t return;\n\t }\n\n\t var newTest = new Test({\n\t testName: testName,\n\t callback: callback,\n\t todo: true\n\t });\n\t newTest.queue();\n\t },\n\t skip: function skip(testName) {\n\t if (focused$1) {\n\t return;\n\t }\n\n\t var test = new Test({\n\t testName: testName,\n\t skip: true\n\t });\n\t test.queue();\n\t },\n\t only: function only(testName, callback) {\n\t if (!focused$1) {\n\t config.queue.length = 0;\n\t focused$1 = true;\n\t }\n\n\t var newTest = new Test({\n\t testName: testName,\n\t callback: callback\n\t });\n\t newTest.queue();\n\t }\n\t}); // Resets config.timeout with a new timeout duration.\n\n\tfunction resetTestTimeout(timeoutDuration) {\n\t clearTimeout(config.timeout);\n\t config.timeout = setTimeout$1(config.timeoutHandler(timeoutDuration), timeoutDuration);\n\t} // Put a hold on processing and return a function that will release it.\n\n\tfunction internalStop(test) {\n\t var released = false;\n\t test.semaphore += 1;\n\t config.blocking = true; // Set a recovery timeout, if so configured.\n\n\t if (setTimeout$1) {\n\t var timeoutDuration;\n\n\t if (typeof test.timeout === \"number\") {\n\t timeoutDuration = test.timeout;\n\t } else if (typeof config.testTimeout === \"number\") {\n\t timeoutDuration = config.testTimeout;\n\t }\n\n\t if (typeof timeoutDuration === \"number\" && timeoutDuration > 0) {\n\t clearTimeout(config.timeout);\n\n\t config.timeoutHandler = function (timeout) {\n\t return function () {\n\t pushFailure(\"Test took longer than \".concat(timeout, \"ms; test timed out.\"), sourceFromStacktrace(2));\n\t released = true;\n\t internalRecover(test);\n\t };\n\t };\n\n\t config.timeout = setTimeout$1(config.timeoutHandler(timeoutDuration), timeoutDuration);\n\t }\n\t }\n\n\t return function resume() {\n\t if (released) {\n\t return;\n\t }\n\n\t released = true;\n\t test.semaphore -= 1;\n\t internalStart(test);\n\t };\n\t} // Forcefully release all processing holds.\n\n\tfunction internalRecover(test) {\n\t test.semaphore = 0;\n\t internalStart(test);\n\t} // Release a processing hold, scheduling a resumption attempt if no holds remain.\n\n\n\tfunction internalStart(test) {\n\t // If semaphore is non-numeric, throw error\n\t if (isNaN(test.semaphore)) {\n\t test.semaphore = 0;\n\t pushFailure(\"Invalid value on test.semaphore\", sourceFromStacktrace(2));\n\t return;\n\t } // Don't start until equal number of stop-calls\n\n\n\t if (test.semaphore > 0) {\n\t return;\n\t } // Throw an Error if start is called more often than stop\n\n\n\t if (test.semaphore < 0) {\n\t test.semaphore = 0;\n\t pushFailure(\"Tried to restart test while already started (test's semaphore was 0 already)\", sourceFromStacktrace(2));\n\t return;\n\t } // Add a slight delay to allow more assertions etc.\n\n\n\t if (setTimeout$1) {\n\t if (config.timeout) {\n\t clearTimeout(config.timeout);\n\t }\n\n\t config.timeout = setTimeout$1(function () {\n\t if (test.semaphore > 0) {\n\t return;\n\t }\n\n\t if (config.timeout) {\n\t clearTimeout(config.timeout);\n\t }\n\n\t begin();\n\t });\n\t } else {\n\t begin();\n\t }\n\t}\n\n\tfunction collectTests(module) {\n\t var tests = [].concat(module.tests);\n\n\t var modules = _toConsumableArray(module.childModules); // Do a breadth-first traversal of the child modules\n\n\n\t while (modules.length) {\n\t var nextModule = modules.shift();\n\t tests.push.apply(tests, nextModule.tests);\n\t modules.push.apply(modules, _toConsumableArray(nextModule.childModules));\n\t }\n\n\t return tests;\n\t}\n\n\tfunction numberOfTests(module) {\n\t return collectTests(module).length;\n\t}\n\n\tfunction numberOfUnskippedTests(module) {\n\t return collectTests(module).filter(function (test) {\n\t return !test.skip;\n\t }).length;\n\t}\n\n\tfunction notifyTestsRan(module, skipped) {\n\t module.testsRun++;\n\n\t if (!skipped) {\n\t module.unskippedTestsRun++;\n\t }\n\n\t while (module = module.parentModule) {\n\t module.testsRun++;\n\n\t if (!skipped) {\n\t module.unskippedTestsRun++;\n\t }\n\t }\n\t}\n\n\tvar Assert = /*#__PURE__*/function () {\n\t function Assert(testContext) {\n\t _classCallCheck(this, Assert);\n\n\t this.test = testContext;\n\t } // Assert helpers\n\n\n\t _createClass(Assert, [{\n\t key: \"timeout\",\n\t value: function timeout(duration) {\n\t if (typeof duration !== \"number\") {\n\t throw new Error(\"You must pass a number as the duration to assert.timeout\");\n\t }\n\n\t this.test.timeout = duration; // If a timeout has been set, clear it and reset with the new duration\n\n\t if (config.timeout) {\n\t clearTimeout(config.timeout);\n\n\t if (config.timeoutHandler && this.test.timeout > 0) {\n\t resetTestTimeout(this.test.timeout);\n\t }\n\t }\n\t } // Documents a \"step\", which is a string value, in a test as a passing assertion\n\n\t }, {\n\t key: \"step\",\n\t value: function step(message) {\n\t var assertionMessage = message;\n\t var result = !!message;\n\t this.test.steps.push(message);\n\n\t if (objectType(message) === \"undefined\" || message === \"\") {\n\t assertionMessage = \"You must provide a message to assert.step\";\n\t } else if (objectType(message) !== \"string\") {\n\t assertionMessage = \"You must provide a string value to assert.step\";\n\t result = false;\n\t }\n\n\t this.pushResult({\n\t result: result,\n\t message: assertionMessage\n\t });\n\t } // Verifies the steps in a test match a given array of string values\n\n\t }, {\n\t key: \"verifySteps\",\n\t value: function verifySteps(steps, message) {\n\t // Since the steps array is just string values, we can clone with slice\n\t var actualStepsClone = this.test.steps.slice();\n\t this.deepEqual(actualStepsClone, steps, message);\n\t this.test.steps.length = 0;\n\t } // Specify the number of expected assertions to guarantee that failed test\n\t // (no assertions are run at all) don't slip through.\n\n\t }, {\n\t key: \"expect\",\n\t value: function expect(asserts) {\n\t if (arguments.length === 1) {\n\t this.test.expected = asserts;\n\t } else {\n\t return this.test.expected;\n\t }\n\t } // Put a hold on processing and return a function that will release it a maximum of once.\n\n\t }, {\n\t key: \"async\",\n\t value: function async(count) {\n\t var test = this.test;\n\t var popped = false,\n\t acceptCallCount = count;\n\n\t if (typeof acceptCallCount === \"undefined\") {\n\t acceptCallCount = 1;\n\t }\n\n\t var resume = internalStop(test);\n\t return function done() {\n\t if (config.current !== test) {\n\t throw Error(\"assert.async callback called after test finished.\");\n\t }\n\n\t if (popped) {\n\t test.pushFailure(\"Too many calls to the `assert.async` callback\", sourceFromStacktrace(2));\n\t return;\n\t }\n\n\t acceptCallCount -= 1;\n\n\t if (acceptCallCount > 0) {\n\t return;\n\t }\n\n\t popped = true;\n\t resume();\n\t };\n\t } // Exports test.push() to the user API\n\t // Alias of pushResult.\n\n\t }, {\n\t key: \"push\",\n\t value: function push(result, actual, expected, message, negative) {\n\t Logger.warn(\"assert.push is deprecated and will be removed in QUnit 3.0.\" + \" Please use assert.pushResult instead (https://api.qunitjs.com/assert/pushResult).\");\n\t var currentAssert = this instanceof Assert ? this : config.current.assert;\n\t return currentAssert.pushResult({\n\t result: result,\n\t actual: actual,\n\t expected: expected,\n\t message: message,\n\t negative: negative\n\t });\n\t }\n\t }, {\n\t key: \"pushResult\",\n\t value: function pushResult(resultInfo) {\n\t // Destructure of resultInfo = { result, actual, expected, message, negative }\n\t var assert = this;\n\t var currentTest = assert instanceof Assert && assert.test || config.current; // Backwards compatibility fix.\n\t // Allows the direct use of global exported assertions and QUnit.assert.*\n\t // Although, it's use is not recommended as it can leak assertions\n\t // to other tests from async tests, because we only get a reference to the current test,\n\t // not exactly the test where assertion were intended to be called.\n\n\t if (!currentTest) {\n\t throw new Error(\"assertion outside test context, in \" + sourceFromStacktrace(2));\n\t }\n\n\t if (!(assert instanceof Assert)) {\n\t assert = currentTest.assert;\n\t }\n\n\t return assert.test.pushResult(resultInfo);\n\t }\n\t }, {\n\t key: \"ok\",\n\t value: function ok(result, message) {\n\t if (!message) {\n\t message = result ? \"okay\" : \"failed, expected argument to be truthy, was: \".concat(dump.parse(result));\n\t }\n\n\t this.pushResult({\n\t result: !!result,\n\t actual: result,\n\t expected: true,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"notOk\",\n\t value: function notOk(result, message) {\n\t if (!message) {\n\t message = !result ? \"okay\" : \"failed, expected argument to be falsy, was: \".concat(dump.parse(result));\n\t }\n\n\t this.pushResult({\n\t result: !result,\n\t actual: result,\n\t expected: false,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"true\",\n\t value: function _true(result, message) {\n\t this.pushResult({\n\t result: result === true,\n\t actual: result,\n\t expected: true,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"false\",\n\t value: function _false(result, message) {\n\t this.pushResult({\n\t result: result === false,\n\t actual: result,\n\t expected: false,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"equal\",\n\t value: function equal(actual, expected, message) {\n\t // eslint-disable-next-line eqeqeq\n\t var result = expected == actual;\n\t this.pushResult({\n\t result: result,\n\t actual: actual,\n\t expected: expected,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"notEqual\",\n\t value: function notEqual(actual, expected, message) {\n\t // eslint-disable-next-line eqeqeq\n\t var result = expected != actual;\n\t this.pushResult({\n\t result: result,\n\t actual: actual,\n\t expected: expected,\n\t message: message,\n\t negative: true\n\t });\n\t }\n\t }, {\n\t key: \"propEqual\",\n\t value: function propEqual(actual, expected, message) {\n\t actual = objectValues(actual);\n\t expected = objectValues(expected);\n\t this.pushResult({\n\t result: equiv(actual, expected),\n\t actual: actual,\n\t expected: expected,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"notPropEqual\",\n\t value: function notPropEqual(actual, expected, message) {\n\t actual = objectValues(actual);\n\t expected = objectValues(expected);\n\t this.pushResult({\n\t result: !equiv(actual, expected),\n\t actual: actual,\n\t expected: expected,\n\t message: message,\n\t negative: true\n\t });\n\t }\n\t }, {\n\t key: \"deepEqual\",\n\t value: function deepEqual(actual, expected, message) {\n\t this.pushResult({\n\t result: equiv(actual, expected),\n\t actual: actual,\n\t expected: expected,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"notDeepEqual\",\n\t value: function notDeepEqual(actual, expected, message) {\n\t this.pushResult({\n\t result: !equiv(actual, expected),\n\t actual: actual,\n\t expected: expected,\n\t message: message,\n\t negative: true\n\t });\n\t }\n\t }, {\n\t key: \"strictEqual\",\n\t value: function strictEqual(actual, expected, message) {\n\t this.pushResult({\n\t result: expected === actual,\n\t actual: actual,\n\t expected: expected,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"notStrictEqual\",\n\t value: function notStrictEqual(actual, expected, message) {\n\t this.pushResult({\n\t result: expected !== actual,\n\t actual: actual,\n\t expected: expected,\n\t message: message,\n\t negative: true\n\t });\n\t }\n\t }, {\n\t key: \"throws\",\n\t value: function throws(block, expected, message) {\n\t var actual,\n\t result = false;\n\t var currentTest = this instanceof Assert && this.test || config.current; // 'expected' is optional unless doing string comparison\n\n\t if (objectType(expected) === \"string\") {\n\t if (message == null) {\n\t message = expected;\n\t expected = null;\n\t } else {\n\t throw new Error(\"throws/raises does not accept a string value for the expected argument.\\n\" + \"Use a non-string object value (e.g. regExp) instead if it's necessary.\");\n\t }\n\t }\n\n\t currentTest.ignoreGlobalErrors = true;\n\n\t try {\n\t block.call(currentTest.testEnvironment);\n\t } catch (e) {\n\t actual = e;\n\t }\n\n\t currentTest.ignoreGlobalErrors = false;\n\n\t if (actual) {\n\t var expectedType = objectType(expected); // We don't want to validate thrown error\n\n\t if (!expected) {\n\t result = true; // Expected is a regexp\n\t } else if (expectedType === \"regexp\") {\n\t result = expected.test(errorString(actual)); // Log the string form of the regexp\n\n\t expected = String(expected); // Expected is a constructor, maybe an Error constructor.\n\t // Note the extra check on its prototype - this is an implicit\n\t // requirement of \"instanceof\", else it will throw a TypeError.\n\t } else if (expectedType === \"function\" && expected.prototype !== undefined && actual instanceof expected) {\n\t result = true; // Expected is an Error object\n\t } else if (expectedType === \"object\") {\n\t result = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message; // Log the string form of the Error object\n\n\t expected = errorString(expected); // Expected is a validation function which returns true if validation passed\n\t } else if (expectedType === \"function\" && expected.call({}, actual) === true) {\n\t expected = null;\n\t result = true;\n\t }\n\t }\n\n\t currentTest.assert.pushResult({\n\t result: result,\n\t // undefined if it didn't throw\n\t actual: actual && errorString(actual),\n\t expected: expected,\n\t message: message\n\t });\n\t }\n\t }, {\n\t key: \"rejects\",\n\t value: function rejects(promise, expected, message) {\n\t var result = false;\n\t var currentTest = this instanceof Assert && this.test || config.current; // 'expected' is optional unless doing string comparison\n\n\t if (objectType(expected) === \"string\") {\n\t if (message === undefined) {\n\t message = expected;\n\t expected = undefined;\n\t } else {\n\t message = \"assert.rejects does not accept a string value for the expected \" + \"argument.\\nUse a non-string object value (e.g. validator function) instead \" + \"if necessary.\";\n\t currentTest.assert.pushResult({\n\t result: false,\n\t message: message\n\t });\n\t return;\n\t }\n\t }\n\n\t var then = promise && promise.then;\n\n\t if (objectType(then) !== \"function\") {\n\t var _message = \"The value provided to `assert.rejects` in \" + \"\\\"\" + currentTest.testName + \"\\\" was not a promise.\";\n\n\t currentTest.assert.pushResult({\n\t result: false,\n\t message: _message,\n\t actual: promise\n\t });\n\t return;\n\t }\n\n\t var done = this.async();\n\t return then.call(promise, function handleFulfillment() {\n\t var message = \"The promise returned by the `assert.rejects` callback in \" + \"\\\"\" + currentTest.testName + \"\\\" did not reject.\";\n\t currentTest.assert.pushResult({\n\t result: false,\n\t message: message,\n\t actual: promise\n\t });\n\t done();\n\t }, function handleRejection(actual) {\n\t var expectedType = objectType(expected); // We don't want to validate\n\n\t if (expected === undefined) {\n\t result = true; // Expected is a regexp\n\t } else if (expectedType === \"regexp\") {\n\t result = expected.test(errorString(actual)); // Log the string form of the regexp\n\n\t expected = String(expected); // Expected is a constructor, maybe an Error constructor\n\t } else if (expectedType === \"function\" && actual instanceof expected) {\n\t result = true; // Expected is an Error object\n\t } else if (expectedType === \"object\") {\n\t result = actual instanceof expected.constructor && actual.name === expected.name && actual.message === expected.message; // Log the string form of the Error object\n\n\t expected = errorString(expected); // Expected is a validation function which returns true if validation passed\n\t } else {\n\t if (expectedType === \"function\") {\n\t result = expected.call({}, actual) === true;\n\t expected = null; // Expected is some other invalid type\n\t } else {\n\t result = false;\n\t message = \"invalid expected value provided to `assert.rejects` \" + \"callback in \\\"\" + currentTest.testName + \"\\\": \" + expectedType + \".\";\n\t }\n\t }\n\n\t currentTest.assert.pushResult({\n\t result: result,\n\t // leave rejection value of undefined as-is\n\t actual: actual && errorString(actual),\n\t expected: expected,\n\t message: message\n\t });\n\t done();\n\t });\n\t }\n\t }]);\n\n\t return Assert;\n\t}(); // Provide an alternative to assert.throws(), for environments that consider throws a reserved word\n\t// Known to us are: Closure Compiler, Narwhal\n\t// eslint-disable-next-line dot-notation\n\n\n\tAssert.prototype.raises = Assert.prototype[\"throws\"];\n\t/**\n\t * Converts an error into a simple string for comparisons.\n\t *\n\t * @param {Error|Object} error\n\t * @return {String}\n\t */\n\n\tfunction errorString(error) {\n\t var resultErrorString = error.toString(); // If the error wasn't a subclass of Error but something like\n\t // an object literal with name and message properties...\n\n\t if (resultErrorString.substring(0, 7) === \"[object\") {\n\t var name = error.name ? error.name.toString() : \"Error\";\n\t var message = error.message ? error.message.toString() : \"\";\n\n\t if (name && message) {\n\t return \"\".concat(name, \": \").concat(message);\n\t } else if (name) {\n\t return name;\n\t } else if (message) {\n\t return message;\n\t } else {\n\t return \"Error\";\n\t }\n\t } else {\n\t return resultErrorString;\n\t }\n\t}\n\n\t/* global module, exports, define */\n\tfunction exportQUnit(QUnit) {\n\t if (window$1 && document$1) {\n\t // QUnit may be defined when it is preconfigured but then only QUnit and QUnit.config may be defined.\n\t if (window$1.QUnit && window$1.QUnit.version) {\n\t throw new Error(\"QUnit has already been defined.\");\n\t }\n\n\t window$1.QUnit = QUnit;\n\t } // For nodejs\n\n\n\t if (typeof module !== \"undefined\" && module && module.exports) {\n\t module.exports = QUnit; // For consistency with CommonJS environments' exports\n\n\t module.exports.QUnit = QUnit;\n\t } // For CommonJS with exports, but without module.exports, like Rhino\n\n\n\t if (typeof exports !== \"undefined\" && exports) {\n\t exports.QUnit = QUnit;\n\t }\n\n\t if (typeof define === \"function\" && define.amd) {\n\t define(function () {\n\t return QUnit;\n\t });\n\t QUnit.config.autostart = false;\n\t } // For Web/Service Workers\n\n\n\t if (self$1 && self$1.WorkerGlobalScope && self$1 instanceof self$1.WorkerGlobalScope) {\n\t self$1.QUnit = QUnit;\n\t }\n\t}\n\n\t// error handling should be suppressed and false otherwise.\n\t// In this case, we will only suppress further error handling if the\n\t// \"ignoreGlobalErrors\" configuration option is enabled.\n\n\tfunction onError(error) {\n\t for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n\t args[_key - 1] = arguments[_key];\n\t }\n\n\t if (config.current) {\n\t if (config.current.ignoreGlobalErrors) {\n\t return true;\n\t }\n\n\t pushFailure.apply(void 0, [error.message, error.stacktrace || error.fileName + \":\" + error.lineNumber].concat(args));\n\t } else {\n\t test(\"global failure\", extend(function () {\n\t pushFailure.apply(void 0, [error.message, error.stacktrace || error.fileName + \":\" + error.lineNumber].concat(args));\n\t }, {\n\t validTest: true\n\t }));\n\t }\n\n\t return false;\n\t}\n\n\tfunction onUnhandledRejection(reason) {\n\t var resultInfo = {\n\t result: false,\n\t message: reason.message || \"error\",\n\t actual: reason,\n\t source: reason.stack || sourceFromStacktrace(3)\n\t };\n\t var currentTest = config.current;\n\n\t if (currentTest) {\n\t currentTest.assert.pushResult(resultInfo);\n\t } else {\n\t test(\"global failure\", extend(function (assert) {\n\t assert.pushResult(resultInfo);\n\t }, {\n\t validTest: true\n\t }));\n\t }\n\t}\n\n\tvar QUnit = {};\n\tvar globalSuite = new SuiteReport(); // The initial \"currentModule\" represents the global (or top-level) module that\n\t// is not explicitly defined by the user, therefore we add the \"globalSuite\" to\n\t// it since each module has a suiteReport associated with it.\n\n\tconfig.currentModule.suiteReport = globalSuite;\n\tvar globalStartCalled = false;\n\tvar runStarted = false; // Figure out if we're running the tests from a server or not\n\n\tQUnit.isLocal = window$1 && window$1.location && window$1.location.protocol === \"file:\"; // Expose the current QUnit version\n\n\tQUnit.version = \"2.12.0\";\n\n\textend(QUnit, {\n\t on: on,\n\t module: module$1,\n\t test: test,\n\t // alias other test flavors for easy access\n\t todo: test.todo,\n\t skip: test.skip,\n\t only: test.only,\n\t start: function start(count) {\n\t var globalStartAlreadyCalled = globalStartCalled;\n\n\t if (!config.current) {\n\t globalStartCalled = true;\n\n\t if (runStarted) {\n\t throw new Error(\"Called start() while test already started running\");\n\t } else if (globalStartAlreadyCalled || count > 1) {\n\t throw new Error(\"Called start() outside of a test context too many times\");\n\t } else if (config.autostart) {\n\t throw new Error(\"Called start() outside of a test context when \" + \"QUnit.config.autostart was true\");\n\t } else if (!config.pageLoaded) {\n\t // The page isn't completely loaded yet, so we set autostart and then\n\t // load if we're in Node or wait for the browser's load event.\n\t config.autostart = true; // Starts from Node even if .load was not previously called. We still return\n\t // early otherwise we'll wind up \"beginning\" twice.\n\n\t if (!document$1) {\n\t QUnit.load();\n\t }\n\n\t return;\n\t }\n\t } else {\n\t throw new Error(\"QUnit.start cannot be called inside a test context.\");\n\t }\n\n\t scheduleBegin();\n\t },\n\t config: config,\n\t is: is,\n\t objectType: objectType,\n\t extend: function extend$1() {\n\t Logger.warn(\"QUnit.extend is deprecated and will be removed in QUnit 3.0.\" + \" Please use Object.assign instead.\"); // delegate to utility implementation, which does not warn and can be used elsewhere internally\n\n\t for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n\t args[_key] = arguments[_key];\n\t }\n\n\t return extend.apply(this, args);\n\t },\n\t load: function load() {\n\t config.pageLoaded = true; // Initialize the configuration options\n\n\t extend(config, {\n\t stats: {\n\t all: 0,\n\t bad: 0,\n\t testCount: 0\n\t },\n\t started: 0,\n\t updateRate: 1000,\n\t autostart: true,\n\t filter: \"\"\n\t }, true);\n\n\t if (!runStarted) {\n\t config.blocking = false;\n\n\t if (config.autostart) {\n\t scheduleBegin();\n\t }\n\t }\n\t },\n\t stack: function stack(offset) {\n\t offset = (offset || 0) + 2;\n\t return sourceFromStacktrace(offset);\n\t },\n\t onError: onError,\n\t onUnhandledRejection: onUnhandledRejection\n\t});\n\n\tQUnit.pushFailure = pushFailure;\n\tQUnit.assert = Assert.prototype;\n\tQUnit.equiv = equiv;\n\tQUnit.dump = dump;\n\tregisterLoggingCallbacks(QUnit);\n\n\tfunction scheduleBegin() {\n\t runStarted = true; // Add a slight delay to allow definition of more modules and tests.\n\n\t if (setTimeout$1) {\n\t setTimeout$1(function () {\n\t begin();\n\t });\n\t } else {\n\t begin();\n\t }\n\t}\n\n\tfunction unblockAndAdvanceQueue() {\n\t config.blocking = false;\n\t ProcessingQueue.advance();\n\t}\n\n\tfunction begin() {\n\t var i,\n\t l,\n\t modulesLog = []; // If the test run hasn't officially begun yet\n\n\t if (!config.started) {\n\t // Record the time of the test run's beginning\n\t config.started = now(); // Delete the loose unnamed module if unused.\n\n\t if (config.modules[0].name === \"\" && config.modules[0].tests.length === 0) {\n\t config.modules.shift();\n\t } // Avoid unnecessary information by not logging modules' test environments\n\n\n\t for (i = 0, l = config.modules.length; i < l; i++) {\n\t modulesLog.push({\n\t name: config.modules[i].name,\n\t tests: config.modules[i].tests\n\t });\n\t } // The test run is officially beginning now\n\n\n\t emit(\"runStart\", globalSuite.start(true));\n\t runLoggingCallbacks(\"begin\", {\n\t totalTests: Test.count,\n\t modules: modulesLog\n\t }).then(unblockAndAdvanceQueue);\n\t } else {\n\t unblockAndAdvanceQueue();\n\t }\n\t}\n\texportQUnit(QUnit);\n\n\t(function () {\n\t if (!window$1 || !document$1) {\n\t return;\n\t }\n\n\t var config = QUnit.config,\n\t hasOwn = Object.prototype.hasOwnProperty; // Stores fixture HTML for resetting later\n\n\t function storeFixture() {\n\t // Avoid overwriting user-defined values\n\t if (hasOwn.call(config, \"fixture\")) {\n\t return;\n\t }\n\n\t var fixture = document$1.getElementById(\"qunit-fixture\");\n\n\t if (fixture) {\n\t config.fixture = fixture.cloneNode(true);\n\t }\n\t }\n\n\t QUnit.begin(storeFixture); // Resets the fixture DOM element if available.\n\n\t function resetFixture() {\n\t if (config.fixture == null) {\n\t return;\n\t }\n\n\t var fixture = document$1.getElementById(\"qunit-fixture\");\n\n\t var resetFixtureType = _typeof(config.fixture);\n\n\t if (resetFixtureType === \"string\") {\n\t // support user defined values for `config.fixture`\n\t var newFixture = document$1.createElement(\"div\");\n\t newFixture.setAttribute(\"id\", \"qunit-fixture\");\n\t newFixture.innerHTML = config.fixture;\n\t fixture.parentNode.replaceChild(newFixture, fixture);\n\t } else {\n\t var clonedFixture = config.fixture.cloneNode(true);\n\t fixture.parentNode.replaceChild(clonedFixture, fixture);\n\t }\n\t }\n\n\t QUnit.testStart(resetFixture);\n\t})();\n\n\t(function () {\n\t // Only interact with URLs via window.location\n\t var location = typeof window$1 !== \"undefined\" && window$1.location;\n\n\t if (!location) {\n\t return;\n\t }\n\n\t var urlParams = getUrlParams();\n\t QUnit.urlParams = urlParams; // Match module/test by inclusion in an array\n\n\t QUnit.config.moduleId = [].concat(urlParams.moduleId || []);\n\t QUnit.config.testId = [].concat(urlParams.testId || []); // Exact case-insensitive match of the module name\n\n\t QUnit.config.module = urlParams.module; // Regular expression or case-insenstive substring match against \"moduleName: testName\"\n\n\t QUnit.config.filter = urlParams.filter; // Test order randomization\n\n\t if (urlParams.seed === true) {\n\t // Generate a random seed if the option is specified without a value\n\t QUnit.config.seed = Math.random().toString(36).slice(2);\n\t } else if (urlParams.seed) {\n\t QUnit.config.seed = urlParams.seed;\n\t } // Add URL-parameter-mapped config values with UI form rendering data\n\n\n\t QUnit.config.urlConfig.push({\n\t id: \"hidepassed\",\n\t label: \"Hide passed tests\",\n\t tooltip: \"Only show tests and assertions that fail. Stored as query-strings.\"\n\t }, {\n\t id: \"noglobals\",\n\t label: \"Check for Globals\",\n\t tooltip: \"Enabling this will test if any test introduces new properties on the \" + \"global object (`window` in Browsers). Stored as query-strings.\"\n\t }, {\n\t id: \"notrycatch\",\n\t label: \"No try-catch\",\n\t tooltip: \"Enabling this will run tests outside of a try-catch block. Makes debugging \" + \"exceptions in IE reasonable. Stored as query-strings.\"\n\t });\n\t QUnit.begin(function () {\n\t var i,\n\t option,\n\t urlConfig = QUnit.config.urlConfig;\n\n\t for (i = 0; i < urlConfig.length; i++) {\n\t // Options can be either strings or objects with nonempty \"id\" properties\n\t option = QUnit.config.urlConfig[i];\n\n\t if (typeof option !== \"string\") {\n\t option = option.id;\n\t }\n\n\t if (QUnit.config[option] === undefined) {\n\t QUnit.config[option] = urlParams[option];\n\t }\n\t }\n\t });\n\n\t function getUrlParams() {\n\t var i, param, name, value;\n\t var urlParams = Object.create(null);\n\t var params = location.search.slice(1).split(\"&\");\n\t var length = params.length;\n\n\t for (i = 0; i < length; i++) {\n\t if (params[i]) {\n\t param = params[i].split(\"=\");\n\t name = decodeQueryParam(param[0]); // Allow just a key to turn on a flag, e.g., test.html?noglobals\n\n\t value = param.length === 1 || decodeQueryParam(param.slice(1).join(\"=\"));\n\n\t if (name in urlParams) {\n\t urlParams[name] = [].concat(urlParams[name], value);\n\t } else {\n\t urlParams[name] = value;\n\t }\n\t }\n\t }\n\n\t return urlParams;\n\t }\n\n\t function decodeQueryParam(param) {\n\t return decodeURIComponent(param.replace(/\\+/g, \"%20\"));\n\t }\n\t})();\n\n\tvar fuzzysort = createCommonjsModule(function (module) {\n\n\t (function (root, UMD) {\n\t if ( module.exports) module.exports = UMD();else root.fuzzysort = UMD();\n\t })(commonjsGlobal, function UMD() {\n\t function fuzzysortNew(instanceOptions) {\n\t var fuzzysort = {\n\t single: function (search, target, options) {\n\t if (!search) return null;\n\t if (!isObj(search)) search = fuzzysort.getPreparedSearch(search);\n\t if (!target) return null;\n\t if (!isObj(target)) target = fuzzysort.getPrepared(target);\n\t var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true;\n\t var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo;\n\t return algorithm(search, target, search[0]); // var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991\n\t // var result = algorithm(search, target, search[0])\n\t // if(result === null) return null\n\t // if(result.score < threshold) return null\n\t // return result\n\t },\n\t go: function (search, targets, options) {\n\t if (!search) return noResults;\n\t search = fuzzysort.prepareSearch(search);\n\t var searchLowerCode = search[0];\n\t var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991;\n\t var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991;\n\t var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true;\n\t var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo;\n\t var resultsLen = 0;\n\t var limitedCount = 0;\n\t var targetsLen = targets.length; // This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]\n\t // options.keys\n\n\t if (options && options.keys) {\n\t var scoreFn = options.scoreFn || defaultScoreFn;\n\t var keys = options.keys;\n\t var keysLen = keys.length;\n\n\t for (var i = targetsLen - 1; i >= 0; --i) {\n\t var obj = targets[i];\n\t var objResults = new Array(keysLen);\n\n\t for (var keyI = keysLen - 1; keyI >= 0; --keyI) {\n\t var key = keys[keyI];\n\t var target = getValue(obj, key);\n\n\t if (!target) {\n\t objResults[keyI] = null;\n\t continue;\n\t }\n\n\t if (!isObj(target)) target = fuzzysort.getPrepared(target);\n\t objResults[keyI] = algorithm(search, target, searchLowerCode);\n\t }\n\n\t objResults.obj = obj; // before scoreFn so scoreFn can use it\n\n\t var score = scoreFn(objResults);\n\t if (score === null) continue;\n\t if (score < threshold) continue;\n\t objResults.score = score;\n\n\t if (resultsLen < limit) {\n\t q.add(objResults);\n\t ++resultsLen;\n\t } else {\n\t ++limitedCount;\n\t if (score > q.peek().score) q.replaceTop(objResults);\n\t }\n\t } // options.key\n\n\t } else if (options && options.key) {\n\t var key = options.key;\n\n\t for (var i = targetsLen - 1; i >= 0; --i) {\n\t var obj = targets[i];\n\t var target = getValue(obj, key);\n\t if (!target) continue;\n\t if (!isObj(target)) target = fuzzysort.getPrepared(target);\n\t var result = algorithm(search, target, searchLowerCode);\n\t if (result === null) continue;\n\t if (result.score < threshold) continue; // have to clone result so duplicate targets from different obj can each reference the correct obj\n\n\t result = {\n\t target: result.target,\n\t _targetLowerCodes: null,\n\t _nextBeginningIndexes: null,\n\t score: result.score,\n\t indexes: result.indexes,\n\t obj: obj\n\t }; // hidden\n\n\t if (resultsLen < limit) {\n\t q.add(result);\n\t ++resultsLen;\n\t } else {\n\t ++limitedCount;\n\t if (result.score > q.peek().score) q.replaceTop(result);\n\t }\n\t } // no keys\n\n\t } else {\n\t for (var i = targetsLen - 1; i >= 0; --i) {\n\t var target = targets[i];\n\t if (!target) continue;\n\t if (!isObj(target)) target = fuzzysort.getPrepared(target);\n\t var result = algorithm(search, target, searchLowerCode);\n\t if (result === null) continue;\n\t if (result.score < threshold) continue;\n\n\t if (resultsLen < limit) {\n\t q.add(result);\n\t ++resultsLen;\n\t } else {\n\t ++limitedCount;\n\t if (result.score > q.peek().score) q.replaceTop(result);\n\t }\n\t }\n\t }\n\n\t if (resultsLen === 0) return noResults;\n\t var results = new Array(resultsLen);\n\n\t for (var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll();\n\n\t results.total = resultsLen + limitedCount;\n\t return results;\n\t },\n\t goAsync: function (search, targets, options) {\n\t var canceled = false;\n\t var p = new Promise(function (resolve, reject) {\n\t if (!search) return resolve(noResults);\n\t search = fuzzysort.prepareSearch(search);\n\t var searchLowerCode = search[0];\n\t var q = fastpriorityqueue();\n\t var iCurrent = targets.length - 1;\n\t var threshold = options && options.threshold || instanceOptions && instanceOptions.threshold || -9007199254740991;\n\t var limit = options && options.limit || instanceOptions && instanceOptions.limit || 9007199254740991;\n\t var allowTypo = options && options.allowTypo !== undefined ? options.allowTypo : instanceOptions && instanceOptions.allowTypo !== undefined ? instanceOptions.allowTypo : true;\n\t var algorithm = allowTypo ? fuzzysort.algorithm : fuzzysort.algorithmNoTypo;\n\t var resultsLen = 0;\n\t var limitedCount = 0;\n\n\t function step() {\n\t if (canceled) return reject('canceled');\n\t var startMs = Date.now(); // This code is copy/pasted 3 times for performance reasons [options.keys, options.key, no keys]\n\t // options.keys\n\n\t if (options && options.keys) {\n\t var scoreFn = options.scoreFn || defaultScoreFn;\n\t var keys = options.keys;\n\t var keysLen = keys.length;\n\n\t for (; iCurrent >= 0; --iCurrent) {\n\t var obj = targets[iCurrent];\n\t var objResults = new Array(keysLen);\n\n\t for (var keyI = keysLen - 1; keyI >= 0; --keyI) {\n\t var key = keys[keyI];\n\t var target = getValue(obj, key);\n\n\t if (!target) {\n\t objResults[keyI] = null;\n\t continue;\n\t }\n\n\t if (!isObj(target)) target = fuzzysort.getPrepared(target);\n\t objResults[keyI] = algorithm(search, target, searchLowerCode);\n\t }\n\n\t objResults.obj = obj; // before scoreFn so scoreFn can use it\n\n\t var score = scoreFn(objResults);\n\t if (score === null) continue;\n\t if (score < threshold) continue;\n\t objResults.score = score;\n\n\t if (resultsLen < limit) {\n\t q.add(objResults);\n\t ++resultsLen;\n\t } else {\n\t ++limitedCount;\n\t if (score > q.peek().score) q.replaceTop(objResults);\n\t }\n\n\t if (iCurrent % 1000\n\t /*itemsPerCheck*/\n\t === 0) {\n\t if (Date.now() - startMs >= 10\n\t /*asyncInterval*/\n\t ) {\n\t isNode ? setImmediate(step) : setTimeout(step);\n\t return;\n\t }\n\t }\n\t } // options.key\n\n\t } else if (options && options.key) {\n\t var key = options.key;\n\n\t for (; iCurrent >= 0; --iCurrent) {\n\t var obj = targets[iCurrent];\n\t var target = getValue(obj, key);\n\t if (!target) continue;\n\t if (!isObj(target)) target = fuzzysort.getPrepared(target);\n\t var result = algorithm(search, target, searchLowerCode);\n\t if (result === null) continue;\n\t if (result.score < threshold) continue; // have to clone result so duplicate targets from different obj can each reference the correct obj\n\n\t result = {\n\t target: result.target,\n\t _targetLowerCodes: null,\n\t _nextBeginningIndexes: null,\n\t score: result.score,\n\t indexes: result.indexes,\n\t obj: obj\n\t }; // hidden\n\n\t if (resultsLen < limit) {\n\t q.add(result);\n\t ++resultsLen;\n\t } else {\n\t ++limitedCount;\n\t if (result.score > q.peek().score) q.replaceTop(result);\n\t }\n\n\t if (iCurrent % 1000\n\t /*itemsPerCheck*/\n\t === 0) {\n\t if (Date.now() - startMs >= 10\n\t /*asyncInterval*/\n\t ) {\n\t isNode ? setImmediate(step) : setTimeout(step);\n\t return;\n\t }\n\t }\n\t } // no keys\n\n\t } else {\n\t for (; iCurrent >= 0; --iCurrent) {\n\t var target = targets[iCurrent];\n\t if (!target) continue;\n\t if (!isObj(target)) target = fuzzysort.getPrepared(target);\n\t var result = algorithm(search, target, searchLowerCode);\n\t if (result === null) continue;\n\t if (result.score < threshold) continue;\n\n\t if (resultsLen < limit) {\n\t q.add(result);\n\t ++resultsLen;\n\t } else {\n\t ++limitedCount;\n\t if (result.score > q.peek().score) q.replaceTop(result);\n\t }\n\n\t if (iCurrent % 1000\n\t /*itemsPerCheck*/\n\t === 0) {\n\t if (Date.now() - startMs >= 10\n\t /*asyncInterval*/\n\t ) {\n\t isNode ? setImmediate(step) : setTimeout(step);\n\t return;\n\t }\n\t }\n\t }\n\t }\n\n\t if (resultsLen === 0) return resolve(noResults);\n\t var results = new Array(resultsLen);\n\n\t for (var i = resultsLen - 1; i >= 0; --i) results[i] = q.poll();\n\n\t results.total = resultsLen + limitedCount;\n\t resolve(results);\n\t }\n\n\t isNode ? setImmediate(step) : step();\n\t });\n\n\t p.cancel = function () {\n\t canceled = true;\n\t };\n\n\t return p;\n\t },\n\t highlight: function (result, hOpen, hClose) {\n\t if (result === null) return null;\n\t if (hOpen === undefined) hOpen = '';\n\t if (hClose === undefined) hClose = '';\n\t var highlighted = '';\n\t var matchesIndex = 0;\n\t var opened = false;\n\t var target = result.target;\n\t var targetLen = target.length;\n\t var matchesBest = result.indexes;\n\n\t for (var i = 0; i < targetLen; ++i) {\n\t var char = target[i];\n\n\t if (matchesBest[matchesIndex] === i) {\n\t ++matchesIndex;\n\n\t if (!opened) {\n\t opened = true;\n\t highlighted += hOpen;\n\t }\n\n\t if (matchesIndex === matchesBest.length) {\n\t highlighted += char + hClose + target.substr(i + 1);\n\t break;\n\t }\n\t } else {\n\t if (opened) {\n\t opened = false;\n\t highlighted += hClose;\n\t }\n\t }\n\n\t highlighted += char;\n\t }\n\n\t return highlighted;\n\t },\n\t prepare: function (target) {\n\t if (!target) return;\n\t return {\n\t target: target,\n\t _targetLowerCodes: fuzzysort.prepareLowerCodes(target),\n\t _nextBeginningIndexes: null,\n\t score: null,\n\t indexes: null,\n\t obj: null\n\t }; // hidden\n\t },\n\t prepareSlow: function (target) {\n\t if (!target) return;\n\t return {\n\t target: target,\n\t _targetLowerCodes: fuzzysort.prepareLowerCodes(target),\n\t _nextBeginningIndexes: fuzzysort.prepareNextBeginningIndexes(target),\n\t score: null,\n\t indexes: null,\n\t obj: null\n\t }; // hidden\n\t },\n\t prepareSearch: function (search) {\n\t if (!search) return;\n\t return fuzzysort.prepareLowerCodes(search);\n\t },\n\t // Below this point is only internal code\n\t // Below this point is only internal code\n\t // Below this point is only internal code\n\t // Below this point is only internal code\n\t getPrepared: function (target) {\n\t if (target.length > 999) return fuzzysort.prepare(target); // don't cache huge targets\n\n\t var targetPrepared = preparedCache.get(target);\n\t if (targetPrepared !== undefined) return targetPrepared;\n\t targetPrepared = fuzzysort.prepare(target);\n\t preparedCache.set(target, targetPrepared);\n\t return targetPrepared;\n\t },\n\t getPreparedSearch: function (search) {\n\t if (search.length > 999) return fuzzysort.prepareSearch(search); // don't cache huge searches\n\n\t var searchPrepared = preparedSearchCache.get(search);\n\t if (searchPrepared !== undefined) return searchPrepared;\n\t searchPrepared = fuzzysort.prepareSearch(search);\n\t preparedSearchCache.set(search, searchPrepared);\n\t return searchPrepared;\n\t },\n\t algorithm: function (searchLowerCodes, prepared, searchLowerCode) {\n\t var targetLowerCodes = prepared._targetLowerCodes;\n\t var searchLen = searchLowerCodes.length;\n\t var targetLen = targetLowerCodes.length;\n\t var searchI = 0; // where we at\n\n\t var targetI = 0; // where you at\n\n\t var typoSimpleI = 0;\n\t var matchesSimpleLen = 0; // very basic fuzzy match; to remove non-matching targets ASAP!\n\t // walk through target. find sequential matches.\n\t // if all chars aren't found then exit\n\n\t for (;;) {\n\t var isMatch = searchLowerCode === targetLowerCodes[targetI];\n\n\t if (isMatch) {\n\t matchesSimple[matchesSimpleLen++] = targetI;\n\t ++searchI;\n\t if (searchI === searchLen) break;\n\t searchLowerCode = searchLowerCodes[typoSimpleI === 0 ? searchI : typoSimpleI === searchI ? searchI + 1 : typoSimpleI === searchI - 1 ? searchI - 1 : searchI];\n\t }\n\n\t ++targetI;\n\n\t if (targetI >= targetLen) {\n\t // Failed to find searchI\n\t // Check for typo or exit\n\t // we go as far as possible before trying to transpose\n\t // then we transpose backwards until we reach the beginning\n\t for (;;) {\n\t if (searchI <= 1) return null; // not allowed to transpose first char\n\n\t if (typoSimpleI === 0) {\n\t // we haven't tried to transpose yet\n\t --searchI;\n\t var searchLowerCodeNew = searchLowerCodes[searchI];\n\t if (searchLowerCode === searchLowerCodeNew) continue; // doesn't make sense to transpose a repeat char\n\n\t typoSimpleI = searchI;\n\t } else {\n\t if (typoSimpleI === 1) return null; // reached the end of the line for transposing\n\n\t --typoSimpleI;\n\t searchI = typoSimpleI;\n\t searchLowerCode = searchLowerCodes[searchI + 1];\n\t var searchLowerCodeNew = searchLowerCodes[searchI];\n\t if (searchLowerCode === searchLowerCodeNew) continue; // doesn't make sense to transpose a repeat char\n\t }\n\n\t matchesSimpleLen = searchI;\n\t targetI = matchesSimple[matchesSimpleLen - 1] + 1;\n\t break;\n\t }\n\t }\n\t }\n\n\t var searchI = 0;\n\t var typoStrictI = 0;\n\t var successStrict = false;\n\t var matchesStrictLen = 0;\n\t var nextBeginningIndexes = prepared._nextBeginningIndexes;\n\t if (nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target);\n\t var firstPossibleI = targetI = matchesSimple[0] === 0 ? 0 : nextBeginningIndexes[matchesSimple[0] - 1]; // Our target string successfully matched all characters in sequence!\n\t // Let's try a more advanced and strict test to improve the score\n\t // only count it as a match if it's consecutive or a beginning character!\n\n\t if (targetI !== targetLen) for (;;) {\n\t if (targetI >= targetLen) {\n\t // We failed to find a good spot for this search char, go back to the previous search char and force it forward\n\t if (searchI <= 0) {\n\t // We failed to push chars forward for a better match\n\t // transpose, starting from the beginning\n\t ++typoStrictI;\n\t if (typoStrictI > searchLen - 2) break;\n\t if (searchLowerCodes[typoStrictI] === searchLowerCodes[typoStrictI + 1]) continue; // doesn't make sense to transpose a repeat char\n\n\t targetI = firstPossibleI;\n\t continue;\n\t }\n\n\t --searchI;\n\t var lastMatch = matchesStrict[--matchesStrictLen];\n\t targetI = nextBeginningIndexes[lastMatch];\n\t } else {\n\t var isMatch = searchLowerCodes[typoStrictI === 0 ? searchI : typoStrictI === searchI ? searchI + 1 : typoStrictI === searchI - 1 ? searchI - 1 : searchI] === targetLowerCodes[targetI];\n\n\t if (isMatch) {\n\t matchesStrict[matchesStrictLen++] = targetI;\n\t ++searchI;\n\n\t if (searchI === searchLen) {\n\t successStrict = true;\n\t break;\n\t }\n\n\t ++targetI;\n\t } else {\n\t targetI = nextBeginningIndexes[targetI];\n\t }\n\t }\n\t }\n\t {\n\t // tally up the score & keep track of matches for highlighting later\n\t if (successStrict) {\n\t var matchesBest = matchesStrict;\n\t var matchesBestLen = matchesStrictLen;\n\t } else {\n\t var matchesBest = matchesSimple;\n\t var matchesBestLen = matchesSimpleLen;\n\t }\n\n\t var score = 0;\n\t var lastTargetI = -1;\n\n\t for (var i = 0; i < searchLen; ++i) {\n\t var targetI = matchesBest[i]; // score only goes down if they're not consecutive\n\n\t if (lastTargetI !== targetI - 1) score -= targetI;\n\t lastTargetI = targetI;\n\t }\n\n\t if (!successStrict) {\n\t score *= 1000;\n\t if (typoSimpleI !== 0) score += -20;\n\t /*typoPenalty*/\n\t } else {\n\t if (typoStrictI !== 0) score += -20;\n\t /*typoPenalty*/\n\t }\n\n\t score -= targetLen - searchLen;\n\t prepared.score = score;\n\t prepared.indexes = new Array(matchesBestLen);\n\n\t for (var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i];\n\n\t return prepared;\n\t }\n\t },\n\t algorithmNoTypo: function (searchLowerCodes, prepared, searchLowerCode) {\n\t var targetLowerCodes = prepared._targetLowerCodes;\n\t var searchLen = searchLowerCodes.length;\n\t var targetLen = targetLowerCodes.length;\n\t var searchI = 0; // where we at\n\n\t var targetI = 0; // where you at\n\n\t var matchesSimpleLen = 0; // very basic fuzzy match; to remove non-matching targets ASAP!\n\t // walk through target. find sequential matches.\n\t // if all chars aren't found then exit\n\n\t for (;;) {\n\t var isMatch = searchLowerCode === targetLowerCodes[targetI];\n\n\t if (isMatch) {\n\t matchesSimple[matchesSimpleLen++] = targetI;\n\t ++searchI;\n\t if (searchI === searchLen) break;\n\t searchLowerCode = searchLowerCodes[searchI];\n\t }\n\n\t ++targetI;\n\t if (targetI >= targetLen) return null; // Failed to find searchI\n\t }\n\n\t var searchI = 0;\n\t var successStrict = false;\n\t var matchesStrictLen = 0;\n\t var nextBeginningIndexes = prepared._nextBeginningIndexes;\n\t if (nextBeginningIndexes === null) nextBeginningIndexes = prepared._nextBeginningIndexes = fuzzysort.prepareNextBeginningIndexes(prepared.target);\n\t var firstPossibleI = targetI = matchesSimple[0] === 0 ? 0 : nextBeginningIndexes[matchesSimple[0] - 1]; // Our target string successfully matched all characters in sequence!\n\t // Let's try a more advanced and strict test to improve the score\n\t // only count it as a match if it's consecutive or a beginning character!\n\n\t if (targetI !== targetLen) for (;;) {\n\t if (targetI >= targetLen) {\n\t // We failed to find a good spot for this search char, go back to the previous search char and force it forward\n\t if (searchI <= 0) break; // We failed to push chars forward for a better match\n\n\t --searchI;\n\t var lastMatch = matchesStrict[--matchesStrictLen];\n\t targetI = nextBeginningIndexes[lastMatch];\n\t } else {\n\t var isMatch = searchLowerCodes[searchI] === targetLowerCodes[targetI];\n\n\t if (isMatch) {\n\t matchesStrict[matchesStrictLen++] = targetI;\n\t ++searchI;\n\n\t if (searchI === searchLen) {\n\t successStrict = true;\n\t break;\n\t }\n\n\t ++targetI;\n\t } else {\n\t targetI = nextBeginningIndexes[targetI];\n\t }\n\t }\n\t }\n\t {\n\t // tally up the score & keep track of matches for highlighting later\n\t if (successStrict) {\n\t var matchesBest = matchesStrict;\n\t var matchesBestLen = matchesStrictLen;\n\t } else {\n\t var matchesBest = matchesSimple;\n\t var matchesBestLen = matchesSimpleLen;\n\t }\n\n\t var score = 0;\n\t var lastTargetI = -1;\n\n\t for (var i = 0; i < searchLen; ++i) {\n\t var targetI = matchesBest[i]; // score only goes down if they're not consecutive\n\n\t if (lastTargetI !== targetI - 1) score -= targetI;\n\t lastTargetI = targetI;\n\t }\n\n\t if (!successStrict) score *= 1000;\n\t score -= targetLen - searchLen;\n\t prepared.score = score;\n\t prepared.indexes = new Array(matchesBestLen);\n\n\t for (var i = matchesBestLen - 1; i >= 0; --i) prepared.indexes[i] = matchesBest[i];\n\n\t return prepared;\n\t }\n\t },\n\t prepareLowerCodes: function (str) {\n\t var strLen = str.length;\n\t var lowerCodes = []; // new Array(strLen) sparse array is too slow\n\n\t var lower = str.toLowerCase();\n\n\t for (var i = 0; i < strLen; ++i) lowerCodes[i] = lower.charCodeAt(i);\n\n\t return lowerCodes;\n\t },\n\t prepareBeginningIndexes: function (target) {\n\t var targetLen = target.length;\n\t var beginningIndexes = [];\n\t var beginningIndexesLen = 0;\n\t var wasUpper = false;\n\t var wasAlphanum = false;\n\n\t for (var i = 0; i < targetLen; ++i) {\n\t var targetCode = target.charCodeAt(i);\n\t var isUpper = targetCode >= 65 && targetCode <= 90;\n\t var isAlphanum = isUpper || targetCode >= 97 && targetCode <= 122 || targetCode >= 48 && targetCode <= 57;\n\t var isBeginning = isUpper && !wasUpper || !wasAlphanum || !isAlphanum;\n\t wasUpper = isUpper;\n\t wasAlphanum = isAlphanum;\n\t if (isBeginning) beginningIndexes[beginningIndexesLen++] = i;\n\t }\n\n\t return beginningIndexes;\n\t },\n\t prepareNextBeginningIndexes: function (target) {\n\t var targetLen = target.length;\n\t var beginningIndexes = fuzzysort.prepareBeginningIndexes(target);\n\t var nextBeginningIndexes = []; // new Array(targetLen) sparse array is too slow\n\n\t var lastIsBeginning = beginningIndexes[0];\n\t var lastIsBeginningI = 0;\n\n\t for (var i = 0; i < targetLen; ++i) {\n\t if (lastIsBeginning > i) {\n\t nextBeginningIndexes[i] = lastIsBeginning;\n\t } else {\n\t lastIsBeginning = beginningIndexes[++lastIsBeginningI];\n\t nextBeginningIndexes[i] = lastIsBeginning === undefined ? targetLen : lastIsBeginning;\n\t }\n\t }\n\n\t return nextBeginningIndexes;\n\t },\n\t cleanup: cleanup,\n\t new: fuzzysortNew\n\t };\n\t return fuzzysort;\n\t } // fuzzysortNew\n\t // This stuff is outside fuzzysortNew, because it's shared with instances of fuzzysort.new()\n\n\n\t var isNode = typeof commonjsRequire !== 'undefined' && typeof window === 'undefined'; // var MAX_INT = Number.MAX_SAFE_INTEGER\n\t // var MIN_INT = Number.MIN_VALUE\n\n\t var preparedCache = new Map();\n\t var preparedSearchCache = new Map();\n\t var noResults = [];\n\t noResults.total = 0;\n\t var matchesSimple = [];\n\t var matchesStrict = [];\n\n\t function cleanup() {\n\t preparedCache.clear();\n\t preparedSearchCache.clear();\n\t matchesSimple = [];\n\t matchesStrict = [];\n\t }\n\n\t function defaultScoreFn(a) {\n\t var max = -9007199254740991;\n\n\t for (var i = a.length - 1; i >= 0; --i) {\n\t var result = a[i];\n\t if (result === null) continue;\n\t var score = result.score;\n\t if (score > max) max = score;\n\t }\n\n\t if (max === -9007199254740991) return null;\n\t return max;\n\t } // prop = 'key' 2.5ms optimized for this case, seems to be about as fast as direct obj[prop]\n\t // prop = 'key1.key2' 10ms\n\t // prop = ['key1', 'key2'] 27ms\n\n\n\t function getValue(obj, prop) {\n\t var tmp = obj[prop];\n\t if (tmp !== undefined) return tmp;\n\t var segs = prop;\n\t if (!Array.isArray(prop)) segs = prop.split('.');\n\t var len = segs.length;\n\t var i = -1;\n\n\t while (obj && ++i < len) obj = obj[segs[i]];\n\n\t return obj;\n\t }\n\n\t function isObj(x) {\n\t return typeof x === 'object';\n\t } // faster as a function\n\t // Hacked version of https://github.com/lemire/FastPriorityQueue.js\n\n\n\t var fastpriorityqueue = function () {\n\t var r = [],\n\t o = 0,\n\t e = {};\n\n\t function n() {\n\t for (var e = 0, n = r[e], c = 1; c < o;) {\n\t var f = c + 1;\n\t e = c, f < o && r[f].score < r[c].score && (e = f), r[e - 1 >> 1] = r[e], c = 1 + (e << 1);\n\t }\n\n\t for (var a = e - 1 >> 1; e > 0 && n.score < r[a].score; a = (e = a) - 1 >> 1) r[e] = r[a];\n\n\t r[e] = n;\n\t }\n\n\t return e.add = function (e) {\n\t var n = o;\n\t r[o++] = e;\n\n\t for (var c = n - 1 >> 1; n > 0 && e.score < r[c].score; c = (n = c) - 1 >> 1) r[n] = r[c];\n\n\t r[n] = e;\n\t }, e.poll = function () {\n\t if (0 !== o) {\n\t var e = r[0];\n\t return r[0] = r[--o], n(), e;\n\t }\n\t }, e.peek = function (e) {\n\t if (0 !== o) return r[0];\n\t }, e.replaceTop = function (o) {\n\t r[0] = o, n();\n\t }, e;\n\t };\n\n\t var q = fastpriorityqueue(); // reuse this, except for async, it needs to make its own\n\n\t return fuzzysortNew();\n\t }); // UMD\n\t // TODO: (performance) wasm version!?\n\t // TODO: (performance) layout memory in an optimal way to go fast by avoiding cache misses\n\t // TODO: (performance) preparedCache is a memory leak\n\t // TODO: (like sublime) backslash === forwardslash\n\t // TODO: (performance) i have no idea how well optizmied the allowing typos algorithm is\n\n\t});\n\n\tvar stats = {\n\t passedTests: 0,\n\t failedTests: 0,\n\t skippedTests: 0,\n\t todoTests: 0\n\t}; // Escape text for attribute or text content.\n\n\tfunction escapeText(s) {\n\t if (!s) {\n\t return \"\";\n\t }\n\n\t s = s + \"\"; // Both single quotes and double quotes (for attributes)\n\n\t return s.replace(/['\"<>&]/g, function (s) {\n\t switch (s) {\n\t case \"'\":\n\t return \"'\";\n\n\t case \"\\\"\":\n\t return \""\";\n\n\t case \"<\":\n\t return \"<\";\n\n\t case \">\":\n\t return \">\";\n\n\t case \"&\":\n\t return \"&\";\n\t }\n\t });\n\t}\n\n\t(function () {\n\t // Don't load the HTML Reporter on non-browser environments\n\t if (!window$1 || !document$1) {\n\t return;\n\t }\n\n\t var config = QUnit.config,\n\t hiddenTests = [],\n\t collapseNext = false,\n\t hasOwn = Object.prototype.hasOwnProperty,\n\t unfilteredUrl = setUrl({\n\t filter: undefined,\n\t module: undefined,\n\t moduleId: undefined,\n\t testId: undefined\n\t });\n\n\t function addEvent(elem, type, fn) {\n\t elem.addEventListener(type, fn, false);\n\t }\n\n\t function removeEvent(elem, type, fn) {\n\t elem.removeEventListener(type, fn, false);\n\t }\n\n\t function addEvents(elems, type, fn) {\n\t var i = elems.length;\n\n\t while (i--) {\n\t addEvent(elems[i], type, fn);\n\t }\n\t }\n\n\t function hasClass(elem, name) {\n\t return (\" \" + elem.className + \" \").indexOf(\" \" + name + \" \") >= 0;\n\t }\n\n\t function addClass(elem, name) {\n\t if (!hasClass(elem, name)) {\n\t elem.className += (elem.className ? \" \" : \"\") + name;\n\t }\n\t }\n\n\t function toggleClass(elem, name, force) {\n\t if (force || typeof force === \"undefined\" && !hasClass(elem, name)) {\n\t addClass(elem, name);\n\t } else {\n\t removeClass(elem, name);\n\t }\n\t }\n\n\t function removeClass(elem, name) {\n\t var set = \" \" + elem.className + \" \"; // Class name may appear multiple times\n\n\t while (set.indexOf(\" \" + name + \" \") >= 0) {\n\t set = set.replace(\" \" + name + \" \", \" \");\n\t } // Trim for prettiness\n\n\n\t elem.className = typeof set.trim === \"function\" ? set.trim() : set.replace(/^\\s+|\\s+$/g, \"\");\n\t }\n\n\t function id(name) {\n\t return document$1.getElementById && document$1.getElementById(name);\n\t }\n\n\t function abortTests() {\n\t var abortButton = id(\"qunit-abort-tests-button\");\n\n\t if (abortButton) {\n\t abortButton.disabled = true;\n\t abortButton.innerHTML = \"Aborting...\";\n\t }\n\n\t QUnit.config.queue.length = 0;\n\t return false;\n\t }\n\n\t function interceptNavigation(ev) {\n\t applyUrlParams();\n\n\t if (ev && ev.preventDefault) {\n\t ev.preventDefault();\n\t }\n\n\t return false;\n\t }\n\n\t function getUrlConfigHtml() {\n\t var i,\n\t j,\n\t val,\n\t escaped,\n\t escapedTooltip,\n\t selection = false,\n\t urlConfig = config.urlConfig,\n\t urlConfigHtml = \"\";\n\n\t for (i = 0; i < urlConfig.length; i++) {\n\t // Options can be either strings or objects with nonempty \"id\" properties\n\t val = config.urlConfig[i];\n\n\t if (typeof val === \"string\") {\n\t val = {\n\t id: val,\n\t label: val\n\t };\n\t }\n\n\t escaped = escapeText(val.id);\n\t escapedTooltip = escapeText(val.tooltip);\n\n\t if (!val.value || typeof val.value === \"string\") {\n\t urlConfigHtml += \"\";\n\t } else {\n\t urlConfigHtml += \"\";\n\t }\n\t }\n\n\t return urlConfigHtml;\n\t } // Handle \"click\" events on toolbar checkboxes and \"change\" for select menus.\n\t // Updates the URL with the new state of `config.urlConfig` values.\n\n\n\t function toolbarChanged() {\n\t var updatedUrl,\n\t value,\n\t tests,\n\t field = this,\n\t params = {}; // Detect if field is a select menu or a checkbox\n\n\t if (\"selectedIndex\" in field) {\n\t value = field.options[field.selectedIndex].value || undefined;\n\t } else {\n\t value = field.checked ? field.defaultValue || true : undefined;\n\t }\n\n\t params[field.name] = value;\n\t updatedUrl = setUrl(params); // Check if we can apply the change without a page refresh\n\n\t if (\"hidepassed\" === field.name && \"replaceState\" in window$1.history) {\n\t QUnit.urlParams[field.name] = value;\n\t config[field.name] = value || false;\n\t tests = id(\"qunit-tests\");\n\n\t if (tests) {\n\t var length = tests.children.length;\n\t var children = tests.children;\n\n\t if (field.checked) {\n\t for (var i = 0; i < length; i++) {\n\t var test = children[i];\n\t var className = test ? test.className : \"\";\n\t var classNameHasPass = className.indexOf(\"pass\") > -1;\n\t var classNameHasSkipped = className.indexOf(\"skipped\") > -1;\n\n\t if (classNameHasPass || classNameHasSkipped) {\n\t hiddenTests.push(test);\n\t }\n\t }\n\n\t var _iterator = _createForOfIteratorHelper(hiddenTests),\n\t _step;\n\n\t try {\n\t for (_iterator.s(); !(_step = _iterator.n()).done;) {\n\t var hiddenTest = _step.value;\n\t tests.removeChild(hiddenTest);\n\t }\n\t } catch (err) {\n\t _iterator.e(err);\n\t } finally {\n\t _iterator.f();\n\t }\n\t } else {\n\t while ((test = hiddenTests.pop()) != null) {\n\t tests.appendChild(test);\n\t }\n\t }\n\t }\n\n\t window$1.history.replaceState(null, \"\", updatedUrl);\n\t } else {\n\t window$1.location = updatedUrl;\n\t }\n\t }\n\n\t function setUrl(params) {\n\t var key,\n\t arrValue,\n\t i,\n\t querystring = \"?\",\n\t location = window$1.location;\n\t params = extend(extend({}, QUnit.urlParams), params);\n\n\t for (key in params) {\n\t // Skip inherited or undefined properties\n\t if (hasOwn.call(params, key) && params[key] !== undefined) {\n\t // Output a parameter for each value of this key\n\t // (but usually just one)\n\t arrValue = [].concat(params[key]);\n\n\t for (i = 0; i < arrValue.length; i++) {\n\t querystring += encodeURIComponent(key);\n\n\t if (arrValue[i] !== true) {\n\t querystring += \"=\" + encodeURIComponent(arrValue[i]);\n\t }\n\n\t querystring += \"&\";\n\t }\n\t }\n\t }\n\n\t return location.protocol + \"//\" + location.host + location.pathname + querystring.slice(0, -1);\n\t }\n\n\t function applyUrlParams() {\n\t var i,\n\t selectedModules = [],\n\t modulesList = id(\"qunit-modulefilter-dropdown-list\").getElementsByTagName(\"input\"),\n\t filter = id(\"qunit-filter-input\").value;\n\n\t for (i = 0; i < modulesList.length; i++) {\n\t if (modulesList[i].checked) {\n\t selectedModules.push(modulesList[i].value);\n\t }\n\t }\n\n\t window$1.location = setUrl({\n\t filter: filter === \"\" ? undefined : filter,\n\t moduleId: selectedModules.length === 0 ? undefined : selectedModules,\n\t // Remove module and testId filter\n\t module: undefined,\n\t testId: undefined\n\t });\n\t }\n\n\t function toolbarUrlConfigContainer() {\n\t var urlConfigContainer = document$1.createElement(\"span\");\n\t urlConfigContainer.innerHTML = getUrlConfigHtml();\n\t addClass(urlConfigContainer, \"qunit-url-config\");\n\t addEvents(urlConfigContainer.getElementsByTagName(\"input\"), \"change\", toolbarChanged);\n\t addEvents(urlConfigContainer.getElementsByTagName(\"select\"), \"change\", toolbarChanged);\n\t return urlConfigContainer;\n\t }\n\n\t function abortTestsButton() {\n\t var button = document$1.createElement(\"button\");\n\t button.id = \"qunit-abort-tests-button\";\n\t button.innerHTML = \"Abort\";\n\t addEvent(button, \"click\", abortTests);\n\t return button;\n\t }\n\n\t function toolbarLooseFilter() {\n\t var filter = document$1.createElement(\"form\"),\n\t label = document$1.createElement(\"label\"),\n\t input = document$1.createElement(\"input\"),\n\t button = document$1.createElement(\"button\");\n\t addClass(filter, \"qunit-filter\");\n\t label.innerHTML = \"Filter: \";\n\t input.type = \"text\";\n\t input.value = config.filter || \"\";\n\t input.name = \"filter\";\n\t input.id = \"qunit-filter-input\";\n\t button.innerHTML = \"Go\";\n\t label.appendChild(input);\n\t filter.appendChild(label);\n\t filter.appendChild(document$1.createTextNode(\" \"));\n\t filter.appendChild(button);\n\t addEvent(filter, \"submit\", interceptNavigation);\n\t return filter;\n\t }\n\n\t function moduleListHtml(modules) {\n\t var i,\n\t checked,\n\t html = \"\";\n\n\t for (i = 0; i < modules.length; i++) {\n\t if (modules[i].name !== \"\") {\n\t checked = config.moduleId.indexOf(modules[i].moduleId) > -1;\n\t html += \"
    1. \";\n\t }\n\t }\n\n\t return html;\n\t }\n\n\t function toolbarModuleFilter() {\n\t var commit,\n\t reset,\n\t moduleFilter = document$1.createElement(\"form\"),\n\t label = document$1.createElement(\"label\"),\n\t moduleSearch = document$1.createElement(\"input\"),\n\t dropDown = document$1.createElement(\"div\"),\n\t actions = document$1.createElement(\"span\"),\n\t applyButton = document$1.createElement(\"button\"),\n\t resetButton = document$1.createElement(\"button\"),\n\t allModulesLabel = document$1.createElement(\"label\"),\n\t allCheckbox = document$1.createElement(\"input\"),\n\t dropDownList = document$1.createElement(\"ul\"),\n\t dirty = false;\n\t moduleSearch.id = \"qunit-modulefilter-search\";\n\t moduleSearch.autocomplete = \"off\";\n\t addEvent(moduleSearch, \"input\", searchInput);\n\t addEvent(moduleSearch, \"input\", searchFocus);\n\t addEvent(moduleSearch, \"focus\", searchFocus);\n\t addEvent(moduleSearch, \"click\", searchFocus);\n\t config.modules.forEach(function (module) {\n\t return module.namePrepared = fuzzysort.prepare(module.name);\n\t });\n\t label.id = \"qunit-modulefilter-search-container\";\n\t label.innerHTML = \"Module: \";\n\t label.appendChild(moduleSearch);\n\t applyButton.textContent = \"Apply\";\n\t applyButton.style.display = \"none\";\n\t resetButton.textContent = \"Reset\";\n\t resetButton.type = \"reset\";\n\t resetButton.style.display = \"none\";\n\t allCheckbox.type = \"checkbox\";\n\t allCheckbox.checked = config.moduleId.length === 0;\n\t allModulesLabel.className = \"clickable\";\n\n\t if (config.moduleId.length) {\n\t allModulesLabel.className = \"checked\";\n\t }\n\n\t allModulesLabel.appendChild(allCheckbox);\n\t allModulesLabel.appendChild(document$1.createTextNode(\"All modules\"));\n\t actions.id = \"qunit-modulefilter-actions\";\n\t actions.appendChild(applyButton);\n\t actions.appendChild(resetButton);\n\t actions.appendChild(allModulesLabel);\n\t commit = actions.firstChild;\n\t reset = commit.nextSibling;\n\t addEvent(commit, \"click\", applyUrlParams);\n\t dropDownList.id = \"qunit-modulefilter-dropdown-list\";\n\t dropDownList.innerHTML = moduleListHtml(config.modules);\n\t dropDown.id = \"qunit-modulefilter-dropdown\";\n\t dropDown.style.display = \"none\";\n\t dropDown.appendChild(actions);\n\t dropDown.appendChild(dropDownList);\n\t addEvent(dropDown, \"change\", selectionChange);\n\t selectionChange();\n\t moduleFilter.id = \"qunit-modulefilter\";\n\t moduleFilter.appendChild(label);\n\t moduleFilter.appendChild(dropDown);\n\t addEvent(moduleFilter, \"submit\", interceptNavigation);\n\t addEvent(moduleFilter, \"reset\", function () {\n\t // Let the reset happen, then update styles\n\t window$1.setTimeout(selectionChange);\n\t }); // Enables show/hide for the dropdown\n\n\t function searchFocus() {\n\t if (dropDown.style.display !== \"none\") {\n\t return;\n\t }\n\n\t dropDown.style.display = \"block\";\n\t addEvent(document$1, \"click\", hideHandler);\n\t addEvent(document$1, \"keydown\", hideHandler); // Hide on Escape keydown or outside-container click\n\n\t function hideHandler(e) {\n\t var inContainer = moduleFilter.contains(e.target);\n\n\t if (e.keyCode === 27 || !inContainer) {\n\t if (e.keyCode === 27 && inContainer) {\n\t moduleSearch.focus();\n\t }\n\n\t dropDown.style.display = \"none\";\n\t removeEvent(document$1, \"click\", hideHandler);\n\t removeEvent(document$1, \"keydown\", hideHandler);\n\t moduleSearch.value = \"\";\n\t searchInput();\n\t }\n\t }\n\t }\n\n\t function filterModules(searchText) {\n\t if (searchText === \"\") {\n\t return config.modules;\n\t }\n\n\t return fuzzysort.go(searchText, config.modules, {\n\t key: \"namePrepared\",\n\t threshold: -10000\n\t }).map(function (module) {\n\t return module.obj;\n\t });\n\t } // Processes module search box input\n\n\n\t var searchInputTimeout;\n\n\t function searchInput() {\n\t window$1.clearTimeout(searchInputTimeout);\n\t searchInputTimeout = window$1.setTimeout(function () {\n\t var searchText = moduleSearch.value.toLowerCase(),\n\t filteredModules = filterModules(searchText);\n\t dropDownList.innerHTML = moduleListHtml(filteredModules);\n\t }, 200);\n\t } // Processes selection changes\n\n\n\t function selectionChange(evt) {\n\t var i,\n\t item,\n\t checkbox = evt && evt.target || allCheckbox,\n\t modulesList = dropDownList.getElementsByTagName(\"input\"),\n\t selectedNames = [];\n\t toggleClass(checkbox.parentNode, \"checked\", checkbox.checked);\n\t dirty = false;\n\n\t if (checkbox.checked && checkbox !== allCheckbox) {\n\t allCheckbox.checked = false;\n\t removeClass(allCheckbox.parentNode, \"checked\");\n\t }\n\n\t for (i = 0; i < modulesList.length; i++) {\n\t item = modulesList[i];\n\n\t if (!evt) {\n\t toggleClass(item.parentNode, \"checked\", item.checked);\n\t } else if (checkbox === allCheckbox && checkbox.checked) {\n\t item.checked = false;\n\t removeClass(item.parentNode, \"checked\");\n\t }\n\n\t dirty = dirty || item.checked !== item.defaultChecked;\n\n\t if (item.checked) {\n\t selectedNames.push(item.parentNode.textContent);\n\t }\n\t }\n\n\t commit.style.display = reset.style.display = dirty ? \"\" : \"none\";\n\t moduleSearch.placeholder = selectedNames.join(\", \") || allCheckbox.parentNode.textContent;\n\t moduleSearch.title = \"Type to filter list. Current selection:\\n\" + (selectedNames.join(\"\\n\") || allCheckbox.parentNode.textContent);\n\t }\n\n\t return moduleFilter;\n\t }\n\n\t function toolbarFilters() {\n\t var toolbarFilters = document$1.createElement(\"span\");\n\t toolbarFilters.id = \"qunit-toolbar-filters\";\n\t toolbarFilters.appendChild(toolbarLooseFilter());\n\t toolbarFilters.appendChild(toolbarModuleFilter());\n\t return toolbarFilters;\n\t }\n\n\t function appendToolbar() {\n\t var toolbar = id(\"qunit-testrunner-toolbar\");\n\n\t if (toolbar) {\n\t toolbar.appendChild(toolbarUrlConfigContainer());\n\t toolbar.appendChild(toolbarFilters());\n\t toolbar.appendChild(document$1.createElement(\"div\")).className = \"clearfix\";\n\t }\n\t }\n\n\t function appendHeader() {\n\t var header = id(\"qunit-header\");\n\n\t if (header) {\n\t header.innerHTML = \"\" + header.innerHTML + \" \";\n\t }\n\t }\n\n\t function appendBanner() {\n\t var banner = id(\"qunit-banner\");\n\n\t if (banner) {\n\t banner.className = \"\";\n\t }\n\t }\n\n\t function appendTestResults() {\n\t var tests = id(\"qunit-tests\"),\n\t result = id(\"qunit-testresult\"),\n\t controls;\n\n\t if (result) {\n\t result.parentNode.removeChild(result);\n\t }\n\n\t if (tests) {\n\t tests.innerHTML = \"\";\n\t result = document$1.createElement(\"p\");\n\t result.id = \"qunit-testresult\";\n\t result.className = \"result\";\n\t tests.parentNode.insertBefore(result, tests);\n\t result.innerHTML = \"
      Running...
       
      \" + \"
      \" + \"
      \";\n\t controls = id(\"qunit-testresult-controls\");\n\t }\n\n\t if (controls) {\n\t controls.appendChild(abortTestsButton());\n\t }\n\t }\n\n\t function appendFilteredTest() {\n\t var testId = QUnit.config.testId;\n\n\t if (!testId || testId.length <= 0) {\n\t return \"\";\n\t }\n\n\t return \"
      Rerunning selected tests: \" + escapeText(testId.join(\", \")) + \" Run all tests
      \";\n\t }\n\n\t function appendUserAgent() {\n\t var userAgent = id(\"qunit-userAgent\");\n\n\t if (userAgent) {\n\t userAgent.innerHTML = \"\";\n\t userAgent.appendChild(document$1.createTextNode(\"QUnit \" + QUnit.version + \"; \" + navigator.userAgent));\n\t }\n\t }\n\n\t function appendInterface() {\n\t var qunit = id(\"qunit\"); // For compat with QUnit 1.2, and to support fully custom theme HTML,\n\t // we will use any existing elements if no id=\"qunit\" element exists.\n\t //\n\t // Note that we don't fail or fallback to creating it ourselves,\n\t // because not having id=\"qunit\" (and not having the below elements)\n\t // simply means QUnit acts headless, allowing users to use their own\n\t // reporters, or for a test runner to listen for events directly without\n\t // having the HTML reporter actively render anything.\n\n\t if (qunit) {\n\t // Since QUnit 1.3, these are created automatically if the page\n\t // contains id=\"qunit\".\n\t qunit.innerHTML = \"

      \" + escapeText(document$1.title) + \"

      \" + \"

      \" + \"
      \" + appendFilteredTest() + \"

      \" + \"
        \";\n\t }\n\n\t appendHeader();\n\t appendBanner();\n\t appendTestResults();\n\t appendUserAgent();\n\t appendToolbar();\n\t }\n\n\t function appendTest(name, testId, moduleName) {\n\t var title,\n\t rerunTrigger,\n\t testBlock,\n\t assertList,\n\t tests = id(\"qunit-tests\");\n\n\t if (!tests) {\n\t return;\n\t }\n\n\t title = document$1.createElement(\"strong\");\n\t title.innerHTML = getNameHtml(name, moduleName);\n\t rerunTrigger = document$1.createElement(\"a\");\n\t rerunTrigger.innerHTML = \"Rerun\";\n\t rerunTrigger.href = setUrl({\n\t testId: testId\n\t });\n\t testBlock = document$1.createElement(\"li\");\n\t testBlock.appendChild(title);\n\t testBlock.appendChild(rerunTrigger);\n\t testBlock.id = \"qunit-test-output-\" + testId;\n\t assertList = document$1.createElement(\"ol\");\n\t assertList.className = \"qunit-assert-list\";\n\t testBlock.appendChild(assertList);\n\t tests.appendChild(testBlock);\n\t } // HTML Reporter initialization and load\n\n\n\t QUnit.begin(function () {\n\t // Initialize QUnit elements\n\t appendInterface();\n\t });\n\t QUnit.done(function (details) {\n\t var banner = id(\"qunit-banner\"),\n\t tests = id(\"qunit-tests\"),\n\t abortButton = id(\"qunit-abort-tests-button\"),\n\t totalTests = stats.passedTests + stats.skippedTests + stats.todoTests + stats.failedTests,\n\t html = [totalTests, \" tests completed in \", details.runtime, \" milliseconds, with \", stats.failedTests, \" failed, \", stats.skippedTests, \" skipped, and \", stats.todoTests, \" todo.
        \", \"\", details.passed, \" assertions of \", details.total, \" passed, \", details.failed, \" failed.\"].join(\"\"),\n\t test,\n\t assertLi,\n\t assertList; // Update remaining tests to aborted\n\n\t if (abortButton && abortButton.disabled) {\n\t html = \"Tests aborted after \" + details.runtime + \" milliseconds.\";\n\n\t for (var i = 0; i < tests.children.length; i++) {\n\t test = tests.children[i];\n\n\t if (test.className === \"\" || test.className === \"running\") {\n\t test.className = \"aborted\";\n\t assertList = test.getElementsByTagName(\"ol\")[0];\n\t assertLi = document$1.createElement(\"li\");\n\t assertLi.className = \"fail\";\n\t assertLi.innerHTML = \"Test aborted.\";\n\t assertList.appendChild(assertLi);\n\t }\n\t }\n\t }\n\n\t if (banner && (!abortButton || abortButton.disabled === false)) {\n\t banner.className = stats.failedTests ? \"qunit-fail\" : \"qunit-pass\";\n\t }\n\n\t if (abortButton) {\n\t abortButton.parentNode.removeChild(abortButton);\n\t }\n\n\t if (tests) {\n\t id(\"qunit-testresult-display\").innerHTML = html;\n\t }\n\n\t if (config.altertitle && document$1.title) {\n\t // Show ✖ for good, ✔ for bad suite result in title\n\t // use escape sequences in case file gets loaded with non-utf-8\n\t // charset\n\t document$1.title = [stats.failedTests ? \"\\u2716\" : \"\\u2714\", document$1.title.replace(/^[\\u2714\\u2716] /i, \"\")].join(\" \");\n\t } // Scroll back to top to show results\n\n\n\t if (config.scrolltop && window$1.scrollTo) {\n\t window$1.scrollTo(0, 0);\n\t }\n\t });\n\n\t function getNameHtml(name, module) {\n\t var nameHtml = \"\";\n\n\t if (module) {\n\t nameHtml = \"\" + escapeText(module) + \": \";\n\t }\n\n\t nameHtml += \"\" + escapeText(name) + \"\";\n\t return nameHtml;\n\t }\n\n\t function getProgressHtml(runtime, stats, total) {\n\t var completed = stats.passedTests + stats.skippedTests + stats.todoTests + stats.failedTests;\n\t return [\"
        \", completed, \" / \", total, \" tests completed in \", runtime, \" milliseconds, with \", stats.failedTests, \" failed, \", stats.skippedTests, \" skipped, and \", stats.todoTests, \" todo.\"].join(\"\");\n\t }\n\n\t QUnit.testStart(function (details) {\n\t var running, bad;\n\t appendTest(details.name, details.testId, details.module);\n\t running = id(\"qunit-testresult-display\");\n\n\t if (running) {\n\t addClass(running, \"running\");\n\t bad = QUnit.config.reorder && details.previousFailure;\n\t running.innerHTML = [bad ? \"Rerunning previously failed test:
        \" : \"Running:
        \", getNameHtml(details.name, details.module), getProgressHtml(now() - config.started, stats, Test.count)].join(\"\");\n\t }\n\t });\n\n\t function stripHtml(string) {\n\t // Strip tags, html entity and whitespaces\n\t return string.replace(/<\\/?[^>]+(>|$)/g, \"\").replace(/"/g, \"\").replace(/\\s+/g, \"\");\n\t }\n\n\t QUnit.log(function (details) {\n\t var assertList,\n\t assertLi,\n\t message,\n\t expected,\n\t actual,\n\t diff,\n\t showDiff = false,\n\t testItem = id(\"qunit-test-output-\" + details.testId);\n\n\t if (!testItem) {\n\t return;\n\t }\n\n\t message = escapeText(details.message) || (details.result ? \"okay\" : \"failed\");\n\t message = \"\" + message + \"\";\n\t message += \"@ \" + details.runtime + \" ms\"; // The pushFailure doesn't provide details.expected\n\t // when it calls, it's implicit to also not show expected and diff stuff\n\t // Also, we need to check details.expected existence, as it can exist and be undefined\n\n\t if (!details.result && hasOwn.call(details, \"expected\")) {\n\t if (details.negative) {\n\t expected = \"NOT \" + QUnit.dump.parse(details.expected);\n\t } else {\n\t expected = QUnit.dump.parse(details.expected);\n\t }\n\n\t actual = QUnit.dump.parse(details.actual);\n\t message += \"\";\n\n\t if (actual !== expected) {\n\t message += \"\";\n\n\t if (typeof details.actual === \"number\" && typeof details.expected === \"number\") {\n\t if (!isNaN(details.actual) && !isNaN(details.expected)) {\n\t showDiff = true;\n\t diff = details.actual - details.expected;\n\t diff = (diff > 0 ? \"+\" : \"\") + diff;\n\t }\n\t } else if (typeof details.actual !== \"boolean\" && typeof details.expected !== \"boolean\") {\n\t diff = QUnit.diff(expected, actual); // don't show diff if there is zero overlap\n\n\t showDiff = stripHtml(diff).length !== stripHtml(expected).length + stripHtml(actual).length;\n\t }\n\n\t if (showDiff) {\n\t message += \"\";\n\t }\n\t } else if (expected.indexOf(\"[object Array]\") !== -1 || expected.indexOf(\"[object Object]\") !== -1) {\n\t message += \"\";\n\t } else {\n\t message += \"\";\n\t }\n\n\t if (details.source) {\n\t message += \"\";\n\t }\n\n\t message += \"
        Expected:
        \" + escapeText(expected) + \"
        Result:
        \" + escapeText(actual) + \"
        Diff:
        \" + diff + \"
        Message: \" + \"Diff suppressed as the depth of object is more than current max depth (\" + QUnit.config.maxDepth + \").

        Hint: Use QUnit.dump.maxDepth to \" + \" run with a higher max depth or \" + \"Rerun without max depth.

        Message: \" + \"Diff suppressed as the expected and actual results have an equivalent\" + \" serialization
        Source:
        \" + escapeText(details.source) + \"
        \"; // This occurs when pushFailure is set and we have an extracted stack trace\n\t } else if (!details.result && details.source) {\n\t message += \"\" + \"\" + \"
        Source:
        \" + escapeText(details.source) + \"
        \";\n\t }\n\n\t assertList = testItem.getElementsByTagName(\"ol\")[0];\n\t assertLi = document$1.createElement(\"li\");\n\t assertLi.className = details.result ? \"pass\" : \"fail\";\n\t assertLi.innerHTML = message;\n\t assertList.appendChild(assertLi);\n\t });\n\t QUnit.testDone(function (details) {\n\t var testTitle,\n\t time,\n\t testItem,\n\t assertList,\n\t status,\n\t good,\n\t bad,\n\t testCounts,\n\t skipped,\n\t sourceName,\n\t tests = id(\"qunit-tests\");\n\n\t if (!tests) {\n\t return;\n\t }\n\n\t testItem = id(\"qunit-test-output-\" + details.testId);\n\t removeClass(testItem, \"running\");\n\n\t if (details.failed > 0) {\n\t status = \"failed\";\n\t } else if (details.todo) {\n\t status = \"todo\";\n\t } else {\n\t status = details.skipped ? \"skipped\" : \"passed\";\n\t }\n\n\t assertList = testItem.getElementsByTagName(\"ol\")[0];\n\t good = details.passed;\n\t bad = details.failed; // This test passed if it has no unexpected failed assertions\n\n\t var testPassed = details.failed > 0 ? details.todo : !details.todo;\n\n\t if (testPassed) {\n\t // Collapse the passing tests\n\t addClass(assertList, \"qunit-collapsed\");\n\t } else if (config.collapse) {\n\t if (!collapseNext) {\n\t // Skip collapsing the first failing test\n\t collapseNext = true;\n\t } else {\n\t // Collapse remaining tests\n\t addClass(assertList, \"qunit-collapsed\");\n\t }\n\t } // The testItem.firstChild is the test name\n\n\n\t testTitle = testItem.firstChild;\n\t testCounts = bad ? \"\" + bad + \", \" + \"\" + good + \", \" : \"\";\n\t testTitle.innerHTML += \" (\" + testCounts + details.assertions.length + \")\";\n\n\t if (details.skipped) {\n\t stats.skippedTests++;\n\t testItem.className = \"skipped\";\n\t skipped = document$1.createElement(\"em\");\n\t skipped.className = \"qunit-skipped-label\";\n\t skipped.innerHTML = \"skipped\";\n\t testItem.insertBefore(skipped, testTitle);\n\t } else {\n\t addEvent(testTitle, \"click\", function () {\n\t toggleClass(assertList, \"qunit-collapsed\");\n\t });\n\t testItem.className = testPassed ? \"pass\" : \"fail\";\n\n\t if (details.todo) {\n\t var todoLabel = document$1.createElement(\"em\");\n\t todoLabel.className = \"qunit-todo-label\";\n\t todoLabel.innerHTML = \"todo\";\n\t testItem.className += \" todo\";\n\t testItem.insertBefore(todoLabel, testTitle);\n\t }\n\n\t time = document$1.createElement(\"span\");\n\t time.className = \"runtime\";\n\t time.innerHTML = details.runtime + \" ms\";\n\t testItem.insertBefore(time, assertList);\n\n\t if (!testPassed) {\n\t stats.failedTests++;\n\t } else if (details.todo) {\n\t stats.todoTests++;\n\t } else {\n\t stats.passedTests++;\n\t }\n\t } // Show the source of the test when showing assertions\n\n\n\t if (details.source) {\n\t sourceName = document$1.createElement(\"p\");\n\t sourceName.innerHTML = \"Source: \" + escapeText(details.source);\n\t addClass(sourceName, \"qunit-source\");\n\n\t if (testPassed) {\n\t addClass(sourceName, \"qunit-collapsed\");\n\t }\n\n\t addEvent(testTitle, \"click\", function () {\n\t toggleClass(sourceName, \"qunit-collapsed\");\n\t });\n\t testItem.appendChild(sourceName);\n\t }\n\n\t if (config.hidepassed && (status === \"passed\" || details.skipped)) {\n\t // use removeChild instead of remove because of support\n\t hiddenTests.push(testItem);\n\t tests.removeChild(testItem);\n\t }\n\t }); // Avoid readyState issue with phantomjs\n\t // Ref: #818\n\n\t var notPhantom = function (p) {\n\t return !(p && p.version && p.version.major > 0);\n\t }(window$1.phantom);\n\n\t if (notPhantom && document$1.readyState === \"complete\") {\n\t QUnit.load();\n\t } else {\n\t addEvent(window$1, \"load\", QUnit.load);\n\t } // Wrap window.onerror. We will call the original window.onerror to see if\n\t // the existing handler fully handles the error; if not, we will call the\n\t // QUnit.onError function.\n\n\n\t var originalWindowOnError = window$1.onerror; // Cover uncaught exceptions\n\t // Returning true will suppress the default browser handler,\n\t // returning false will let it run.\n\n\t window$1.onerror = function (message, fileName, lineNumber, columnNumber, errorObj) {\n\t var ret = false;\n\n\t if (originalWindowOnError) {\n\t for (var _len = arguments.length, args = new Array(_len > 5 ? _len - 5 : 0), _key = 5; _key < _len; _key++) {\n\t args[_key - 5] = arguments[_key];\n\t }\n\n\t ret = originalWindowOnError.call.apply(originalWindowOnError, [this, message, fileName, lineNumber, columnNumber, errorObj].concat(args));\n\t } // Treat return value as window.onerror itself does,\n\t // Only do our handling if not suppressed.\n\n\n\t if (ret !== true) {\n\t var error = {\n\t message: message,\n\t fileName: fileName,\n\t lineNumber: lineNumber\n\t }; // According to\n\t // https://blog.sentry.io/2016/01/04/client-javascript-reporting-window-onerror,\n\t // most modern browsers support an errorObj argument; use that to\n\t // get a full stack trace if it's available.\n\n\t if (errorObj && errorObj.stack) {\n\t error.stacktrace = extractStacktrace(errorObj, 0);\n\t }\n\n\t ret = QUnit.onError(error);\n\t }\n\n\t return ret;\n\t }; // Listen for unhandled rejections, and call QUnit.onUnhandledRejection\n\n\n\t window$1.addEventListener(\"unhandledrejection\", function (event) {\n\t QUnit.onUnhandledRejection(event.reason);\n\t });\n\t})();\n\n\t/*\n\t * This file is a modified version of google-diff-match-patch's JavaScript implementation\n\t * (https://code.google.com/p/google-diff-match-patch/source/browse/trunk/javascript/diff_match_patch_uncompressed.js),\n\t * modifications are licensed as more fully set forth in LICENSE.txt.\n\t *\n\t * The original source of google-diff-match-patch is attributable and licensed as follows:\n\t *\n\t * Copyright 2006 Google Inc.\n\t * https://code.google.com/p/google-diff-match-patch/\n\t *\n\t * Licensed under the Apache License, Version 2.0 (the \"License\");\n\t * you may not use this file except in compliance with the License.\n\t * You may obtain a copy of the License at\n\t *\n\t * https://www.apache.org/licenses/LICENSE-2.0\n\t *\n\t * Unless required by applicable law or agreed to in writing, software\n\t * distributed under the License is distributed on an \"AS IS\" BASIS,\n\t * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n\t * See the License for the specific language governing permissions and\n\t * limitations under the License.\n\t *\n\t * More Info:\n\t * https://code.google.com/p/google-diff-match-patch/\n\t *\n\t * Usage: QUnit.diff(expected, actual)\n\t *\n\t */\n\n\tQUnit.diff = function () {\n\t function DiffMatchPatch() {} // DIFF FUNCTIONS\n\n\t /**\n\t * The data structure representing a diff is an array of tuples:\n\t * [[DIFF_DELETE, 'Hello'], [DIFF_INSERT, 'Goodbye'], [DIFF_EQUAL, ' world.']]\n\t * which means: delete 'Hello', add 'Goodbye' and keep ' world.'\n\t */\n\n\n\t var DIFF_DELETE = -1,\n\t DIFF_INSERT = 1,\n\t DIFF_EQUAL = 0,\n\t hasOwn = Object.prototype.hasOwnProperty;\n\t /**\n\t * Find the differences between two texts. Simplifies the problem by stripping\n\t * any common prefix or suffix off the texts before diffing.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @param {boolean=} optChecklines Optional speedup flag. If present and false,\n\t * then don't run a line-level diff first to identify the changed areas.\n\t * Defaults to true, which does a faster, slightly less optimal diff.\n\t * @return {!Array.} Array of diff tuples.\n\t */\n\n\t DiffMatchPatch.prototype.DiffMain = function (text1, text2, optChecklines) {\n\t var deadline, checklines, commonlength, commonprefix, commonsuffix, diffs; // The diff must be complete in up to 1 second.\n\n\t deadline = new Date().getTime() + 1000; // Check for null inputs.\n\n\t if (text1 === null || text2 === null) {\n\t throw new Error(\"Null input. (DiffMain)\");\n\t } // Check for equality (speedup).\n\n\n\t if (text1 === text2) {\n\t if (text1) {\n\t return [[DIFF_EQUAL, text1]];\n\t }\n\n\t return [];\n\t }\n\n\t if (typeof optChecklines === \"undefined\") {\n\t optChecklines = true;\n\t }\n\n\t checklines = optChecklines; // Trim off common prefix (speedup).\n\n\t commonlength = this.diffCommonPrefix(text1, text2);\n\t commonprefix = text1.substring(0, commonlength);\n\t text1 = text1.substring(commonlength);\n\t text2 = text2.substring(commonlength); // Trim off common suffix (speedup).\n\n\t commonlength = this.diffCommonSuffix(text1, text2);\n\t commonsuffix = text1.substring(text1.length - commonlength);\n\t text1 = text1.substring(0, text1.length - commonlength);\n\t text2 = text2.substring(0, text2.length - commonlength); // Compute the diff on the middle block.\n\n\t diffs = this.diffCompute(text1, text2, checklines, deadline); // Restore the prefix and suffix.\n\n\t if (commonprefix) {\n\t diffs.unshift([DIFF_EQUAL, commonprefix]);\n\t }\n\n\t if (commonsuffix) {\n\t diffs.push([DIFF_EQUAL, commonsuffix]);\n\t }\n\n\t this.diffCleanupMerge(diffs);\n\t return diffs;\n\t };\n\t /**\n\t * Reduce the number of edits by eliminating operationally trivial equalities.\n\t * @param {!Array.} diffs Array of diff tuples.\n\t */\n\n\n\t DiffMatchPatch.prototype.diffCleanupEfficiency = function (diffs) {\n\t var changes, equalities, equalitiesLength, lastequality, pointer, preIns, preDel, postIns, postDel;\n\t changes = false;\n\t equalities = []; // Stack of indices where equalities are found.\n\n\t equalitiesLength = 0; // Keeping our own length var is faster in JS.\n\n\t /** @type {?string} */\n\n\t lastequality = null; // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n\n\t pointer = 0; // Index of current position.\n\t // Is there an insertion operation before the last equality.\n\n\t preIns = false; // Is there a deletion operation before the last equality.\n\n\t preDel = false; // Is there an insertion operation after the last equality.\n\n\t postIns = false; // Is there a deletion operation after the last equality.\n\n\t postDel = false;\n\n\t while (pointer < diffs.length) {\n\t // Equality found.\n\t if (diffs[pointer][0] === DIFF_EQUAL) {\n\t if (diffs[pointer][1].length < 4 && (postIns || postDel)) {\n\t // Candidate found.\n\t equalities[equalitiesLength++] = pointer;\n\t preIns = postIns;\n\t preDel = postDel;\n\t lastequality = diffs[pointer][1];\n\t } else {\n\t // Not a candidate, and can never become one.\n\t equalitiesLength = 0;\n\t lastequality = null;\n\t }\n\n\t postIns = postDel = false; // An insertion or deletion.\n\t } else {\n\t if (diffs[pointer][0] === DIFF_DELETE) {\n\t postDel = true;\n\t } else {\n\t postIns = true;\n\t }\n\t /*\n\t * Five types to be split:\n\t * ABXYCD\n\t * AXCD\n\t * ABXC\n\t * AXCD\n\t * ABXC\n\t */\n\n\n\t if (lastequality && (preIns && preDel && postIns && postDel || lastequality.length < 2 && preIns + preDel + postIns + postDel === 3)) {\n\t // Duplicate record.\n\t diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]); // Change second copy to insert.\n\n\t diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT;\n\t equalitiesLength--; // Throw away the equality we just deleted;\n\n\t lastequality = null;\n\n\t if (preIns && preDel) {\n\t // No changes made which could affect previous entry, keep going.\n\t postIns = postDel = true;\n\t equalitiesLength = 0;\n\t } else {\n\t equalitiesLength--; // Throw away the previous equality.\n\n\t pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1;\n\t postIns = postDel = false;\n\t }\n\n\t changes = true;\n\t }\n\t }\n\n\t pointer++;\n\t }\n\n\t if (changes) {\n\t this.diffCleanupMerge(diffs);\n\t }\n\t };\n\t /**\n\t * Convert a diff array into a pretty HTML report.\n\t * @param {!Array.} diffs Array of diff tuples.\n\t * @param {integer} string to be beautified.\n\t * @return {string} HTML representation.\n\t */\n\n\n\t DiffMatchPatch.prototype.diffPrettyHtml = function (diffs) {\n\t var op,\n\t data,\n\t x,\n\t html = [];\n\n\t for (x = 0; x < diffs.length; x++) {\n\t op = diffs[x][0]; // Operation (insert, delete, equal)\n\n\t data = diffs[x][1]; // Text of change.\n\n\t switch (op) {\n\t case DIFF_INSERT:\n\t html[x] = \"\" + escapeText(data) + \"\";\n\t break;\n\n\t case DIFF_DELETE:\n\t html[x] = \"\" + escapeText(data) + \"\";\n\t break;\n\n\t case DIFF_EQUAL:\n\t html[x] = \"\" + escapeText(data) + \"\";\n\t break;\n\t }\n\t }\n\n\t return html.join(\"\");\n\t };\n\t /**\n\t * Determine the common prefix of two strings.\n\t * @param {string} text1 First string.\n\t * @param {string} text2 Second string.\n\t * @return {number} The number of characters common to the start of each\n\t * string.\n\t */\n\n\n\t DiffMatchPatch.prototype.diffCommonPrefix = function (text1, text2) {\n\t var pointermid, pointermax, pointermin, pointerstart; // Quick check for common null cases.\n\n\t if (!text1 || !text2 || text1.charAt(0) !== text2.charAt(0)) {\n\t return 0;\n\t } // Binary search.\n\t // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n\n\n\t pointermin = 0;\n\t pointermax = Math.min(text1.length, text2.length);\n\t pointermid = pointermax;\n\t pointerstart = 0;\n\n\t while (pointermin < pointermid) {\n\t if (text1.substring(pointerstart, pointermid) === text2.substring(pointerstart, pointermid)) {\n\t pointermin = pointermid;\n\t pointerstart = pointermin;\n\t } else {\n\t pointermax = pointermid;\n\t }\n\n\t pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n\t }\n\n\t return pointermid;\n\t };\n\t /**\n\t * Determine the common suffix of two strings.\n\t * @param {string} text1 First string.\n\t * @param {string} text2 Second string.\n\t * @return {number} The number of characters common to the end of each string.\n\t */\n\n\n\t DiffMatchPatch.prototype.diffCommonSuffix = function (text1, text2) {\n\t var pointermid, pointermax, pointermin, pointerend; // Quick check for common null cases.\n\n\t if (!text1 || !text2 || text1.charAt(text1.length - 1) !== text2.charAt(text2.length - 1)) {\n\t return 0;\n\t } // Binary search.\n\t // Performance analysis: https://neil.fraser.name/news/2007/10/09/\n\n\n\t pointermin = 0;\n\t pointermax = Math.min(text1.length, text2.length);\n\t pointermid = pointermax;\n\t pointerend = 0;\n\n\t while (pointermin < pointermid) {\n\t if (text1.substring(text1.length - pointermid, text1.length - pointerend) === text2.substring(text2.length - pointermid, text2.length - pointerend)) {\n\t pointermin = pointermid;\n\t pointerend = pointermin;\n\t } else {\n\t pointermax = pointermid;\n\t }\n\n\t pointermid = Math.floor((pointermax - pointermin) / 2 + pointermin);\n\t }\n\n\t return pointermid;\n\t };\n\t /**\n\t * Find the differences between two texts. Assumes that the texts do not\n\t * have any common prefix or suffix.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @param {boolean} checklines Speedup flag. If false, then don't run a\n\t * line-level diff first to identify the changed areas.\n\t * If true, then run a faster, slightly less optimal diff.\n\t * @param {number} deadline Time when the diff should be complete by.\n\t * @return {!Array.} Array of diff tuples.\n\t * @private\n\t */\n\n\n\t DiffMatchPatch.prototype.diffCompute = function (text1, text2, checklines, deadline) {\n\t var diffs, longtext, shorttext, i, hm, text1A, text2A, text1B, text2B, midCommon, diffsA, diffsB;\n\n\t if (!text1) {\n\t // Just add some text (speedup).\n\t return [[DIFF_INSERT, text2]];\n\t }\n\n\t if (!text2) {\n\t // Just delete some text (speedup).\n\t return [[DIFF_DELETE, text1]];\n\t }\n\n\t longtext = text1.length > text2.length ? text1 : text2;\n\t shorttext = text1.length > text2.length ? text2 : text1;\n\t i = longtext.indexOf(shorttext);\n\n\t if (i !== -1) {\n\t // Shorter text is inside the longer text (speedup).\n\t diffs = [[DIFF_INSERT, longtext.substring(0, i)], [DIFF_EQUAL, shorttext], [DIFF_INSERT, longtext.substring(i + shorttext.length)]]; // Swap insertions for deletions if diff is reversed.\n\n\t if (text1.length > text2.length) {\n\t diffs[0][0] = diffs[2][0] = DIFF_DELETE;\n\t }\n\n\t return diffs;\n\t }\n\n\t if (shorttext.length === 1) {\n\t // Single character string.\n\t // After the previous speedup, the character can't be an equality.\n\t return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n\t } // Check to see if the problem can be split in two.\n\n\n\t hm = this.diffHalfMatch(text1, text2);\n\n\t if (hm) {\n\t // A half-match was found, sort out the return data.\n\t text1A = hm[0];\n\t text1B = hm[1];\n\t text2A = hm[2];\n\t text2B = hm[3];\n\t midCommon = hm[4]; // Send both pairs off for separate processing.\n\n\t diffsA = this.DiffMain(text1A, text2A, checklines, deadline);\n\t diffsB = this.DiffMain(text1B, text2B, checklines, deadline); // Merge the results.\n\n\t return diffsA.concat([[DIFF_EQUAL, midCommon]], diffsB);\n\t }\n\n\t if (checklines && text1.length > 100 && text2.length > 100) {\n\t return this.diffLineMode(text1, text2, deadline);\n\t }\n\n\t return this.diffBisect(text1, text2, deadline);\n\t };\n\t /**\n\t * Do the two texts share a substring which is at least half the length of the\n\t * longer text?\n\t * This speedup can produce non-minimal diffs.\n\t * @param {string} text1 First string.\n\t * @param {string} text2 Second string.\n\t * @return {Array.} Five element Array, containing the prefix of\n\t * text1, the suffix of text1, the prefix of text2, the suffix of\n\t * text2 and the common middle. Or null if there was no match.\n\t * @private\n\t */\n\n\n\t DiffMatchPatch.prototype.diffHalfMatch = function (text1, text2) {\n\t var longtext, shorttext, dmp, text1A, text2B, text2A, text1B, midCommon, hm1, hm2, hm;\n\t longtext = text1.length > text2.length ? text1 : text2;\n\t shorttext = text1.length > text2.length ? text2 : text1;\n\n\t if (longtext.length < 4 || shorttext.length * 2 < longtext.length) {\n\t return null; // Pointless.\n\t }\n\n\t dmp = this; // 'this' becomes 'window' in a closure.\n\n\t /**\n\t * Does a substring of shorttext exist within longtext such that the substring\n\t * is at least half the length of longtext?\n\t * Closure, but does not reference any external variables.\n\t * @param {string} longtext Longer string.\n\t * @param {string} shorttext Shorter string.\n\t * @param {number} i Start index of quarter length substring within longtext.\n\t * @return {Array.} Five element Array, containing the prefix of\n\t * longtext, the suffix of longtext, the prefix of shorttext, the suffix\n\t * of shorttext and the common middle. Or null if there was no match.\n\t * @private\n\t */\n\n\t function diffHalfMatchI(longtext, shorttext, i) {\n\t var seed, j, bestCommon, prefixLength, suffixLength, bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB; // Start with a 1/4 length substring at position i as a seed.\n\n\t seed = longtext.substring(i, i + Math.floor(longtext.length / 4));\n\t j = -1;\n\t bestCommon = \"\";\n\n\t while ((j = shorttext.indexOf(seed, j + 1)) !== -1) {\n\t prefixLength = dmp.diffCommonPrefix(longtext.substring(i), shorttext.substring(j));\n\t suffixLength = dmp.diffCommonSuffix(longtext.substring(0, i), shorttext.substring(0, j));\n\n\t if (bestCommon.length < suffixLength + prefixLength) {\n\t bestCommon = shorttext.substring(j - suffixLength, j) + shorttext.substring(j, j + prefixLength);\n\t bestLongtextA = longtext.substring(0, i - suffixLength);\n\t bestLongtextB = longtext.substring(i + prefixLength);\n\t bestShorttextA = shorttext.substring(0, j - suffixLength);\n\t bestShorttextB = shorttext.substring(j + prefixLength);\n\t }\n\t }\n\n\t if (bestCommon.length * 2 >= longtext.length) {\n\t return [bestLongtextA, bestLongtextB, bestShorttextA, bestShorttextB, bestCommon];\n\t } else {\n\t return null;\n\t }\n\t } // First check if the second quarter is the seed for a half-match.\n\n\n\t hm1 = diffHalfMatchI(longtext, shorttext, Math.ceil(longtext.length / 4)); // Check again based on the third quarter.\n\n\t hm2 = diffHalfMatchI(longtext, shorttext, Math.ceil(longtext.length / 2));\n\n\t if (!hm1 && !hm2) {\n\t return null;\n\t } else if (!hm2) {\n\t hm = hm1;\n\t } else if (!hm1) {\n\t hm = hm2;\n\t } else {\n\t // Both matched. Select the longest.\n\t hm = hm1[4].length > hm2[4].length ? hm1 : hm2;\n\t } // A half-match was found, sort out the return data.\n\n\n\t if (text1.length > text2.length) {\n\t text1A = hm[0];\n\t text1B = hm[1];\n\t text2A = hm[2];\n\t text2B = hm[3];\n\t } else {\n\t text2A = hm[0];\n\t text2B = hm[1];\n\t text1A = hm[2];\n\t text1B = hm[3];\n\t }\n\n\t midCommon = hm[4];\n\t return [text1A, text1B, text2A, text2B, midCommon];\n\t };\n\t /**\n\t * Do a quick line-level diff on both strings, then rediff the parts for\n\t * greater accuracy.\n\t * This speedup can produce non-minimal diffs.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @param {number} deadline Time when the diff should be complete by.\n\t * @return {!Array.} Array of diff tuples.\n\t * @private\n\t */\n\n\n\t DiffMatchPatch.prototype.diffLineMode = function (text1, text2, deadline) {\n\t var a, diffs, linearray, pointer, countInsert, countDelete, textInsert, textDelete, j; // Scan the text on a line-by-line basis first.\n\n\t a = this.diffLinesToChars(text1, text2);\n\t text1 = a.chars1;\n\t text2 = a.chars2;\n\t linearray = a.lineArray;\n\t diffs = this.DiffMain(text1, text2, false, deadline); // Convert the diff back to original text.\n\n\t this.diffCharsToLines(diffs, linearray); // Eliminate freak matches (e.g. blank lines)\n\n\t this.diffCleanupSemantic(diffs); // Rediff any replacement blocks, this time character-by-character.\n\t // Add a dummy entry at the end.\n\n\t diffs.push([DIFF_EQUAL, \"\"]);\n\t pointer = 0;\n\t countDelete = 0;\n\t countInsert = 0;\n\t textDelete = \"\";\n\t textInsert = \"\";\n\n\t while (pointer < diffs.length) {\n\t switch (diffs[pointer][0]) {\n\t case DIFF_INSERT:\n\t countInsert++;\n\t textInsert += diffs[pointer][1];\n\t break;\n\n\t case DIFF_DELETE:\n\t countDelete++;\n\t textDelete += diffs[pointer][1];\n\t break;\n\n\t case DIFF_EQUAL:\n\t // Upon reaching an equality, check for prior redundancies.\n\t if (countDelete >= 1 && countInsert >= 1) {\n\t // Delete the offending records and add the merged ones.\n\t diffs.splice(pointer - countDelete - countInsert, countDelete + countInsert);\n\t pointer = pointer - countDelete - countInsert;\n\t a = this.DiffMain(textDelete, textInsert, false, deadline);\n\n\t for (j = a.length - 1; j >= 0; j--) {\n\t diffs.splice(pointer, 0, a[j]);\n\t }\n\n\t pointer = pointer + a.length;\n\t }\n\n\t countInsert = 0;\n\t countDelete = 0;\n\t textDelete = \"\";\n\t textInsert = \"\";\n\t break;\n\t }\n\n\t pointer++;\n\t }\n\n\t diffs.pop(); // Remove the dummy entry at the end.\n\n\t return diffs;\n\t };\n\t /**\n\t * Find the 'middle snake' of a diff, split the problem in two\n\t * and return the recursively constructed diff.\n\t * See Myers 1986 paper: An O(ND) Difference Algorithm and Its Variations.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @param {number} deadline Time at which to bail if not yet complete.\n\t * @return {!Array.} Array of diff tuples.\n\t * @private\n\t */\n\n\n\t DiffMatchPatch.prototype.diffBisect = function (text1, text2, deadline) {\n\t var text1Length, text2Length, maxD, vOffset, vLength, v1, v2, x, delta, front, k1start, k1end, k2start, k2end, k2Offset, k1Offset, x1, x2, y1, y2, d, k1, k2; // Cache the text lengths to prevent multiple calls.\n\n\t text1Length = text1.length;\n\t text2Length = text2.length;\n\t maxD = Math.ceil((text1Length + text2Length) / 2);\n\t vOffset = maxD;\n\t vLength = 2 * maxD;\n\t v1 = new Array(vLength);\n\t v2 = new Array(vLength); // Setting all elements to -1 is faster in Chrome & Firefox than mixing\n\t // integers and undefined.\n\n\t for (x = 0; x < vLength; x++) {\n\t v1[x] = -1;\n\t v2[x] = -1;\n\t }\n\n\t v1[vOffset + 1] = 0;\n\t v2[vOffset + 1] = 0;\n\t delta = text1Length - text2Length; // If the total number of characters is odd, then the front path will collide\n\t // with the reverse path.\n\n\t front = delta % 2 !== 0; // Offsets for start and end of k loop.\n\t // Prevents mapping of space beyond the grid.\n\n\t k1start = 0;\n\t k1end = 0;\n\t k2start = 0;\n\t k2end = 0;\n\n\t for (d = 0; d < maxD; d++) {\n\t // Bail out if deadline is reached.\n\t if (new Date().getTime() > deadline) {\n\t break;\n\t } // Walk the front path one step.\n\n\n\t for (k1 = -d + k1start; k1 <= d - k1end; k1 += 2) {\n\t k1Offset = vOffset + k1;\n\n\t if (k1 === -d || k1 !== d && v1[k1Offset - 1] < v1[k1Offset + 1]) {\n\t x1 = v1[k1Offset + 1];\n\t } else {\n\t x1 = v1[k1Offset - 1] + 1;\n\t }\n\n\t y1 = x1 - k1;\n\n\t while (x1 < text1Length && y1 < text2Length && text1.charAt(x1) === text2.charAt(y1)) {\n\t x1++;\n\t y1++;\n\t }\n\n\t v1[k1Offset] = x1;\n\n\t if (x1 > text1Length) {\n\t // Ran off the right of the graph.\n\t k1end += 2;\n\t } else if (y1 > text2Length) {\n\t // Ran off the bottom of the graph.\n\t k1start += 2;\n\t } else if (front) {\n\t k2Offset = vOffset + delta - k1;\n\n\t if (k2Offset >= 0 && k2Offset < vLength && v2[k2Offset] !== -1) {\n\t // Mirror x2 onto top-left coordinate system.\n\t x2 = text1Length - v2[k2Offset];\n\n\t if (x1 >= x2) {\n\t // Overlap detected.\n\t return this.diffBisectSplit(text1, text2, x1, y1, deadline);\n\t }\n\t }\n\t }\n\t } // Walk the reverse path one step.\n\n\n\t for (k2 = -d + k2start; k2 <= d - k2end; k2 += 2) {\n\t k2Offset = vOffset + k2;\n\n\t if (k2 === -d || k2 !== d && v2[k2Offset - 1] < v2[k2Offset + 1]) {\n\t x2 = v2[k2Offset + 1];\n\t } else {\n\t x2 = v2[k2Offset - 1] + 1;\n\t }\n\n\t y2 = x2 - k2;\n\n\t while (x2 < text1Length && y2 < text2Length && text1.charAt(text1Length - x2 - 1) === text2.charAt(text2Length - y2 - 1)) {\n\t x2++;\n\t y2++;\n\t }\n\n\t v2[k2Offset] = x2;\n\n\t if (x2 > text1Length) {\n\t // Ran off the left of the graph.\n\t k2end += 2;\n\t } else if (y2 > text2Length) {\n\t // Ran off the top of the graph.\n\t k2start += 2;\n\t } else if (!front) {\n\t k1Offset = vOffset + delta - k2;\n\n\t if (k1Offset >= 0 && k1Offset < vLength && v1[k1Offset] !== -1) {\n\t x1 = v1[k1Offset];\n\t y1 = vOffset + x1 - k1Offset; // Mirror x2 onto top-left coordinate system.\n\n\t x2 = text1Length - x2;\n\n\t if (x1 >= x2) {\n\t // Overlap detected.\n\t return this.diffBisectSplit(text1, text2, x1, y1, deadline);\n\t }\n\t }\n\t }\n\t }\n\t } // Diff took too long and hit the deadline or\n\t // number of diffs equals number of characters, no commonality at all.\n\n\n\t return [[DIFF_DELETE, text1], [DIFF_INSERT, text2]];\n\t };\n\t /**\n\t * Given the location of the 'middle snake', split the diff in two parts\n\t * and recurse.\n\t * @param {string} text1 Old string to be diffed.\n\t * @param {string} text2 New string to be diffed.\n\t * @param {number} x Index of split point in text1.\n\t * @param {number} y Index of split point in text2.\n\t * @param {number} deadline Time at which to bail if not yet complete.\n\t * @return {!Array.} Array of diff tuples.\n\t * @private\n\t */\n\n\n\t DiffMatchPatch.prototype.diffBisectSplit = function (text1, text2, x, y, deadline) {\n\t var text1a, text1b, text2a, text2b, diffs, diffsb;\n\t text1a = text1.substring(0, x);\n\t text2a = text2.substring(0, y);\n\t text1b = text1.substring(x);\n\t text2b = text2.substring(y); // Compute both diffs serially.\n\n\t diffs = this.DiffMain(text1a, text2a, false, deadline);\n\t diffsb = this.DiffMain(text1b, text2b, false, deadline);\n\t return diffs.concat(diffsb);\n\t };\n\t /**\n\t * Reduce the number of edits by eliminating semantically trivial equalities.\n\t * @param {!Array.} diffs Array of diff tuples.\n\t */\n\n\n\t DiffMatchPatch.prototype.diffCleanupSemantic = function (diffs) {\n\t var changes, equalities, equalitiesLength, lastequality, pointer, lengthInsertions2, lengthDeletions2, lengthInsertions1, lengthDeletions1, deletion, insertion, overlapLength1, overlapLength2;\n\t changes = false;\n\t equalities = []; // Stack of indices where equalities are found.\n\n\t equalitiesLength = 0; // Keeping our own length var is faster in JS.\n\n\t /** @type {?string} */\n\n\t lastequality = null; // Always equal to diffs[equalities[equalitiesLength - 1]][1]\n\n\t pointer = 0; // Index of current position.\n\t // Number of characters that changed prior to the equality.\n\n\t lengthInsertions1 = 0;\n\t lengthDeletions1 = 0; // Number of characters that changed after the equality.\n\n\t lengthInsertions2 = 0;\n\t lengthDeletions2 = 0;\n\n\t while (pointer < diffs.length) {\n\t if (diffs[pointer][0] === DIFF_EQUAL) {\n\t // Equality found.\n\t equalities[equalitiesLength++] = pointer;\n\t lengthInsertions1 = lengthInsertions2;\n\t lengthDeletions1 = lengthDeletions2;\n\t lengthInsertions2 = 0;\n\t lengthDeletions2 = 0;\n\t lastequality = diffs[pointer][1];\n\t } else {\n\t // An insertion or deletion.\n\t if (diffs[pointer][0] === DIFF_INSERT) {\n\t lengthInsertions2 += diffs[pointer][1].length;\n\t } else {\n\t lengthDeletions2 += diffs[pointer][1].length;\n\t } // Eliminate an equality that is smaller or equal to the edits on both\n\t // sides of it.\n\n\n\t if (lastequality && lastequality.length <= Math.max(lengthInsertions1, lengthDeletions1) && lastequality.length <= Math.max(lengthInsertions2, lengthDeletions2)) {\n\t // Duplicate record.\n\t diffs.splice(equalities[equalitiesLength - 1], 0, [DIFF_DELETE, lastequality]); // Change second copy to insert.\n\n\t diffs[equalities[equalitiesLength - 1] + 1][0] = DIFF_INSERT; // Throw away the equality we just deleted.\n\n\t equalitiesLength--; // Throw away the previous equality (it needs to be reevaluated).\n\n\t equalitiesLength--;\n\t pointer = equalitiesLength > 0 ? equalities[equalitiesLength - 1] : -1; // Reset the counters.\n\n\t lengthInsertions1 = 0;\n\t lengthDeletions1 = 0;\n\t lengthInsertions2 = 0;\n\t lengthDeletions2 = 0;\n\t lastequality = null;\n\t changes = true;\n\t }\n\t }\n\n\t pointer++;\n\t } // Normalize the diff.\n\n\n\t if (changes) {\n\t this.diffCleanupMerge(diffs);\n\t } // Find any overlaps between deletions and insertions.\n\t // e.g: abcxxxxxxdef\n\t // -> abcxxxdef\n\t // e.g: xxxabcdefxxx\n\t // -> defxxxabc\n\t // Only extract an overlap if it is as big as the edit ahead or behind it.\n\n\n\t pointer = 1;\n\n\t while (pointer < diffs.length) {\n\t if (diffs[pointer - 1][0] === DIFF_DELETE && diffs[pointer][0] === DIFF_INSERT) {\n\t deletion = diffs[pointer - 1][1];\n\t insertion = diffs[pointer][1];\n\t overlapLength1 = this.diffCommonOverlap(deletion, insertion);\n\t overlapLength2 = this.diffCommonOverlap(insertion, deletion);\n\n\t if (overlapLength1 >= overlapLength2) {\n\t if (overlapLength1 >= deletion.length / 2 || overlapLength1 >= insertion.length / 2) {\n\t // Overlap found. Insert an equality and trim the surrounding edits.\n\t diffs.splice(pointer, 0, [DIFF_EQUAL, insertion.substring(0, overlapLength1)]);\n\t diffs[pointer - 1][1] = deletion.substring(0, deletion.length - overlapLength1);\n\t diffs[pointer + 1][1] = insertion.substring(overlapLength1);\n\t pointer++;\n\t }\n\t } else {\n\t if (overlapLength2 >= deletion.length / 2 || overlapLength2 >= insertion.length / 2) {\n\t // Reverse overlap found.\n\t // Insert an equality and swap and trim the surrounding edits.\n\t diffs.splice(pointer, 0, [DIFF_EQUAL, deletion.substring(0, overlapLength2)]);\n\t diffs[pointer - 1][0] = DIFF_INSERT;\n\t diffs[pointer - 1][1] = insertion.substring(0, insertion.length - overlapLength2);\n\t diffs[pointer + 1][0] = DIFF_DELETE;\n\t diffs[pointer + 1][1] = deletion.substring(overlapLength2);\n\t pointer++;\n\t }\n\t }\n\n\t pointer++;\n\t }\n\n\t pointer++;\n\t }\n\t };\n\t /**\n\t * Determine if the suffix of one string is the prefix of another.\n\t * @param {string} text1 First string.\n\t * @param {string} text2 Second string.\n\t * @return {number} The number of characters common to the end of the first\n\t * string and the start of the second string.\n\t * @private\n\t */\n\n\n\t DiffMatchPatch.prototype.diffCommonOverlap = function (text1, text2) {\n\t var text1Length, text2Length, textLength, best, length, pattern, found; // Cache the text lengths to prevent multiple calls.\n\n\t text1Length = text1.length;\n\t text2Length = text2.length; // Eliminate the null case.\n\n\t if (text1Length === 0 || text2Length === 0) {\n\t return 0;\n\t } // Truncate the longer string.\n\n\n\t if (text1Length > text2Length) {\n\t text1 = text1.substring(text1Length - text2Length);\n\t } else if (text1Length < text2Length) {\n\t text2 = text2.substring(0, text1Length);\n\t }\n\n\t textLength = Math.min(text1Length, text2Length); // Quick check for the worst case.\n\n\t if (text1 === text2) {\n\t return textLength;\n\t } // Start by looking for a single character match\n\t // and increase length until no match is found.\n\t // Performance analysis: https://neil.fraser.name/news/2010/11/04/\n\n\n\t best = 0;\n\t length = 1;\n\n\t while (true) {\n\t pattern = text1.substring(textLength - length);\n\t found = text2.indexOf(pattern);\n\n\t if (found === -1) {\n\t return best;\n\t }\n\n\t length += found;\n\n\t if (found === 0 || text1.substring(textLength - length) === text2.substring(0, length)) {\n\t best = length;\n\t length++;\n\t }\n\t }\n\t };\n\t /**\n\t * Split two texts into an array of strings. Reduce the texts to a string of\n\t * hashes where each Unicode character represents one line.\n\t * @param {string} text1 First string.\n\t * @param {string} text2 Second string.\n\t * @return {{chars1: string, chars2: string, lineArray: !Array.}}\n\t * An object containing the encoded text1, the encoded text2 and\n\t * the array of unique strings.\n\t * The zeroth element of the array of unique strings is intentionally blank.\n\t * @private\n\t */\n\n\n\t DiffMatchPatch.prototype.diffLinesToChars = function (text1, text2) {\n\t var lineArray, lineHash, chars1, chars2;\n\t lineArray = []; // E.g. lineArray[4] === 'Hello\\n'\n\n\t lineHash = {}; // E.g. lineHash['Hello\\n'] === 4\n\t // '\\x00' is a valid character, but various debuggers don't like it.\n\t // So we'll insert a junk entry to avoid generating a null character.\n\n\t lineArray[0] = \"\";\n\t /**\n\t * Split a text into an array of strings. Reduce the texts to a string of\n\t * hashes where each Unicode character represents one line.\n\t * Modifies linearray and linehash through being a closure.\n\t * @param {string} text String to encode.\n\t * @return {string} Encoded string.\n\t * @private\n\t */\n\n\t function diffLinesToCharsMunge(text) {\n\t var chars, lineStart, lineEnd, lineArrayLength, line;\n\t chars = \"\"; // Walk the text, pulling out a substring for each line.\n\t // text.split('\\n') would would temporarily double our memory footprint.\n\t // Modifying text would create many large strings to garbage collect.\n\n\t lineStart = 0;\n\t lineEnd = -1; // Keeping our own length variable is faster than looking it up.\n\n\t lineArrayLength = lineArray.length;\n\n\t while (lineEnd < text.length - 1) {\n\t lineEnd = text.indexOf(\"\\n\", lineStart);\n\n\t if (lineEnd === -1) {\n\t lineEnd = text.length - 1;\n\t }\n\n\t line = text.substring(lineStart, lineEnd + 1);\n\t lineStart = lineEnd + 1;\n\n\t if (hasOwn.call(lineHash, line)) {\n\t chars += String.fromCharCode(lineHash[line]);\n\t } else {\n\t chars += String.fromCharCode(lineArrayLength);\n\t lineHash[line] = lineArrayLength;\n\t lineArray[lineArrayLength++] = line;\n\t }\n\t }\n\n\t return chars;\n\t }\n\n\t chars1 = diffLinesToCharsMunge(text1);\n\t chars2 = diffLinesToCharsMunge(text2);\n\t return {\n\t chars1: chars1,\n\t chars2: chars2,\n\t lineArray: lineArray\n\t };\n\t };\n\t /**\n\t * Rehydrate the text in a diff from a string of line hashes to real lines of\n\t * text.\n\t * @param {!Array.} diffs Array of diff tuples.\n\t * @param {!Array.} lineArray Array of unique strings.\n\t * @private\n\t */\n\n\n\t DiffMatchPatch.prototype.diffCharsToLines = function (diffs, lineArray) {\n\t var x, chars, text, y;\n\n\t for (x = 0; x < diffs.length; x++) {\n\t chars = diffs[x][1];\n\t text = [];\n\n\t for (y = 0; y < chars.length; y++) {\n\t text[y] = lineArray[chars.charCodeAt(y)];\n\t }\n\n\t diffs[x][1] = text.join(\"\");\n\t }\n\t };\n\t /**\n\t * Reorder and merge like edit sections. Merge equalities.\n\t * Any edit section can move as long as it doesn't cross an equality.\n\t * @param {!Array.} diffs Array of diff tuples.\n\t */\n\n\n\t DiffMatchPatch.prototype.diffCleanupMerge = function (diffs) {\n\t var pointer, countDelete, countInsert, textInsert, textDelete, commonlength, changes, diffPointer, position;\n\t diffs.push([DIFF_EQUAL, \"\"]); // Add a dummy entry at the end.\n\n\t pointer = 0;\n\t countDelete = 0;\n\t countInsert = 0;\n\t textDelete = \"\";\n\t textInsert = \"\";\n\n\t while (pointer < diffs.length) {\n\t switch (diffs[pointer][0]) {\n\t case DIFF_INSERT:\n\t countInsert++;\n\t textInsert += diffs[pointer][1];\n\t pointer++;\n\t break;\n\n\t case DIFF_DELETE:\n\t countDelete++;\n\t textDelete += diffs[pointer][1];\n\t pointer++;\n\t break;\n\n\t case DIFF_EQUAL:\n\t // Upon reaching an equality, check for prior redundancies.\n\t if (countDelete + countInsert > 1) {\n\t if (countDelete !== 0 && countInsert !== 0) {\n\t // Factor out any common prefixes.\n\t commonlength = this.diffCommonPrefix(textInsert, textDelete);\n\n\t if (commonlength !== 0) {\n\t if (pointer - countDelete - countInsert > 0 && diffs[pointer - countDelete - countInsert - 1][0] === DIFF_EQUAL) {\n\t diffs[pointer - countDelete - countInsert - 1][1] += textInsert.substring(0, commonlength);\n\t } else {\n\t diffs.splice(0, 0, [DIFF_EQUAL, textInsert.substring(0, commonlength)]);\n\t pointer++;\n\t }\n\n\t textInsert = textInsert.substring(commonlength);\n\t textDelete = textDelete.substring(commonlength);\n\t } // Factor out any common suffixies.\n\n\n\t commonlength = this.diffCommonSuffix(textInsert, textDelete);\n\n\t if (commonlength !== 0) {\n\t diffs[pointer][1] = textInsert.substring(textInsert.length - commonlength) + diffs[pointer][1];\n\t textInsert = textInsert.substring(0, textInsert.length - commonlength);\n\t textDelete = textDelete.substring(0, textDelete.length - commonlength);\n\t }\n\t } // Delete the offending records and add the merged ones.\n\n\n\t if (countDelete === 0) {\n\t diffs.splice(pointer - countInsert, countDelete + countInsert, [DIFF_INSERT, textInsert]);\n\t } else if (countInsert === 0) {\n\t diffs.splice(pointer - countDelete, countDelete + countInsert, [DIFF_DELETE, textDelete]);\n\t } else {\n\t diffs.splice(pointer - countDelete - countInsert, countDelete + countInsert, [DIFF_DELETE, textDelete], [DIFF_INSERT, textInsert]);\n\t }\n\n\t pointer = pointer - countDelete - countInsert + (countDelete ? 1 : 0) + (countInsert ? 1 : 0) + 1;\n\t } else if (pointer !== 0 && diffs[pointer - 1][0] === DIFF_EQUAL) {\n\t // Merge this equality with the previous one.\n\t diffs[pointer - 1][1] += diffs[pointer][1];\n\t diffs.splice(pointer, 1);\n\t } else {\n\t pointer++;\n\t }\n\n\t countInsert = 0;\n\t countDelete = 0;\n\t textDelete = \"\";\n\t textInsert = \"\";\n\t break;\n\t }\n\t }\n\n\t if (diffs[diffs.length - 1][1] === \"\") {\n\t diffs.pop(); // Remove the dummy entry at the end.\n\t } // Second pass: look for single edits surrounded on both sides by equalities\n\t // which can be shifted sideways to eliminate an equality.\n\t // e.g: ABAC -> ABAC\n\n\n\t changes = false;\n\t pointer = 1; // Intentionally ignore the first and last element (don't need checking).\n\n\t while (pointer < diffs.length - 1) {\n\t if (diffs[pointer - 1][0] === DIFF_EQUAL && diffs[pointer + 1][0] === DIFF_EQUAL) {\n\t diffPointer = diffs[pointer][1];\n\t position = diffPointer.substring(diffPointer.length - diffs[pointer - 1][1].length); // This is a single edit surrounded by equalities.\n\n\t if (position === diffs[pointer - 1][1]) {\n\t // Shift the edit over the previous equality.\n\t diffs[pointer][1] = diffs[pointer - 1][1] + diffs[pointer][1].substring(0, diffs[pointer][1].length - diffs[pointer - 1][1].length);\n\t diffs[pointer + 1][1] = diffs[pointer - 1][1] + diffs[pointer + 1][1];\n\t diffs.splice(pointer - 1, 1);\n\t changes = true;\n\t } else if (diffPointer.substring(0, diffs[pointer + 1][1].length) === diffs[pointer + 1][1]) {\n\t // Shift the edit over the next equality.\n\t diffs[pointer - 1][1] += diffs[pointer + 1][1];\n\t diffs[pointer][1] = diffs[pointer][1].substring(diffs[pointer + 1][1].length) + diffs[pointer + 1][1];\n\t diffs.splice(pointer + 1, 1);\n\t changes = true;\n\t }\n\t }\n\n\t pointer++;\n\t } // If shifts were made, the diff needs reordering and another shift sweep.\n\n\n\t if (changes) {\n\t this.diffCleanupMerge(diffs);\n\t }\n\t };\n\n\t return function (o, n) {\n\t var diff, output, text;\n\t diff = new DiffMatchPatch();\n\t output = diff.DiffMain(o, n);\n\t diff.diffCleanupEfficiency(output);\n\t text = diff.diffPrettyHtml(output);\n\t return text;\n\t };\n\t}();\n\n}((function() { return this; }())));\n","/* globals QUnit */\n\n(function() {\n QUnit.config.autostart = false;\n QUnit.config.urlConfig.push({ id: 'nocontainer', label: 'Hide container' });\n QUnit.config.urlConfig.push({ id: 'nolint', label: 'Disable Linting' });\n QUnit.config.urlConfig.push({ id: 'dockcontainer', label: 'Dock container' });\n QUnit.config.urlConfig.push({ id: 'devmode', label: 'Development mode' });\n\n QUnit.config.testTimeout = QUnit.urlParams.devmode ? null : 60000; //Default Test Timeout 60 Seconds\n})();\n","var QUnitDOM = (function (exports) {\n 'use strict';\n\n function exists(options, message) {\r\n var expectedCount = null;\r\n if (typeof options === 'string') {\r\n message = options;\r\n }\r\n else if (options) {\r\n expectedCount = options.count;\r\n }\r\n var elements = this.findElements();\r\n if (expectedCount === null) {\r\n var result = elements.length > 0;\r\n var expected = format(this.targetDescription);\r\n var actual = result ? expected : format(this.targetDescription, 0);\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else if (typeof expectedCount === 'number') {\r\n var result = elements.length === expectedCount;\r\n var actual = format(this.targetDescription, elements.length);\r\n var expected = format(this.targetDescription, expectedCount);\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n throw new TypeError(\"Unexpected Parameter: \" + expectedCount);\r\n }\r\n }\r\n function format(selector, num) {\r\n if (num === undefined || num === null) {\r\n return \"Element \" + selector + \" exists\";\r\n }\r\n else if (num === 0) {\r\n return \"Element \" + selector + \" does not exist\";\r\n }\r\n else if (num === 1) {\r\n return \"Element \" + selector + \" exists once\";\r\n }\r\n else if (num === 2) {\r\n return \"Element \" + selector + \" exists twice\";\r\n }\r\n else {\r\n return \"Element \" + selector + \" exists \" + num + \" times\";\r\n }\r\n }\n\n // imported from https://github.com/nathanboktae/chai-dom\r\n function elementToString(el) {\r\n if (!el)\r\n return '';\r\n var desc;\r\n if (el instanceof NodeList) {\r\n if (el.length === 0) {\r\n return 'empty NodeList';\r\n }\r\n desc = Array.prototype.slice.call(el, 0, 5).map(elementToString).join(', ');\r\n return el.length > 5 ? desc + \"... (+\" + (el.length - 5) + \" more)\" : desc;\r\n }\r\n if (!(el instanceof HTMLElement || el instanceof SVGElement)) {\r\n return String(el);\r\n }\r\n desc = el.tagName.toLowerCase();\r\n if (el.id) {\r\n desc += \"#\" + el.id;\r\n }\r\n if (el.className && !(el.className instanceof SVGAnimatedString)) {\r\n desc += \".\" + String(el.className).replace(/\\s+/g, '.');\r\n }\r\n Array.prototype.forEach.call(el.attributes, function (attr) {\r\n if (attr.name !== 'class' && attr.name !== 'id') {\r\n desc += \"[\" + attr.name + (attr.value ? \"=\\\"\" + attr.value + \"\\\"]\" : ']');\r\n }\r\n });\r\n return desc;\r\n }\n\n function focused(message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n var result = document.activeElement === element;\r\n var actual = elementToString(document.activeElement);\r\n var expected = elementToString(this.target);\r\n if (!message) {\r\n message = \"Element \" + expected + \" is focused\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\n\n function notFocused(message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n var result = document.activeElement !== element;\r\n var expected = \"Element \" + this.targetDescription + \" is not focused\";\r\n var actual = result ? expected : \"Element \" + this.targetDescription + \" is focused\";\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, message: message, actual: actual, expected: expected });\r\n }\n\n function checked(message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n var isChecked = element.checked === true;\r\n var isNotChecked = element.checked === false;\r\n var result = isChecked;\r\n var hasCheckedProp = isChecked || isNotChecked;\r\n if (!hasCheckedProp) {\r\n var ariaChecked = element.getAttribute('aria-checked');\r\n if (ariaChecked !== null) {\r\n result = ariaChecked === 'true';\r\n }\r\n }\r\n var actual = result ? 'checked' : 'not checked';\r\n var expected = 'checked';\r\n if (!message) {\r\n message = \"Element \" + elementToString(this.target) + \" is checked\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\n\n function notChecked(message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n var isChecked = element.checked === true;\r\n var isNotChecked = element.checked === false;\r\n var result = !isChecked;\r\n var hasCheckedProp = isChecked || isNotChecked;\r\n if (!hasCheckedProp) {\r\n var ariaChecked = element.getAttribute('aria-checked');\r\n if (ariaChecked !== null) {\r\n result = ariaChecked !== 'true';\r\n }\r\n }\r\n var actual = result ? 'not checked' : 'checked';\r\n var expected = 'not checked';\r\n if (!message) {\r\n message = \"Element \" + elementToString(this.target) + \" is not checked\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\n\n function required(message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n if (!(element instanceof HTMLInputElement ||\r\n element instanceof HTMLTextAreaElement ||\r\n element instanceof HTMLSelectElement)) {\r\n throw new TypeError(\"Unexpected Element Type: \" + element.toString());\r\n }\r\n var result = element.required === true;\r\n var actual = result ? 'required' : 'not required';\r\n var expected = 'required';\r\n if (!message) {\r\n message = \"Element \" + elementToString(this.target) + \" is required\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\n\n function notRequired(message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n if (!(element instanceof HTMLInputElement ||\r\n element instanceof HTMLTextAreaElement ||\r\n element instanceof HTMLSelectElement)) {\r\n throw new TypeError(\"Unexpected Element Type: \" + element.toString());\r\n }\r\n var result = element.required === false;\r\n var actual = !result ? 'required' : 'not required';\r\n var expected = 'not required';\r\n if (!message) {\r\n message = \"Element \" + elementToString(this.target) + \" is not required\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\n\n function isValid(message, options) {\r\n if (options === void 0) { options = {}; }\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n if (!(element instanceof HTMLFormElement ||\r\n element instanceof HTMLInputElement ||\r\n element instanceof HTMLTextAreaElement ||\r\n element instanceof HTMLButtonElement ||\r\n element instanceof HTMLOutputElement ||\r\n element instanceof HTMLSelectElement)) {\r\n throw new TypeError(\"Unexpected Element Type: \" + element.toString());\r\n }\r\n var validity = element.reportValidity() === true;\r\n var result = validity === !options.inverted;\r\n var actual = validity ? 'valid' : 'not valid';\r\n var expected = options.inverted ? 'not valid' : 'valid';\r\n if (!message) {\r\n message = \"Element \" + elementToString(this.target) + \" is \" + actual;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\n\n // Visible logic based on jQuery's\r\n // https://github.com/jquery/jquery/blob/4a2bcc27f9c3ee24b3effac0fbe1285d1ee23cc5/src/css/hiddenVisibleSelectors.js#L11-L13\r\n function visible(el) {\r\n if (el === null)\r\n return false;\r\n if (el.offsetWidth === 0 || el.offsetHeight === 0)\r\n return false;\r\n var clientRects = el.getClientRects();\r\n if (clientRects.length === 0)\r\n return false;\r\n for (var i = 0; i < clientRects.length; i++) {\r\n var rect = clientRects[i];\r\n if (rect.width !== 0 && rect.height !== 0)\r\n return true;\r\n }\r\n return false;\r\n }\n\n function isVisible(options, message) {\r\n var expectedCount = null;\r\n if (typeof options === 'string') {\r\n message = options;\r\n }\r\n else if (options) {\r\n expectedCount = options.count;\r\n }\r\n var elements = this.findElements().filter(visible);\r\n if (expectedCount === null) {\r\n var result = elements.length > 0;\r\n var expected = format$1(this.targetDescription);\r\n var actual = result ? expected : format$1(this.targetDescription, 0);\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else if (typeof expectedCount === 'number') {\r\n var result = elements.length === expectedCount;\r\n var actual = format$1(this.targetDescription, elements.length);\r\n var expected = format$1(this.targetDescription, expectedCount);\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n throw new TypeError(\"Unexpected Parameter: \" + expectedCount);\r\n }\r\n }\r\n function format$1(selector, num) {\r\n if (num === undefined || num === null) {\r\n return \"Element \" + selector + \" is visible\";\r\n }\r\n else if (num === 0) {\r\n return \"Element \" + selector + \" is not visible\";\r\n }\r\n else if (num === 1) {\r\n return \"Element \" + selector + \" is visible once\";\r\n }\r\n else if (num === 2) {\r\n return \"Element \" + selector + \" is visible twice\";\r\n }\r\n else {\r\n return \"Element \" + selector + \" is visible \" + num + \" times\";\r\n }\r\n }\n\n function isDisabled(message, options) {\r\n if (options === void 0) { options = {}; }\r\n var inverted = options.inverted;\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n if (!(element instanceof HTMLInputElement ||\r\n element instanceof HTMLTextAreaElement ||\r\n element instanceof HTMLSelectElement ||\r\n element instanceof HTMLButtonElement ||\r\n element instanceof HTMLOptGroupElement ||\r\n element instanceof HTMLOptionElement ||\r\n element instanceof HTMLFieldSetElement)) {\r\n throw new TypeError(\"Unexpected Element Type: \" + element.toString());\r\n }\r\n var result = element.disabled === !inverted;\r\n var actual = element.disabled === false\r\n ? \"Element \" + this.targetDescription + \" is not disabled\"\r\n : \"Element \" + this.targetDescription + \" is disabled\";\r\n var expected = inverted\r\n ? \"Element \" + this.targetDescription + \" is not disabled\"\r\n : \"Element \" + this.targetDescription + \" is disabled\";\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\n\n function matchesSelector(elements, compareSelector) {\r\n var failures = elements.filter(function (it) { return !it.matches(compareSelector); });\r\n return failures.length;\r\n }\n\n function collapseWhitespace(string) {\r\n return string\r\n .replace(/[\\t\\r\\n]/g, ' ')\r\n .replace(/ +/g, ' ')\r\n .replace(/^ /, '')\r\n .replace(/ $/, '');\r\n }\n\n /**\r\n * This function can be used to convert a NodeList to a regular array.\r\n * We should be using `Array.from()` for this, but IE11 doesn't support that :(\r\n *\r\n * @private\r\n */\r\n function toArray(list) {\r\n return Array.prototype.slice.call(list);\r\n }\n\n var DOMAssertions = /** @class */ (function () {\r\n function DOMAssertions(target, rootElement, testContext) {\r\n this.target = target;\r\n this.rootElement = rootElement;\r\n this.testContext = testContext;\r\n }\r\n /**\r\n * Assert an {@link HTMLElement} (or multiple) matching the `selector` exists.\r\n *\r\n * @param {object?} options\r\n * @param {number?} options.count\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('#title').exists();\r\n * assert.dom('.choice').exists({ count: 4 });\r\n *\r\n * @see {@link #doesNotExist}\r\n */\r\n DOMAssertions.prototype.exists = function (options, message) {\r\n exists.call(this, options, message);\r\n return this;\r\n };\r\n /**\r\n * Assert an {@link HTMLElement} matching the `selector` does not exists.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.should-not-exist').doesNotExist();\r\n *\r\n * @see {@link #exists}\r\n */\r\n DOMAssertions.prototype.doesNotExist = function (message) {\r\n exists.call(this, { count: 0 }, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` is currently checked.\r\n *\r\n * Note: This also supports `aria-checked=\"true/false\"`.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.active').isChecked();\r\n *\r\n * @see {@link #isNotChecked}\r\n */\r\n DOMAssertions.prototype.isChecked = function (message) {\r\n checked.call(this, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` is currently unchecked.\r\n *\r\n * Note: This also supports `aria-checked=\"true/false\"`.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.active').isNotChecked();\r\n *\r\n * @see {@link #isChecked}\r\n */\r\n DOMAssertions.prototype.isNotChecked = function (message) {\r\n notChecked.call(this, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` is currently focused.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.email').isFocused();\r\n *\r\n * @see {@link #isNotFocused}\r\n */\r\n DOMAssertions.prototype.isFocused = function (message) {\r\n focused.call(this, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` is not currently focused.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input[type=\"password\"]').isNotFocused();\r\n *\r\n * @see {@link #isFocused}\r\n */\r\n DOMAssertions.prototype.isNotFocused = function (message) {\r\n notFocused.call(this, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` is currently required.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input[type=\"text\"]').isRequired();\r\n *\r\n * @see {@link #isNotRequired}\r\n */\r\n DOMAssertions.prototype.isRequired = function (message) {\r\n required.call(this, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` is currently not required.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input[type=\"text\"]').isNotRequired();\r\n *\r\n * @see {@link #isRequired}\r\n */\r\n DOMAssertions.prototype.isNotRequired = function (message) {\r\n notRequired.call(this, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} passes validation\r\n *\r\n * Validity is determined by asserting that:\r\n *\r\n * - `element.reportValidity() === true`\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.input').isValid();\r\n *\r\n * @see {@link #isValid}\r\n */\r\n DOMAssertions.prototype.isValid = function (message) {\r\n isValid.call(this, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} does not pass validation\r\n *\r\n * Validity is determined by asserting that:\r\n *\r\n * - `element.reportValidity() === true`\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.input').isNotValid();\r\n *\r\n * @see {@link #isValid}\r\n */\r\n DOMAssertions.prototype.isNotValid = function (message) {\r\n isValid.call(this, message, { inverted: true });\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` exists and is visible.\r\n *\r\n * Visibility is determined by asserting that:\r\n *\r\n * - the element's offsetWidth and offsetHeight are non-zero\r\n * - any of the element's DOMRect objects have a non-zero size\r\n *\r\n * Additionally, visibility in this case means that the element is visible on the page,\r\n * but not necessarily in the viewport.\r\n *\r\n * @param {object?} options\r\n * @param {number?} options.count\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('#title').isVisible();\r\n * assert.dom('.choice').isVisible({ count: 4 });\r\n *\r\n * @see {@link #isNotVisible}\r\n */\r\n DOMAssertions.prototype.isVisible = function (options, message) {\r\n isVisible.call(this, options, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` does not exist or is not visible on the page.\r\n *\r\n * Visibility is determined by asserting that:\r\n *\r\n * - the element's offsetWidth or offsetHeight are zero\r\n * - all of the element's DOMRect objects have a size of zero\r\n *\r\n * Additionally, visibility in this case means that the element is visible on the page,\r\n * but not necessarily in the viewport.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.foo').isNotVisible();\r\n *\r\n * @see {@link #isVisible}\r\n */\r\n DOMAssertions.prototype.isNotVisible = function (message) {\r\n isVisible.call(this, { count: 0 }, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} has an attribute with the provided `name`\r\n * and optionally checks if the attribute `value` matches the provided text\r\n * or regular expression.\r\n *\r\n * @param {string} name\r\n * @param {string|RegExp|object?} value\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.password-input').hasAttribute('type', 'password');\r\n *\r\n * @see {@link #doesNotHaveAttribute}\r\n */\r\n DOMAssertions.prototype.hasAttribute = function (name, value, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n if (arguments.length === 1) {\r\n value = { any: true };\r\n }\r\n var actualValue = element.getAttribute(name);\r\n if (value instanceof RegExp) {\r\n var result = value.test(actualValue);\r\n var expected = \"Element \" + this.targetDescription + \" has attribute \\\"\" + name + \"\\\" with value matching \" + value;\r\n var actual = actualValue === null\r\n ? \"Element \" + this.targetDescription + \" does not have attribute \\\"\" + name + \"\\\"\"\r\n : \"Element \" + this.targetDescription + \" has attribute \\\"\" + name + \"\\\" with value \" + JSON.stringify(actualValue);\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else if (value.any === true) {\r\n var result = actualValue !== null;\r\n var expected = \"Element \" + this.targetDescription + \" has attribute \\\"\" + name + \"\\\"\";\r\n var actual = result\r\n ? expected\r\n : \"Element \" + this.targetDescription + \" does not have attribute \\\"\" + name + \"\\\"\";\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n var result = value === actualValue;\r\n var expected = \"Element \" + this.targetDescription + \" has attribute \\\"\" + name + \"\\\" with value \" + JSON.stringify(value);\r\n var actual = actualValue === null\r\n ? \"Element \" + this.targetDescription + \" does not have attribute \\\"\" + name + \"\\\"\"\r\n : \"Element \" + this.targetDescription + \" has attribute \\\"\" + name + \"\\\" with value \" + JSON.stringify(actualValue);\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} has no attribute with the provided `name`.\r\n *\r\n * **Aliases:** `hasNoAttribute`, `lacksAttribute`\r\n *\r\n * @param {string} name\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.username').hasNoAttribute('disabled');\r\n *\r\n * @see {@link #hasAttribute}\r\n */\r\n DOMAssertions.prototype.doesNotHaveAttribute = function (name, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return;\r\n var result = !element.hasAttribute(name);\r\n var expected = \"Element \" + this.targetDescription + \" does not have attribute \\\"\" + name + \"\\\"\";\r\n var actual = expected;\r\n if (!result) {\r\n var value = element.getAttribute(name);\r\n actual = \"Element \" + this.targetDescription + \" has attribute \\\"\" + name + \"\\\" with value \" + JSON.stringify(value);\r\n }\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n return this;\r\n };\r\n DOMAssertions.prototype.hasNoAttribute = function (name, message) {\r\n return this.doesNotHaveAttribute(name, message);\r\n };\r\n DOMAssertions.prototype.lacksAttribute = function (name, message) {\r\n return this.doesNotHaveAttribute(name, message);\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} has an ARIA attribute with the provided\r\n * `name` and optionally checks if the attribute `value` matches the provided\r\n * text or regular expression.\r\n *\r\n * @param {string} name\r\n * @param {string|RegExp|object?} value\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('button').hasAria('pressed', 'true');\r\n *\r\n * @see {@link #hasNoAria}\r\n */\r\n DOMAssertions.prototype.hasAria = function (name, value, message) {\r\n return this.hasAttribute(\"aria-\" + name, value, message);\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} has no ARIA attribute with the\r\n * provided `name`.\r\n *\r\n * @param {string} name\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('button').doesNotHaveAria('pressed');\r\n *\r\n * @see {@link #hasAria}\r\n */\r\n DOMAssertions.prototype.doesNotHaveAria = function (name, message) {\r\n return this.doesNotHaveAttribute(\"aria-\" + name, message);\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} has a property with the provided `name`\r\n * and checks if the property `value` matches the provided text or regular\r\n * expression.\r\n *\r\n * @param {string} name\r\n * @param {RegExp|any} value\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.password-input').hasProperty('type', 'password');\r\n *\r\n * @see {@link #doesNotHaveProperty}\r\n */\r\n DOMAssertions.prototype.hasProperty = function (name, value, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n var description = this.targetDescription;\r\n var actualValue = element[name];\r\n if (value instanceof RegExp) {\r\n var result = value.test(String(actualValue));\r\n var expected = \"Element \" + description + \" has property \\\"\" + name + \"\\\" with value matching \" + value;\r\n var actual = \"Element \" + description + \" has property \\\"\" + name + \"\\\" with value \" + JSON.stringify(actualValue);\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n var result = value === actualValue;\r\n var expected = \"Element \" + description + \" has property \\\"\" + name + \"\\\" with value \" + JSON.stringify(value);\r\n var actual = \"Element \" + description + \" has property \\\"\" + name + \"\\\" with value \" + JSON.stringify(actualValue);\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` is disabled.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.foo').isDisabled();\r\n *\r\n * @see {@link #isNotDisabled}\r\n */\r\n DOMAssertions.prototype.isDisabled = function (message) {\r\n isDisabled.call(this, message);\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} or an {@link HTMLElement} matching the\r\n * `selector` is not disabled.\r\n *\r\n * **Aliases:** `isEnabled`\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.foo').isNotDisabled();\r\n *\r\n * @see {@link #isDisabled}\r\n */\r\n DOMAssertions.prototype.isNotDisabled = function (message) {\r\n isDisabled.call(this, message, { inverted: true });\r\n return this;\r\n };\r\n DOMAssertions.prototype.isEnabled = function (message) {\r\n return this.isNotDisabled(message);\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} has the `expected` CSS class using\r\n * [`classList`](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList).\r\n *\r\n * `expected` can also be a regular expression, and the assertion will return\r\n * true if any of the element's CSS classes match.\r\n *\r\n * @param {string|RegExp} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input[type=\"password\"]').hasClass('secret-password-input');\r\n *\r\n * @example\r\n * assert.dom('input[type=\"password\"]').hasClass(/.*password-input/);\r\n *\r\n * @see {@link #doesNotHaveClass}\r\n */\r\n DOMAssertions.prototype.hasClass = function (expected, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n var actual = element.classList.toString();\r\n if (expected instanceof RegExp) {\r\n var classNames = Array.prototype.slice.call(element.classList);\r\n var result = classNames.some(function (className) {\r\n return expected.test(className);\r\n });\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has CSS class matching \" + expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n var result = element.classList.contains(expected);\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has CSS class \\\"\" + expected + \"\\\"\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n return this;\r\n };\r\n /**\r\n * Assert that the {@link HTMLElement} does not have the `expected` CSS class using\r\n * [`classList`](https://developer.mozilla.org/en-US/docs/Web/API/Element/classList).\r\n *\r\n * `expected` can also be a regular expression, and the assertion will return\r\n * true if none of the element's CSS classes match.\r\n *\r\n * **Aliases:** `hasNoClass`, `lacksClass`\r\n *\r\n * @param {string|RegExp} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input[type=\"password\"]').doesNotHaveClass('username-input');\r\n *\r\n * @example\r\n * assert.dom('input[type=\"password\"]').doesNotHaveClass(/username-.*-input/);\r\n *\r\n * @see {@link #hasClass}\r\n */\r\n DOMAssertions.prototype.doesNotHaveClass = function (expected, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n var actual = element.classList.toString();\r\n if (expected instanceof RegExp) {\r\n var classNames = Array.prototype.slice.call(element.classList);\r\n var result = classNames.every(function (className) {\r\n return !expected.test(className);\r\n });\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" does not have CSS class matching \" + expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: \"not: \" + expected, message: message });\r\n }\r\n else {\r\n var result = !element.classList.contains(expected);\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" does not have CSS class \\\"\" + expected + \"\\\"\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: \"not: \" + expected, message: message });\r\n }\r\n return this;\r\n };\r\n DOMAssertions.prototype.hasNoClass = function (expected, message) {\r\n return this.doesNotHaveClass(expected, message);\r\n };\r\n DOMAssertions.prototype.lacksClass = function (expected, message) {\r\n return this.doesNotHaveClass(expected, message);\r\n };\r\n /**\r\n * Assert that the [HTMLElement][] has the `expected` style declarations using\r\n * [`window.getComputedStyle`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle).\r\n *\r\n * @param {object} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.progress-bar').hasStyle({\r\n * opacity: 1,\r\n * display: 'block'\r\n * });\r\n *\r\n * @see {@link #hasClass}\r\n */\r\n DOMAssertions.prototype.hasStyle = function (expected, message) {\r\n return this.hasPseudoElementStyle(null, expected, message);\r\n };\r\n /**\r\n * Assert that the pseudo element for `selector` of the [HTMLElement][] has the `expected` style declarations using\r\n * [`window.getComputedStyle`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle).\r\n *\r\n * @param {string} selector\r\n * @param {object} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.progress-bar').hasPseudoElementStyle(':after', {\r\n * content: '\";\"',\r\n * });\r\n *\r\n * @see {@link #hasClass}\r\n */\r\n DOMAssertions.prototype.hasPseudoElementStyle = function (selector, expected, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n var computedStyle = window.getComputedStyle(element, selector);\r\n var expectedProperties = Object.keys(expected);\r\n if (expectedProperties.length <= 0) {\r\n throw new TypeError(\"Missing style expectations. There must be at least one style property in the passed in expectation object.\");\r\n }\r\n var result = expectedProperties.every(function (property) { return computedStyle[property] === expected[property]; });\r\n var actual = {};\r\n expectedProperties.forEach(function (property) { return (actual[property] = computedStyle[property]); });\r\n if (!message) {\r\n var normalizedSelector = selector ? selector.replace(/^:{0,2}/, '::') : '';\r\n message = \"Element \" + this.targetDescription + normalizedSelector + \" has style \\\"\" + JSON.stringify(expected) + \"\\\"\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n return this;\r\n };\r\n /**\r\n * Assert that the [HTMLElement][] does not have the `expected` style declarations using\r\n * [`window.getComputedStyle`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle).\r\n *\r\n * @param {object} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.progress-bar').doesNotHaveStyle({\r\n * opacity: 1,\r\n * display: 'block'\r\n * });\r\n *\r\n * @see {@link #hasClass}\r\n */\r\n DOMAssertions.prototype.doesNotHaveStyle = function (expected, message) {\r\n return this.doesNotHavePseudoElementStyle(null, expected, message);\r\n };\r\n /**\r\n * Assert that the pseudo element for `selector` of the [HTMLElement][] does not have the `expected` style declarations using\r\n * [`window.getComputedStyle`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getComputedStyle).\r\n *\r\n * @param {string} selector\r\n * @param {object} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('.progress-bar').doesNotHavePseudoElementStyle(':after', {\r\n * content: '\";\"',\r\n * });\r\n *\r\n * @see {@link #hasClass}\r\n */\r\n DOMAssertions.prototype.doesNotHavePseudoElementStyle = function (selector, expected, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n var computedStyle = window.getComputedStyle(element, selector);\r\n var expectedProperties = Object.keys(expected);\r\n if (expectedProperties.length <= 0) {\r\n throw new TypeError(\"Missing style expectations. There must be at least one style property in the passed in expectation object.\");\r\n }\r\n var result = expectedProperties.some(function (property) { return computedStyle[property] !== expected[property]; });\r\n var actual = {};\r\n expectedProperties.forEach(function (property) { return (actual[property] = computedStyle[property]); });\r\n if (!message) {\r\n var normalizedSelector = selector ? selector.replace(/^:{0,2}/, '::') : '';\r\n message = \"Element \" + this.targetDescription + normalizedSelector + \" does not have style \\\"\" + JSON.stringify(expected) + \"\\\"\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n return this;\r\n };\r\n /**\r\n * Assert that the text of the {@link HTMLElement} or an {@link HTMLElement}\r\n * matching the `selector` matches the `expected` text, using the\r\n * [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)\r\n * attribute and stripping/collapsing whitespace.\r\n *\r\n * `expected` can also be a regular expression.\r\n *\r\n * > Note: This assertion will collapse whitespace if the type you pass in is a string.\r\n * > If you are testing specifically for whitespace integrity, pass your expected text\r\n * > in as a RegEx pattern.\r\n *\r\n * **Aliases:** `matchesText`\r\n *\r\n * @param {string|RegExp} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * //

        \r\n * // Welcome to QUnit\r\n * //

        \r\n *\r\n * assert.dom('#title').hasText('Welcome to QUnit');\r\n *\r\n * @example\r\n * assert.dom('.foo').hasText(/[12]\\d{3}/);\r\n *\r\n * @see {@link #includesText}\r\n */\r\n DOMAssertions.prototype.hasText = function (expected, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n if (expected instanceof RegExp) {\r\n var result = expected.test(element.textContent);\r\n var actual = element.textContent;\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has text matching \" + expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else if (expected.any === true) {\r\n var result = Boolean(element.textContent);\r\n var expected_1 = \"Element \" + this.targetDescription + \" has a text\";\r\n var actual = result ? expected_1 : \"Element \" + this.targetDescription + \" has no text\";\r\n if (!message) {\r\n message = expected_1;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected_1, message: message });\r\n }\r\n else if (typeof expected === 'string') {\r\n expected = collapseWhitespace(expected);\r\n var actual = collapseWhitespace(element.textContent);\r\n var result = actual === expected;\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has text \\\"\" + expected + \"\\\"\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n throw new TypeError(\"You must pass a string or Regular Expression to \\\"hasText\\\". You passed \" + expected + \".\");\r\n }\r\n return this;\r\n };\r\n DOMAssertions.prototype.matchesText = function (expected, message) {\r\n return this.hasText(expected, message);\r\n };\r\n /**\r\n * Assert that the `textContent` property of an {@link HTMLElement} is not empty.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('button.share').hasAnyText();\r\n *\r\n * @see {@link #hasText}\r\n */\r\n DOMAssertions.prototype.hasAnyText = function (message) {\r\n return this.hasText({ any: true }, message);\r\n };\r\n /**\r\n * Assert that the `textContent` property of an {@link HTMLElement} is empty.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('div').hasNoText();\r\n *\r\n * @see {@link #hasNoText}\r\n */\r\n DOMAssertions.prototype.hasNoText = function (message) {\r\n return this.hasText('', message);\r\n };\r\n /**\r\n * Assert that the text of the {@link HTMLElement} or an {@link HTMLElement}\r\n * matching the `selector` contains the given `text`, using the\r\n * [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)\r\n * attribute.\r\n *\r\n * > Note: This assertion will collapse whitespace in `textContent` before searching.\r\n * > If you would like to assert on a string that *should* contain line breaks, tabs,\r\n * > more than one space in a row, or starting/ending whitespace, use the {@link #hasText}\r\n * > selector and pass your expected text in as a RegEx pattern.\r\n *\r\n * **Aliases:** `containsText`, `hasTextContaining`\r\n *\r\n * @param {string} text\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('#title').includesText('Welcome');\r\n *\r\n * @see {@link #hasText}\r\n */\r\n DOMAssertions.prototype.includesText = function (text, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n var collapsedText = collapseWhitespace(element.textContent);\r\n var result = collapsedText.indexOf(text) !== -1;\r\n var actual = collapsedText;\r\n var expected = text;\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has text containing \\\"\" + text + \"\\\"\";\r\n }\r\n if (!result && text !== collapseWhitespace(text)) {\r\n console.warn('The `.includesText()`, `.containsText()`, and `.hasTextContaining()` assertions collapse whitespace. The text you are checking for contains whitespace that may have made your test fail incorrectly. Try the `.hasText()` assertion passing in your expected text as a RegExp pattern. Your text:\\n' +\r\n text);\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n return this;\r\n };\r\n DOMAssertions.prototype.containsText = function (expected, message) {\r\n return this.includesText(expected, message);\r\n };\r\n DOMAssertions.prototype.hasTextContaining = function (expected, message) {\r\n return this.includesText(expected, message);\r\n };\r\n /**\r\n * Assert that the text of the {@link HTMLElement} or an {@link HTMLElement}\r\n * matching the `selector` does not include the given `text`, using the\r\n * [`textContent`](https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent)\r\n * attribute.\r\n *\r\n * **Aliases:** `doesNotContainText`, `doesNotHaveTextContaining`\r\n *\r\n * @param {string} text\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('#title').doesNotIncludeText('Welcome');\r\n */\r\n DOMAssertions.prototype.doesNotIncludeText = function (text, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n var collapsedText = collapseWhitespace(element.textContent);\r\n var result = collapsedText.indexOf(text) === -1;\r\n var expected = \"Element \" + this.targetDescription + \" does not include text \\\"\" + text + \"\\\"\";\r\n var actual = expected;\r\n if (!result) {\r\n actual = \"Element \" + this.targetDescription + \" includes text \\\"\" + text + \"\\\"\";\r\n }\r\n if (!message) {\r\n message = expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n return this;\r\n };\r\n DOMAssertions.prototype.doesNotContainText = function (unexpected, message) {\r\n return this.doesNotIncludeText(unexpected, message);\r\n };\r\n DOMAssertions.prototype.doesNotHaveTextContaining = function (unexpected, message) {\r\n return this.doesNotIncludeText(unexpected, message);\r\n };\r\n /**\r\n * Assert that the `value` property of an {@link HTMLInputElement} matches\r\n * the `expected` text or regular expression.\r\n *\r\n * If no `expected` value is provided, the assertion will fail if the\r\n * `value` is an empty string.\r\n *\r\n * @param {string|RegExp|object?} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.username').hasValue('HSimpson');\r\n \n * @see {@link #hasAnyValue}\r\n * @see {@link #hasNoValue}\r\n */\r\n DOMAssertions.prototype.hasValue = function (expected, message) {\r\n var element = this.findTargetElement();\r\n if (!element)\r\n return this;\r\n if (arguments.length === 0) {\r\n expected = { any: true };\r\n }\r\n var value = element.value;\r\n if (expected instanceof RegExp) {\r\n var result = expected.test(value);\r\n var actual = value;\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has value matching \" + expected;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n else if (expected.any === true) {\r\n var result = Boolean(value);\r\n var expected_2 = \"Element \" + this.targetDescription + \" has a value\";\r\n var actual = result ? expected_2 : \"Element \" + this.targetDescription + \" has no value\";\r\n if (!message) {\r\n message = expected_2;\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected_2, message: message });\r\n }\r\n else {\r\n var actual = value;\r\n var result = actual === expected;\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has value \\\"\" + expected + \"\\\"\";\r\n }\r\n this.pushResult({ result: result, actual: actual, expected: expected, message: message });\r\n }\r\n return this;\r\n };\r\n /**\r\n * Assert that the `value` property of an {@link HTMLInputElement} is not empty.\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.username').hasAnyValue();\r\n *\r\n * @see {@link #hasValue}\r\n * @see {@link #hasNoValue}\r\n */\r\n DOMAssertions.prototype.hasAnyValue = function (message) {\r\n return this.hasValue({ any: true }, message);\r\n };\r\n /**\r\n * Assert that the `value` property of an {@link HTMLInputElement} is empty.\r\n *\r\n * **Aliases:** `lacksValue`\r\n *\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input.username').hasNoValue();\r\n *\r\n * @see {@link #hasValue}\r\n * @see {@link #hasAnyValue}\r\n */\r\n DOMAssertions.prototype.hasNoValue = function (message) {\r\n return this.hasValue('', message);\r\n };\r\n DOMAssertions.prototype.lacksValue = function (message) {\r\n return this.hasNoValue(message);\r\n };\r\n /**\r\n * Assert that the target selector selects only Elements that are also selected by\r\n * compareSelector.\r\n *\r\n * @param {string} compareSelector\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('p.red').matchesSelector('div.wrapper p:last-child')\r\n */\r\n DOMAssertions.prototype.matchesSelector = function (compareSelector, message) {\r\n var targetElements = this.target instanceof Element ? [this.target] : this.findElements();\r\n var targets = targetElements.length;\r\n var matchFailures = matchesSelector(targetElements, compareSelector);\r\n var singleElement = targets === 1;\r\n var selectedByPart = this.target instanceof Element ? 'passed' : \"selected by \" + this.target;\r\n var actual;\r\n var expected;\r\n if (matchFailures === 0) {\r\n // no failures matching.\r\n if (!message) {\r\n message = singleElement\r\n ? \"The element \" + selectedByPart + \" also matches the selector \" + compareSelector + \".\"\r\n : targets + \" elements, selected by \" + this.target + \", also match the selector \" + compareSelector + \".\";\r\n }\r\n actual = expected = message;\r\n this.pushResult({ result: true, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n var difference = targets - matchFailures;\r\n // there were failures when matching.\r\n if (!message) {\r\n message = singleElement\r\n ? \"The element \" + selectedByPart + \" did not also match the selector \" + compareSelector + \".\"\r\n : matchFailures + \" out of \" + targets + \" elements selected by \" + this.target + \" did not also match the selector \" + compareSelector + \".\";\r\n }\r\n actual = singleElement ? message : difference + \" elements matched \" + compareSelector + \".\";\r\n expected = singleElement\r\n ? \"The element should have matched \" + compareSelector + \".\"\r\n : targets + \" elements should have matched \" + compareSelector + \".\";\r\n this.pushResult({ result: false, actual: actual, expected: expected, message: message });\r\n }\r\n return this;\r\n };\r\n /**\r\n * Assert that the target selector selects only Elements that are not also selected by\r\n * compareSelector.\r\n *\r\n * @param {string} compareSelector\r\n * @param {string?} message\r\n *\r\n * @example\r\n * assert.dom('input').doesNotMatchSelector('input[disabled]')\r\n */\r\n DOMAssertions.prototype.doesNotMatchSelector = function (compareSelector, message) {\r\n var targetElements = this.target instanceof Element ? [this.target] : this.findElements();\r\n var targets = targetElements.length;\r\n var matchFailures = matchesSelector(targetElements, compareSelector);\r\n var singleElement = targets === 1;\r\n var selectedByPart = this.target instanceof Element ? 'passed' : \"selected by \" + this.target;\r\n var actual;\r\n var expected;\r\n if (matchFailures === targets) {\r\n // the assertion is successful because no element matched the other selector.\r\n if (!message) {\r\n message = singleElement\r\n ? \"The element \" + selectedByPart + \" did not also match the selector \" + compareSelector + \".\"\r\n : targets + \" elements, selected by \" + this.target + \", did not also match the selector \" + compareSelector + \".\";\r\n }\r\n actual = expected = message;\r\n this.pushResult({ result: true, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n var difference = targets - matchFailures;\r\n // the assertion fails because at least one element matched the other selector.\r\n if (!message) {\r\n message = singleElement\r\n ? \"The element \" + selectedByPart + \" must not also match the selector \" + compareSelector + \".\"\r\n : difference + \" elements out of \" + targets + \", selected by \" + this.target + \", must not also match the selector \" + compareSelector + \".\";\r\n }\r\n actual = singleElement\r\n ? \"The element \" + selectedByPart + \" matched \" + compareSelector + \".\"\r\n : matchFailures + \" elements did not match \" + compareSelector + \".\";\r\n expected = singleElement\r\n ? message\r\n : targets + \" elements should not have matched \" + compareSelector + \".\";\r\n this.pushResult({ result: false, actual: actual, expected: expected, message: message });\r\n }\r\n return this;\r\n };\r\n /**\r\n * Assert that the tagName of the {@link HTMLElement} or an {@link HTMLElement}\r\n * matching the `selector` matches the `expected` tagName, using the\r\n * [`tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName)\r\n * property of the {@link HTMLElement}.\r\n *\r\n * @param {string} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * //

        \r\n * // Title\r\n * //

        \r\n *\r\n * assert.dom('#title').hasTagName('h1');\r\n */\r\n DOMAssertions.prototype.hasTagName = function (tagName, message) {\r\n var element = this.findTargetElement();\r\n var actual;\r\n var expected;\r\n if (!element)\r\n return this;\r\n if (typeof tagName !== 'string') {\r\n throw new TypeError(\"You must pass a string to \\\"hasTagName\\\". You passed \" + tagName + \".\");\r\n }\r\n actual = element.tagName.toLowerCase();\r\n expected = tagName.toLowerCase();\r\n if (actual === expected) {\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has tagName \" + expected;\r\n }\r\n this.pushResult({ result: true, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" does not have tagName \" + expected;\r\n }\r\n this.pushResult({ result: false, actual: actual, expected: expected, message: message });\r\n }\r\n return this;\r\n };\r\n /**\r\n * Assert that the tagName of the {@link HTMLElement} or an {@link HTMLElement}\r\n * matching the `selector` does not match the `expected` tagName, using the\r\n * [`tagName`](https://developer.mozilla.org/en-US/docs/Web/API/Element/tagName)\r\n * property of the {@link HTMLElement}.\r\n *\r\n * @param {string} expected\r\n * @param {string?} message\r\n *\r\n * @example\r\n * //
        \r\n * // Title\r\n * //
        \r\n *\r\n * assert.dom('section#block').doesNotHaveTagName('div');\r\n */\r\n DOMAssertions.prototype.doesNotHaveTagName = function (tagName, message) {\r\n var element = this.findTargetElement();\r\n var actual;\r\n var expected;\r\n if (!element)\r\n return this;\r\n if (typeof tagName !== 'string') {\r\n throw new TypeError(\"You must pass a string to \\\"doesNotHaveTagName\\\". You passed \" + tagName + \".\");\r\n }\r\n actual = element.tagName.toLowerCase();\r\n expected = tagName.toLowerCase();\r\n if (actual !== expected) {\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" does not have tagName \" + expected;\r\n }\r\n this.pushResult({ result: true, actual: actual, expected: expected, message: message });\r\n }\r\n else {\r\n if (!message) {\r\n message = \"Element \" + this.targetDescription + \" has tagName \" + expected;\r\n }\r\n this.pushResult({ result: false, actual: actual, expected: expected, message: message });\r\n }\r\n return this;\r\n };\r\n /**\r\n * @private\r\n */\r\n DOMAssertions.prototype.pushResult = function (result) {\r\n this.testContext.pushResult(result);\r\n };\r\n /**\r\n * Finds a valid HTMLElement from target, or pushes a failing assertion if a valid\r\n * element is not found.\r\n * @private\r\n * @returns (HTMLElement|null) a valid HTMLElement, or null\r\n */\r\n DOMAssertions.prototype.findTargetElement = function () {\r\n var el = this.findElement();\r\n if (el === null) {\r\n var message = \"Element \" + (this.target || '') + \" should exist\";\r\n this.pushResult({ message: message, result: false, actual: undefined, expected: undefined });\r\n return null;\r\n }\r\n return el;\r\n };\r\n /**\r\n * Finds a valid HTMLElement from target\r\n * @private\r\n * @returns (HTMLElement|null) a valid HTMLElement, or null\r\n * @throws TypeError will be thrown if target is an unrecognized type\r\n */\r\n DOMAssertions.prototype.findElement = function () {\r\n if (this.target === null) {\r\n return null;\r\n }\r\n else if (typeof this.target === 'string') {\r\n return this.rootElement.querySelector(this.target);\r\n }\r\n else if (this.target instanceof Element) {\r\n return this.target;\r\n }\r\n else {\r\n throw new TypeError(\"Unexpected Parameter: \" + this.target);\r\n }\r\n };\r\n /**\r\n * Finds a collection of Element instances from target using querySelectorAll\r\n * @private\r\n * @returns (Element[]) an array of Element instances\r\n * @throws TypeError will be thrown if target is an unrecognized type\r\n */\r\n DOMAssertions.prototype.findElements = function () {\r\n if (this.target === null) {\r\n return [];\r\n }\r\n else if (typeof this.target === 'string') {\r\n return toArray(this.rootElement.querySelectorAll(this.target));\r\n }\r\n else if (this.target instanceof Element) {\r\n return [this.target];\r\n }\r\n else {\r\n throw new TypeError(\"Unexpected Parameter: \" + this.target);\r\n }\r\n };\r\n Object.defineProperty(DOMAssertions.prototype, \"targetDescription\", {\r\n /**\r\n * @private\r\n */\r\n get: function () {\r\n return elementToString(this.target);\r\n },\r\n enumerable: false,\r\n configurable: true\r\n });\r\n return DOMAssertions;\r\n }());\n\n var _getRootElement = function () { return null; };\r\n function overrideRootElement(fn) {\r\n _getRootElement = fn;\r\n }\r\n function getRootElement() {\r\n return _getRootElement();\r\n }\n\n function install (assert) {\r\n assert.dom = function (target, rootElement) {\r\n if (!isValidRootElement(rootElement)) {\r\n throw new Error(rootElement + \" is not a valid root element\");\r\n }\r\n rootElement = rootElement || this.dom.rootElement || getRootElement();\r\n if (arguments.length === 0) {\r\n target = rootElement instanceof Element ? rootElement : null;\r\n }\r\n return new DOMAssertions(target, rootElement, this);\r\n };\r\n function isValidRootElement(element) {\r\n return (!element ||\r\n (typeof element === 'object' &&\r\n typeof element.querySelector === 'function' &&\r\n typeof element.querySelectorAll === 'function'));\r\n }\r\n }\n\n function setup(assert, options) {\r\n if (options === void 0) { options = {}; }\r\n install(assert);\r\n var getRootElement = typeof options.getRootElement === 'function'\r\n ? options.getRootElement\r\n : function () { return document.querySelector('#ember-testing'); };\r\n overrideRootElement(getRootElement);\r\n }\n\n /* global QUnit */\r\n install(QUnit.assert);\n\n exports.setup = setup;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n\n}({}));\n","Object.defineProperty(QUnit.assert.dom, 'rootElement', {\n get: function() {\n return document.querySelector('#ember-testing');\n },\n enumerable: true,\n configurable: true,\n});\n","define(\"@ember/test-helpers/-internal/debug-info-helpers\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = registerDebugInfoHelper;\n _exports.debugInfoHelpers = void 0;\n const debugInfoHelpers = new Set();\n /**\n * Registers a custom debug info helper to augment the output for test isolation validation.\n *\n * @public\n * @param {DebugInfoHelper} debugHelper a custom debug info helper\n * @example\n *\n * import { registerDebugInfoHelper } from '@ember/test-helpers';\n *\n * registerDebugInfoHelper({\n * name: 'Date override detection',\n * log() {\n * if (dateIsOverridden()) {\n * console.log(this.name);\n * console.log('The date object has been overridden');\n * }\n * }\n * })\n */\n\n _exports.debugInfoHelpers = debugInfoHelpers;\n\n function registerDebugInfoHelper(debugHelper) {\n debugInfoHelpers.add(debugHelper);\n }\n});","define(\"@ember/test-helpers/-internal/debug-info\", [\"exports\", \"@ember/test-helpers/-internal/debug-info-helpers\", \"ember-test-waiters\"], function (_exports, _debugInfoHelpers, _emberTestWaiters) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.backburnerDebugInfoAvailable = backburnerDebugInfoAvailable;\n _exports.getDebugInfo = getDebugInfo;\n _exports.TestDebugInfo = void 0;\n const PENDING_AJAX_REQUESTS = 'Pending AJAX requests';\n const PENDING_TEST_WAITERS = 'Pending test waiters';\n const SCHEDULED_ASYNC = 'Scheduled async';\n const SCHEDULED_AUTORUN = 'Scheduled autorun';\n /**\n * Determins if the `getDebugInfo` method is available in the\n * running verison of backburner.\n *\n * @returns {boolean} True if `getDebugInfo` is present in backburner, otherwise false.\n */\n\n function backburnerDebugInfoAvailable() {\n return typeof Ember.run.backburner.getDebugInfo === 'function';\n }\n /**\n * Retrieves debug information from backburner's current deferred actions queue (runloop instance).\n * If the `getDebugInfo` method isn't available, it returns `null`.\n *\n * @public\n * @returns {MaybeDebugInfo | null} Backburner debugInfo or, if the getDebugInfo method is not present, null\n */\n\n\n function getDebugInfo() {\n return Ember.run.backburner.DEBUG === true && backburnerDebugInfoAvailable() ? Ember.run.backburner.getDebugInfo() : null;\n }\n /**\n * Encapsulates debug information for an individual test. Aggregates information\n * from:\n * - info provided by getSettledState\n * - hasPendingTimers\n * - hasRunLoop\n * - hasPendingWaiters\n * - hasPendingRequests\n * - info provided by backburner's getDebugInfo method (timers, schedules, and stack trace info)\n *\n */\n\n\n class TestDebugInfo {\n constructor(settledState, debugInfo = getDebugInfo()) {\n this._summaryInfo = undefined;\n this._settledState = settledState;\n this._debugInfo = debugInfo;\n }\n\n get summary() {\n if (!this._summaryInfo) {\n this._summaryInfo = Ember.assign({}, this._settledState);\n\n if (this._debugInfo) {\n this._summaryInfo.autorunStackTrace = this._debugInfo.autorun && this._debugInfo.autorun.stack;\n this._summaryInfo.pendingTimersCount = this._debugInfo.timers.length;\n this._summaryInfo.hasPendingTimers = this._settledState.hasPendingTimers && this._summaryInfo.pendingTimersCount > 0;\n this._summaryInfo.pendingTimersStackTraces = this._debugInfo.timers.map(timer => timer.stack);\n this._summaryInfo.pendingScheduledQueueItemCount = this._debugInfo.instanceStack.filter(q => q).reduce((total, item) => {\n Object.keys(item).forEach(queueName => {\n total += item[queueName].length;\n });\n return total;\n }, 0);\n this._summaryInfo.pendingScheduledQueueItemStackTraces = this._debugInfo.instanceStack.filter(q => q).reduce((stacks, deferredActionQueues) => {\n Object.keys(deferredActionQueues).forEach(queue => {\n deferredActionQueues[queue].forEach(queueItem => queueItem.stack && stacks.push(queueItem.stack));\n });\n return stacks;\n }, []);\n }\n\n if (this._summaryInfo.hasPendingTestWaiters) {\n this._summaryInfo.pendingTestWaiterInfo = (0, _emberTestWaiters.getPendingWaiterState)();\n }\n }\n\n return this._summaryInfo;\n }\n\n toConsole(_console = console) {\n let summary = this.summary;\n\n if (summary.hasPendingRequests) {\n _console.log(PENDING_AJAX_REQUESTS);\n }\n\n if (summary.hasPendingLegacyWaiters) {\n _console.log(PENDING_TEST_WAITERS);\n }\n\n if (summary.hasPendingTestWaiters) {\n if (!summary.hasPendingLegacyWaiters) {\n _console.log(PENDING_TEST_WAITERS);\n }\n\n Object.keys(summary.pendingTestWaiterInfo.waiters).forEach(waiterName => {\n let waiterDebugInfo = summary.pendingTestWaiterInfo.waiters[waiterName];\n\n if (Array.isArray(waiterDebugInfo)) {\n _console.group(waiterName);\n\n waiterDebugInfo.forEach(debugInfo => {\n _console.log(`${debugInfo.label ? debugInfo.label : 'stack'}: ${debugInfo.stack}`);\n });\n\n _console.groupEnd();\n } else {\n _console.log(waiterName);\n }\n });\n }\n\n if (summary.hasPendingTimers || summary.pendingScheduledQueueItemCount > 0) {\n _console.group(SCHEDULED_ASYNC);\n\n summary.pendingTimersStackTraces.forEach(timerStack => {\n _console.log(timerStack);\n });\n summary.pendingScheduledQueueItemStackTraces.forEach(scheduleQueueItemStack => {\n _console.log(scheduleQueueItemStack);\n });\n\n _console.groupEnd();\n }\n\n if (summary.hasRunLoop && summary.pendingTimersCount === 0 && summary.pendingScheduledQueueItemCount === 0) {\n _console.log(SCHEDULED_AUTORUN);\n\n if (summary.autorunStackTrace) {\n _console.log(summary.autorunStackTrace);\n }\n }\n\n _debugInfoHelpers.debugInfoHelpers.forEach(helper => {\n helper.log();\n });\n }\n\n _formatCount(title, count) {\n return `${title}: ${count}`;\n }\n\n }\n\n _exports.TestDebugInfo = TestDebugInfo;\n});","define(\"@ember/test-helpers/-tuple\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = tuple;\n\n // eslint-disable-next-line require-jsdoc\n function tuple(...args) {\n return args;\n }\n});","define(\"@ember/test-helpers/-utils\", [\"exports\", \"@ember/test-helpers/has-ember-version\"], function (_exports, _hasEmberVersion) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.nextTickPromise = nextTickPromise;\n _exports.runDestroyablesFor = runDestroyablesFor;\n _exports.isNumeric = isNumeric;\n _exports.futureTick = _exports.nextTick = _exports._Promise = void 0;\n\n class _Promise extends Ember.RSVP.Promise {}\n\n _exports._Promise = _Promise;\n const ORIGINAL_RSVP_ASYNC = Ember.RSVP.configure('async');\n /*\n Long ago in a galaxy far far away, Ember forced RSVP.Promise to \"resolve\" on the Ember.run loop.\n At the time, this was meant to help ease pain with folks receiving the dreaded \"auto-run\" assertion\n during their tests, and to help ensure that promise resolution was coelesced to avoid \"thrashing\"\n of the DOM. Unfortunately, the result of this configuration is that code like the following behaves\n differently if using native `Promise` vs `RSVP.Promise`:\n \n ```js\n console.log('first');\n Ember.run(() => Promise.resolve().then(() => console.log('second')));\n console.log('third');\n ```\n \n When `Promise` is the native promise that will log `'first', 'third', 'second'`, but when `Promise`\n is an `RSVP.Promise` that will log `'first', 'second', 'third'`. The fact that `RSVP.Promise`s can\n be **forced** to flush synchronously is very scary!\n \n Now, lets talk about why we are configuring `RSVP`'s `async` below...\n \n ---\n \n The following _should_ always be guaranteed:\n \n ```js\n await settled();\n \n isSettled() === true\n ```\n \n Unfortunately, without the custom `RSVP` `async` configuration we cannot ensure that `isSettled()` will\n be truthy. This is due to the fact that Ember has configured `RSVP` to resolve all promises in the run\n loop. What that means practically is this:\n \n 1. all checks within `waitUntil` (used by `settled()` internally) are completed and we are \"settled\"\n 2. `waitUntil` resolves the promise that it returned (to signify that the world is \"settled\")\n 3. resolving the promise (since it is an `RSVP.Promise` and Ember has configured RSVP.Promise) creates\n a new Ember.run loop in order to resolve\n 4. the presence of that new run loop means that we are no longer \"settled\"\n 5. `isSettled()` returns false 😭😭😭😭😭😭😭😭😭\n \n This custom `RSVP.configure('async`, ...)` below provides a way to prevent the promises that are returned\n from `settled` from causing this \"loop\" and instead \"just use normal Promise semantics\".\n \n 😩😫🙀\n */\n\n Ember.RSVP.configure('async', (callback, promise) => {\n if (promise instanceof _Promise) {\n // @ts-ignore - avoid erroring about useless `Promise !== RSVP.Promise` comparison\n // (this handles when folks have polyfilled via Promise = Ember.RSVP.Promise)\n if (typeof Promise !== 'undefined' && Promise !== Ember.RSVP.Promise) {\n // use real native promise semantics whenever possible\n Promise.resolve().then(() => callback(promise));\n } else {\n // fallback to using RSVP's natural `asap` (**not** the fake\n // one configured by Ember...)\n Ember.RSVP.asap(callback, promise);\n }\n } else {\n // fall back to the normal Ember behavior\n ORIGINAL_RSVP_ASYNC(callback, promise);\n }\n });\n const nextTick = typeof Promise === 'undefined' ? setTimeout : cb => Promise.resolve().then(cb);\n _exports.nextTick = nextTick;\n const futureTick = setTimeout;\n /**\n @private\n @returns {Promise} Promise which can not be forced to be ran synchronously\n */\n\n _exports.futureTick = futureTick;\n\n function nextTickPromise() {\n // Ember 3.4 removed the auto-run assertion, in 3.4+ we can (and should) avoid the \"psuedo promisey\" run loop configuration\n // for our `nextTickPromise` implementation. This allows us to have real microtask based next tick timing...\n if ((0, _hasEmberVersion.default)(3, 4)) {\n return _Promise.resolve();\n } else {\n // on older Ember's fallback to RSVP.Promise + a setTimeout\n return new Ember.RSVP.Promise(resolve => {\n nextTick(resolve);\n });\n }\n }\n /**\n Retrieves an array of destroyables from the specified property on the object\n provided, iterates that array invoking each function, then deleting the\n property (clearing the array).\n \n @private\n @param {Object} object an object to search for the destroyable array within\n @param {string} property the property on the object that contains the destroyable array\n */\n\n\n function runDestroyablesFor(object, property) {\n let destroyables = object[property];\n\n if (!destroyables) {\n return;\n }\n\n for (let i = 0; i < destroyables.length; i++) {\n destroyables[i]();\n }\n\n delete object[property];\n }\n /**\n Returns whether the passed in string consists only of numeric characters.\n \n @private\n @param {string} n input string\n @returns {boolean} whether the input string consists only of numeric characters\n */\n\n\n function isNumeric(n) {\n return !isNaN(parseFloat(n)) && isFinite(Number(n));\n }\n});","define(\"@ember/test-helpers/application\", [\"exports\", \"@ember/test-helpers/resolver\"], function (_exports, _resolver) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.setApplication = setApplication;\n _exports.getApplication = getApplication;\n\n var __application__;\n /**\n Stores the provided application instance so that tests being ran will be aware of the application under test.\n \n - Required by `setupApplicationContext` method.\n - Used by `setupContext` and `setupRenderingContext` when present.\n \n @public\n @param {Ember.Application} application the application that will be tested\n */\n\n\n function setApplication(application) {\n __application__ = application;\n\n if (!(0, _resolver.getResolver)()) {\n let Resolver = application.Resolver;\n let resolver = Resolver.create({\n namespace: application\n });\n (0, _resolver.setResolver)(resolver);\n }\n }\n /**\n Retrieve the application instance stored by `setApplication`.\n \n @public\n @returns {Ember.Application} the previously stored application instance under test\n */\n\n\n function getApplication() {\n return __application__;\n }\n});","define(\"@ember/test-helpers/build-owner\", [\"exports\", \"ember-test-helpers/legacy-0-6-x/build-registry\"], function (_exports, _buildRegistry) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = buildOwner;\n\n /**\n Creates an \"owner\" (an object that either _is_ or duck-types like an\n `Ember.ApplicationInstance`) from the provided options.\n \n If `options.application` is present (e.g. setup by an earlier call to\n `setApplication`) an `Ember.ApplicationInstance` is built via\n `application.buildInstance()`.\n \n If `options.application` is not present, we fall back to using\n `options.resolver` instead (setup via `setResolver`). This creates a mock\n \"owner\" by using a custom created combination of `Ember.Registry`,\n `Ember.Container`, `Ember._ContainerProxyMixin`, and\n `Ember._RegistryProxyMixin`.\n \n @private\n @param {Ember.Application} [application] the Ember.Application to build an instance from\n @param {Ember.Resolver} [resolver] the resolver to use to back a \"mock owner\"\n @returns {Promise} a promise resolving to the generated \"owner\"\n */\n function buildOwner(application, resolver) {\n if (application) {\n return application.boot().then(app => app.buildInstance().boot());\n }\n\n if (!resolver) {\n throw new Error('You must set up the ember-test-helpers environment with either `setResolver` or `setApplication` before running any tests.');\n }\n\n let {\n owner\n } = (0, _buildRegistry.default)(resolver);\n return Ember.RSVP.Promise.resolve(owner);\n }\n});","define(\"@ember/test-helpers/dom/-get-element\", [\"exports\", \"@ember/test-helpers/dom/get-root-element\", \"@ember/test-helpers/dom/-target\"], function (_exports, _getRootElement, _target) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n /**\n Used internally by the DOM interaction helpers to find one element.\n \n @private\n @param {string|Element} target the element or selector to retrieve\n @returns {Element} the target or selector\n */\n function getElement(target) {\n if (typeof target === 'string') {\n let rootElement = (0, _getRootElement.default)();\n return rootElement.querySelector(target);\n } else if ((0, _target.isElement)(target) || (0, _target.isDocument)(target)) {\n return target;\n } else if (target instanceof Window) {\n return target.document;\n } else {\n throw new Error('Must use an element or a selector string');\n }\n }\n\n var _default = getElement;\n _exports.default = _default;\n});","define(\"@ember/test-helpers/dom/-get-elements\", [\"exports\", \"@ember/test-helpers/dom/get-root-element\"], function (_exports, _getRootElement) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = getElements;\n\n /**\n Used internally by the DOM interaction helpers to find multiple elements.\n \n @private\n @param {string} target the selector to retrieve\n @returns {NodeList} the matched elements\n */\n function getElements(target) {\n if (typeof target === 'string') {\n let rootElement = (0, _getRootElement.default)();\n return rootElement.querySelectorAll(target);\n } else {\n throw new Error('Must use a selector string');\n }\n }\n});","define(\"@ember/test-helpers/dom/-is-focusable\", [\"exports\", \"@ember/test-helpers/dom/-is-form-control\", \"@ember/test-helpers/dom/-target\"], function (_exports, _isFormControl, _target) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = isFocusable;\n const FOCUSABLE_TAGS = ['A']; // eslint-disable-next-line require-jsdoc\n\n function isFocusableElement(element) {\n return FOCUSABLE_TAGS.indexOf(element.tagName) > -1;\n }\n /**\n @private\n @param {Element} element the element to check\n @returns {boolean} `true` when the element is focusable, `false` otherwise\n */\n\n\n function isFocusable(element) {\n if ((0, _target.isDocument)(element)) {\n return false;\n }\n\n if ((0, _isFormControl.default)(element) || element.isContentEditable || isFocusableElement(element)) {\n return true;\n }\n\n return element.hasAttribute('tabindex');\n }\n});","define(\"@ember/test-helpers/dom/-is-form-control\", [\"exports\", \"@ember/test-helpers/dom/-target\"], function (_exports, _target) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = isFormControl;\n const FORM_CONTROL_TAGS = ['INPUT', 'BUTTON', 'SELECT', 'TEXTAREA'];\n /**\n @private\n @param {Element} element the element to check\n @returns {boolean} `true` when the element is a form control, `false` otherwise\n */\n\n function isFormControl(element) {\n return !(0, _target.isDocument)(element) && FORM_CONTROL_TAGS.indexOf(element.tagName) > -1 && element.type !== 'hidden';\n }\n});","define(\"@ember/test-helpers/dom/-target\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.isElement = isElement;\n _exports.isDocument = isDocument;\n\n // eslint-disable-next-line require-jsdoc\n function isElement(target) {\n return target.nodeType === Node.ELEMENT_NODE;\n } // eslint-disable-next-line require-jsdoc\n\n\n function isDocument(target) {\n return target.nodeType === Node.DOCUMENT_NODE;\n }\n});","define(\"@ember/test-helpers/dom/-to-array\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = toArray;\n\n /**\n @private\n @param {NodeList} nodelist the nodelist to convert to an array\n @returns {Array} an array\n */\n function toArray(nodelist) {\n let array = new Array(nodelist.length);\n\n for (let i = 0; i < nodelist.length; i++) {\n array[i] = nodelist[i];\n }\n\n return array;\n }\n});","define(\"@ember/test-helpers/dom/blur\", [\"exports\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/dom/-is-focusable\", \"@ember/test-helpers/-utils\"], function (_exports, _getElement, _fireEvent, _settled, _isFocusable, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.__blur__ = __blur__;\n _exports.default = blur;\n\n /**\n @private\n @param {Element} element the element to trigger events on\n */\n function __blur__(element) {\n let browserIsNotFocused = document.hasFocus && !document.hasFocus(); // makes `document.activeElement` be `body`.\n // If the browser is focused, it also fires a blur event\n\n element.blur(); // Chrome/Firefox does not trigger the `blur` event if the window\n // does not have focus. If the document does not have focus then\n // fire `blur` event via native event.\n\n if (browserIsNotFocused) {\n (0, _fireEvent.default)(element, 'blur', {\n bubbles: false\n });\n (0, _fireEvent.default)(element, 'focusout');\n }\n }\n /**\n Unfocus the specified target.\n \n Sends a number of events intending to simulate a \"real\" user unfocusing an\n element.\n \n The following events are triggered (in order):\n \n - `blur`\n - `focusout`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle unfocusing a given element.\n \n @public\n @param {string|Element} [target=document.activeElement] the element or selector to unfocus\n @return {Promise} resolves when settled\n \n @example\n \n Emulating blurring an input using `blur`\n \n \n blur('input');\n */\n\n\n function blur(target = document.activeElement) {\n return (0, _utils.nextTickPromise)().then(() => {\n let element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`blur('${target}')\\`.`);\n }\n\n if (!(0, _isFocusable.default)(element)) {\n throw new Error(`${target} is not focusable`);\n }\n\n __blur__(element);\n\n return (0, _settled.default)();\n });\n }\n});","define(\"@ember/test-helpers/dom/click\", [\"exports\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/dom/focus\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/dom/-is-focusable\", \"@ember/test-helpers/-utils\", \"@ember/test-helpers/dom/-is-form-control\"], function (_exports, _getElement, _fireEvent, _focus, _settled, _isFocusable, _utils, _isFormControl) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.__click__ = __click__;\n _exports.default = click;\n\n /**\n @private\n @param {Element} element the element to click on\n @param {Object} options the options to be merged into the mouse events\n */\n function __click__(element, options) {\n (0, _fireEvent.default)(element, 'mousedown', options);\n\n if ((0, _isFocusable.default)(element)) {\n (0, _focus.__focus__)(element);\n }\n\n (0, _fireEvent.default)(element, 'mouseup', options);\n (0, _fireEvent.default)(element, 'click', options);\n }\n /**\n Clicks on the specified target.\n \n Sends a number of events intending to simulate a \"real\" user clicking on an\n element.\n \n For non-focusable elements the following events are triggered (in order):\n \n - `mousedown`\n - `mouseup`\n - `click`\n \n For focusable (e.g. form control) elements the following events are triggered\n (in order):\n \n - `mousedown`\n - `focus`\n - `focusin`\n - `mouseup`\n - `click`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle clicking a given element.\n \n Use the `options` hash to change the parameters of the [MouseEvents](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent).\n You can use this to specifiy modifier keys as well.\n \n @public\n @param {string|Element} target the element or selector to click on\n @param {Object} options the options to be merged into the mouse events\n @return {Promise} resolves when settled\n \n @example\n \n Emulating clicking a button using `click`\n \n click('button');\n \n @example\n \n Emulating clicking a button and pressing the `shift` key simultaneously using `click` with `options`.\n \n \n click('button', { shiftKey: true });\n */\n\n\n function click(target, options = {}) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `click`.');\n }\n\n let element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`click('${target}')\\`.`);\n }\n\n let isDisabledFormControl = (0, _isFormControl.default)(element) && element.disabled;\n\n if (!isDisabledFormControl) {\n __click__(element, options);\n }\n\n return (0, _settled.default)();\n });\n }\n});","define(\"@ember/test-helpers/dom/double-click\", [\"exports\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/dom/focus\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/dom/-is-focusable\", \"@ember/test-helpers/-utils\"], function (_exports, _getElement, _fireEvent, _focus, _settled, _isFocusable, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.__doubleClick__ = __doubleClick__;\n _exports.default = doubleClick;\n\n /**\n @private\n @param {Element} element the element to double-click on\n @param {Object} options the options to be merged into the mouse events\n */\n function __doubleClick__(element, options) {\n (0, _fireEvent.default)(element, 'mousedown', options);\n\n if ((0, _isFocusable.default)(element)) {\n (0, _focus.__focus__)(element);\n }\n\n (0, _fireEvent.default)(element, 'mouseup', options);\n (0, _fireEvent.default)(element, 'click', options);\n (0, _fireEvent.default)(element, 'mousedown', options);\n (0, _fireEvent.default)(element, 'mouseup', options);\n (0, _fireEvent.default)(element, 'click', options);\n (0, _fireEvent.default)(element, 'dblclick', options);\n }\n /**\n Double-clicks on the specified target.\n \n Sends a number of events intending to simulate a \"real\" user clicking on an\n element.\n \n For non-focusable elements the following events are triggered (in order):\n \n - `mousedown`\n - `mouseup`\n - `click`\n - `mousedown`\n - `mouseup`\n - `click`\n - `dblclick`\n \n For focusable (e.g. form control) elements the following events are triggered\n (in order):\n \n - `mousedown`\n - `focus`\n - `focusin`\n - `mouseup`\n - `click`\n - `mousedown`\n - `mouseup`\n - `click`\n - `dblclick`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle clicking a given element.\n \n Use the `options` hash to change the parameters of the [MouseEvents](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/MouseEvent).\n \n @public\n @param {string|Element} target the element or selector to double-click on\n @param {Object} options the options to be merged into the mouse events\n @return {Promise} resolves when settled\n \n @example\n \n Emulating double clicking a button using `doubleClick`\n \n \n doubleClick('button');\n \n @example\n \n Emulating double clicking a button and pressing the `shift` key simultaneously using `click` with `options`.\n \n \n doubleClick('button', { shiftKey: true });\n */\n\n\n function doubleClick(target, options = {}) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `doubleClick`.');\n }\n\n let element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`doubleClick('${target}')\\`.`);\n }\n\n __doubleClick__(element, options);\n\n return (0, _settled.default)();\n });\n }\n});","define(\"@ember/test-helpers/dom/fill-in\", [\"exports\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/-is-form-control\", \"@ember/test-helpers/dom/focus\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/-utils\"], function (_exports, _getElement, _isFormControl, _focus, _settled, _fireEvent, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = fillIn;\n\n /**\n Fill the provided text into the `value` property (or set `.innerHTML` when\n the target is a content editable element) then trigger `change` and `input`\n events on the specified target.\n \n @public\n @param {string|Element} target the element or selector to enter text into\n @param {string} text the text to fill into the target element\n @return {Promise} resolves when the application is settled\n \n @example\n \n Emulating filling an input with text using `fillIn`\n \n \n fillIn('input', 'hello world');\n */\n function fillIn(target, text) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `fillIn`.');\n }\n\n let element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`fillIn('${target}')\\`.`);\n }\n\n let isControl = (0, _isFormControl.default)(element);\n\n if (!isControl && !element.isContentEditable) {\n throw new Error('`fillIn` is only usable on form controls or contenteditable elements.');\n }\n\n if (typeof text === 'undefined' || text === null) {\n throw new Error('Must provide `text` when calling `fillIn`.');\n }\n\n (0, _focus.__focus__)(element);\n\n if (isControl) {\n element.value = text;\n } else {\n element.innerHTML = text;\n }\n\n (0, _fireEvent.default)(element, 'input');\n (0, _fireEvent.default)(element, 'change');\n return (0, _settled.default)();\n });\n }\n});","define(\"@ember/test-helpers/dom/find-all\", [\"exports\", \"@ember/test-helpers/dom/-get-elements\", \"@ember/test-helpers/dom/-to-array\"], function (_exports, _getElements, _toArray) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = findAll;\n\n /**\n Find all elements matched by the given selector. Similar to calling\n `querySelectorAll()` on the test root element, but returns an array instead\n of a `NodeList`.\n \n @public\n @param {string} selector the selector to search for\n @return {Array} array of matched elements\n */\n function findAll(selector) {\n if (!selector) {\n throw new Error('Must pass a selector to `findAll`.');\n }\n\n if (arguments.length > 1) {\n throw new Error('The `findAll` test helper only takes a single argument.');\n }\n\n return (0, _toArray.default)((0, _getElements.default)(selector));\n }\n});","define(\"@ember/test-helpers/dom/find\", [\"exports\", \"@ember/test-helpers/dom/-get-element\"], function (_exports, _getElement) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = find;\n\n /**\n Find the first element matched by the given selector. Equivalent to calling\n `querySelector()` on the test root element.\n \n @public\n @param {string} selector the selector to search for\n @return {Element} matched element or null\n */\n function find(selector) {\n if (!selector) {\n throw new Error('Must pass a selector to `find`.');\n }\n\n if (arguments.length > 1) {\n throw new Error('The `find` test helper only takes a single argument.');\n }\n\n return (0, _getElement.default)(selector);\n }\n});","define(\"@ember/test-helpers/dom/fire-event\", [\"exports\", \"@ember/test-helpers/dom/-target\", \"@ember/test-helpers/-tuple\"], function (_exports, _target, _tuple) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.isKeyboardEventType = isKeyboardEventType;\n _exports.isMouseEventType = isMouseEventType;\n _exports.isFileSelectionEventType = isFileSelectionEventType;\n _exports.isFileSelectionInput = isFileSelectionInput;\n _exports.default = _exports.KEYBOARD_EVENT_TYPES = void 0;\n\n // eslint-disable-next-line require-jsdoc\n const MOUSE_EVENT_CONSTRUCTOR = (() => {\n try {\n new MouseEvent('test');\n return true;\n } catch (e) {\n return false;\n }\n })();\n\n const DEFAULT_EVENT_OPTIONS = {\n bubbles: true,\n cancelable: true\n };\n const KEYBOARD_EVENT_TYPES = (0, _tuple.default)('keydown', 'keypress', 'keyup'); // eslint-disable-next-line require-jsdoc\n\n _exports.KEYBOARD_EVENT_TYPES = KEYBOARD_EVENT_TYPES;\n\n function isKeyboardEventType(eventType) {\n return KEYBOARD_EVENT_TYPES.indexOf(eventType) > -1;\n }\n\n const MOUSE_EVENT_TYPES = (0, _tuple.default)('click', 'mousedown', 'mouseup', 'dblclick', 'mouseenter', 'mouseleave', 'mousemove', 'mouseout', 'mouseover'); // eslint-disable-next-line require-jsdoc\n\n function isMouseEventType(eventType) {\n return MOUSE_EVENT_TYPES.indexOf(eventType) > -1;\n }\n\n const FILE_SELECTION_EVENT_TYPES = (0, _tuple.default)('change'); // eslint-disable-next-line require-jsdoc\n\n function isFileSelectionEventType(eventType) {\n return FILE_SELECTION_EVENT_TYPES.indexOf(eventType) > -1;\n } // eslint-disable-next-line require-jsdoc\n\n\n function isFileSelectionInput(element) {\n return element.files;\n }\n /**\n Internal helper used to build and dispatch events throughout the other DOM helpers.\n \n @private\n @param {Element} element the element to dispatch the event to\n @param {string} eventType the type of event\n @param {Object} [options] additional properties to be set on the event\n @returns {Event} the event that was dispatched\n */\n\n\n function fireEvent(element, eventType, options = {}) {\n if (!element) {\n throw new Error('Must pass an element to `fireEvent`');\n }\n\n let event;\n\n if (isKeyboardEventType(eventType)) {\n event = buildKeyboardEvent(eventType, options);\n } else if (isMouseEventType(eventType)) {\n let rect;\n\n if (element instanceof Window && element.document.documentElement) {\n rect = element.document.documentElement.getBoundingClientRect();\n } else if ((0, _target.isDocument)(element)) {\n rect = element.documentElement.getBoundingClientRect();\n } else if ((0, _target.isElement)(element)) {\n rect = element.getBoundingClientRect();\n } else {\n return;\n }\n\n let x = rect.left + 1;\n let y = rect.top + 1;\n let simulatedCoordinates = {\n screenX: x + 5,\n screenY: y + 95,\n clientX: x,\n clientY: y\n };\n event = buildMouseEvent(eventType, Ember.assign(simulatedCoordinates, options));\n } else if (isFileSelectionEventType(eventType) && isFileSelectionInput(element)) {\n event = buildFileEvent(eventType, element, options);\n } else {\n event = buildBasicEvent(eventType, options);\n }\n\n element.dispatchEvent(event);\n return event;\n }\n\n var _default = fireEvent; // eslint-disable-next-line require-jsdoc\n\n _exports.default = _default;\n\n function buildBasicEvent(type, options = {}) {\n let event = document.createEvent('Events');\n let bubbles = options.bubbles !== undefined ? options.bubbles : true;\n let cancelable = options.cancelable !== undefined ? options.cancelable : true;\n delete options.bubbles;\n delete options.cancelable; // bubbles and cancelable are readonly, so they can be\n // set when initializing event\n\n event.initEvent(type, bubbles, cancelable);\n Ember.assign(event, options);\n return event;\n } // eslint-disable-next-line require-jsdoc\n\n\n function buildMouseEvent(type, options = {}) {\n let event;\n let eventOpts = Ember.assign({\n view: window\n }, DEFAULT_EVENT_OPTIONS, options);\n\n if (MOUSE_EVENT_CONSTRUCTOR) {\n event = new MouseEvent(type, eventOpts);\n } else {\n try {\n event = document.createEvent('MouseEvents');\n event.initMouseEvent(type, eventOpts.bubbles, eventOpts.cancelable, window, eventOpts.detail, eventOpts.screenX, eventOpts.screenY, eventOpts.clientX, eventOpts.clientY, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.button, eventOpts.relatedTarget);\n } catch (e) {\n event = buildBasicEvent(type, options);\n }\n }\n\n return event;\n } // eslint-disable-next-line require-jsdoc\n\n\n function buildKeyboardEvent(type, options = {}) {\n let eventOpts = Ember.assign({}, DEFAULT_EVENT_OPTIONS, options);\n let event;\n let eventMethodName;\n\n try {\n event = new KeyboardEvent(type, eventOpts); // Property definitions are required for B/C for keyboard event usage\n // If this properties are not defined, when listening for key events\n // keyCode/which will be 0. Also, keyCode and which now are string\n // and if app compare it with === with integer key definitions,\n // there will be a fail.\n //\n // https://w3c.github.io/uievents/#interface-keyboardevent\n // https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent\n\n Object.defineProperty(event, 'keyCode', {\n get() {\n return parseInt(eventOpts.keyCode);\n }\n\n });\n Object.defineProperty(event, 'which', {\n get() {\n return parseInt(eventOpts.which);\n }\n\n });\n return event;\n } catch (e) {// left intentionally blank\n }\n\n try {\n event = document.createEvent('KeyboardEvents');\n eventMethodName = 'initKeyboardEvent';\n } catch (e) {// left intentionally blank\n }\n\n if (!event) {\n try {\n event = document.createEvent('KeyEvents');\n eventMethodName = 'initKeyEvent';\n } catch (e) {// left intentionally blank\n }\n }\n\n if (event && eventMethodName) {\n event[eventMethodName](type, eventOpts.bubbles, eventOpts.cancelable, window, eventOpts.ctrlKey, eventOpts.altKey, eventOpts.shiftKey, eventOpts.metaKey, eventOpts.keyCode, eventOpts.charCode);\n } else {\n event = buildBasicEvent(type, options);\n }\n\n return event;\n } // eslint-disable-next-line require-jsdoc\n\n\n function buildFileEvent(type, element, options = {}) {\n let event = buildBasicEvent(type);\n let files;\n\n if (Array.isArray(options)) {\n (true && !(false) && Ember.deprecate('Passing the `options` param as an array to `triggerEvent` for file inputs is deprecated. Please pass an object with a key `files` containing the array instead.', false, {\n id: 'ember-test-helpers.trigger-event.options-blob-array',\n until: '2.0.0'\n }));\n files = options;\n } else {\n files = options.files;\n }\n\n if (Array.isArray(files)) {\n Object.defineProperty(files, 'item', {\n value(index) {\n return typeof index === 'number' ? this[index] : null;\n }\n\n });\n Object.defineProperty(element, 'files', {\n value: files,\n configurable: true\n });\n }\n\n Object.defineProperty(event, 'target', {\n value: element\n });\n return event;\n }\n});","define(\"@ember/test-helpers/dom/focus\", [\"exports\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/dom/-is-focusable\", \"@ember/test-helpers/-utils\"], function (_exports, _getElement, _fireEvent, _settled, _isFocusable, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.__focus__ = __focus__;\n _exports.default = focus;\n\n /**\n @private\n @param {Element} element the element to trigger events on\n */\n function __focus__(element) {\n let browserIsNotFocused = document.hasFocus && !document.hasFocus(); // makes `document.activeElement` be `element`. If the browser is focused, it also fires a focus event\n\n element.focus(); // Firefox does not trigger the `focusin` event if the window\n // does not have focus. If the document does not have focus then\n // fire `focusin` event as well.\n\n if (browserIsNotFocused) {\n // if the browser is not focused the previous `el.focus()` didn't fire an event, so we simulate it\n (0, _fireEvent.default)(element, 'focus', {\n bubbles: false\n });\n (0, _fireEvent.default)(element, 'focusin');\n }\n }\n /**\n Focus the specified target.\n \n Sends a number of events intending to simulate a \"real\" user focusing an\n element.\n \n The following events are triggered (in order):\n \n - `focus`\n - `focusin`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle focusing a given element.\n \n @public\n @param {string|Element} target the element or selector to focus\n @return {Promise} resolves when the application is settled\n \n @example\n \n Emulating focusing an input using `focus`\n \n \n focus('input');\n */\n\n\n function focus(target) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `focus`.');\n }\n\n let element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`focus('${target}')\\`.`);\n }\n\n if (!(0, _isFocusable.default)(element)) {\n throw new Error(`${target} is not focusable`);\n }\n\n __focus__(element);\n\n return (0, _settled.default)();\n });\n }\n});","define(\"@ember/test-helpers/dom/get-root-element\", [\"exports\", \"@ember/test-helpers/setup-context\", \"@ember/test-helpers/dom/-target\"], function (_exports, _setupContext, _target) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = getRootElement;\n\n /**\n Get the root element of the application under test (usually `#ember-testing`)\n \n @public\n @returns {Element} the root element\n */\n function getRootElement() {\n let context = (0, _setupContext.getContext)();\n let owner = context && context.owner;\n\n if (!owner) {\n throw new Error('Must setup rendering context before attempting to interact with elements.');\n }\n\n let rootElement; // When the host app uses `setApplication` (instead of `setResolver`) the owner has\n // a `rootElement` set on it with the element or id to be used\n\n if (owner && owner._emberTestHelpersMockOwner === undefined) {\n rootElement = owner.rootElement;\n } else {\n rootElement = '#ember-testing';\n }\n\n if (rootElement instanceof Window) {\n rootElement = rootElement.document;\n }\n\n if ((0, _target.isElement)(rootElement) || (0, _target.isDocument)(rootElement)) {\n return rootElement;\n } else if (typeof rootElement === 'string') {\n let _rootElement = document.querySelector(rootElement);\n\n if (_rootElement) {\n return _rootElement;\n }\n\n throw new Error(`Application.rootElement (${rootElement}) not found`);\n } else {\n throw new Error('Application.rootElement must be an element or a selector string');\n }\n }\n});","define(\"@ember/test-helpers/dom/tap\", [\"exports\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/dom/click\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/-utils\"], function (_exports, _getElement, _fireEvent, _click, _settled, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = tap;\n\n /**\n Taps on the specified target.\n \n Sends a number of events intending to simulate a \"real\" user tapping on an\n element.\n \n For non-focusable elements the following events are triggered (in order):\n \n - `touchstart`\n - `touchend`\n - `mousedown`\n - `mouseup`\n - `click`\n \n For focusable (e.g. form control) elements the following events are triggered\n (in order):\n \n - `touchstart`\n - `touchend`\n - `mousedown`\n - `focus`\n - `focusin`\n - `mouseup`\n - `click`\n \n The exact listing of events that are triggered may change over time as needed\n to continue to emulate how actual browsers handle tapping on a given element.\n \n Use the `options` hash to change the parameters of the tap events.\n \n @public\n @param {string|Element} target the element or selector to tap on\n @param {Object} options the options to be merged into the touch events\n @return {Promise} resolves when settled\n \n @example\n \n Emulating tapping a button using `tap`\n \n \n tap('button');\n */\n function tap(target, options = {}) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `tap`.');\n }\n\n let element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`tap('${target}')\\`.`);\n }\n\n let touchstartEv = (0, _fireEvent.default)(element, 'touchstart', options);\n let touchendEv = (0, _fireEvent.default)(element, 'touchend', options);\n\n if (!touchstartEv.defaultPrevented && !touchendEv.defaultPrevented) {\n (0, _click.__click__)(element, options);\n }\n\n return (0, _settled.default)();\n });\n }\n});","define(\"@ember/test-helpers/dom/trigger-event\", [\"exports\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/-utils\"], function (_exports, _getElement, _fireEvent, _settled, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = triggerEvent;\n\n /**\n * Triggers an event on the specified target.\n *\n * @public\n * @param {string|Element} target the element or selector to trigger the event on\n * @param {string} eventType the type of event to trigger\n * @param {Object} options additional properties to be set on the event\n * @return {Promise} resolves when the application is settled\n *\n * @example\n * \n * Using `triggerEvent` to upload a file\n *\n * When using `triggerEvent` to upload a file the `eventType` must be `change` and you must pass the\n * `options` param as an object with a key `files` containing an array of\n * [Blob](https://developer.mozilla.org/en-US/docs/Web/API/Blob).\n * \n *\n * triggerEvent(\n * 'input.fileUpload',\n * 'change',\n * { files: [new Blob(['Ember Rules!'])] }\n * );\n *\n *\n * @example\n * \n * Using `triggerEvent` to upload a dropped file\n *\n * When using `triggerEvent` to handle a dropped (via drag-and-drop) file, the `eventType` must be `drop`. Assuming your `drop` event handler uses the [DataTransfer API](https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer),\n * you must pass the `options` param as an object with a key of `dataTransfer`. The `options.dataTransfer` object should have a `files` key, containing an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File).\n * \n *\n * triggerEvent(\n * '[data-test-drop-zone]',\n * 'drop',\n * {\n * dataTransfer: {\n * files: [new File(['Ember Rules!', 'ember-rules.txt'])]\n * }\n * }\n * )\n */\n function triggerEvent(target, eventType, options) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `triggerEvent`.');\n }\n\n let element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`triggerEvent('${target}', ...)\\`.`);\n }\n\n if (!eventType) {\n throw new Error(`Must provide an \\`eventType\\` to \\`triggerEvent\\``);\n }\n\n (0, _fireEvent.default)(element, eventType, options);\n return (0, _settled.default)();\n });\n }\n});","define(\"@ember/test-helpers/dom/trigger-key-event\", [\"exports\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/-utils\"], function (_exports, _getElement, _fireEvent, _settled, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.__triggerKeyEvent__ = __triggerKeyEvent__;\n _exports.default = triggerKeyEvent;\n const DEFAULT_MODIFIERS = Object.freeze({\n ctrlKey: false,\n altKey: false,\n shiftKey: false,\n metaKey: false\n }); // This is not a comprehensive list, but it is better than nothing.\n\n const keyFromKeyCode = {\n 8: 'Backspace',\n 9: 'Tab',\n 13: 'Enter',\n 16: 'Shift',\n 17: 'Control',\n 18: 'Alt',\n 20: 'CapsLock',\n 27: 'Escape',\n 32: ' ',\n 37: 'ArrowLeft',\n 38: 'ArrowUp',\n 39: 'ArrowRight',\n 40: 'ArrowDown',\n 48: '0',\n 49: '1',\n 50: '2',\n 51: '3',\n 52: '4',\n 53: '5',\n 54: '6',\n 55: '7',\n 56: '8',\n 57: '9',\n 65: 'a',\n 66: 'b',\n 67: 'c',\n 68: 'd',\n 69: 'e',\n 70: 'f',\n 71: 'g',\n 72: 'h',\n 73: 'i',\n 74: 'j',\n 75: 'k',\n 76: 'l',\n 77: 'm',\n 78: 'n',\n 79: 'o',\n 80: 'p',\n 81: 'q',\n 82: 'r',\n 83: 's',\n 84: 't',\n 85: 'u',\n 86: 'v',\n 87: 'v',\n 88: 'x',\n 89: 'y',\n 90: 'z',\n 91: 'Meta',\n 93: 'Meta',\n 187: '=',\n 189: '-'\n };\n /**\n Calculates the value of KeyboardEvent#key given a keycode and the modifiers.\n Note that this works if the key is pressed in combination with the shift key, but it cannot\n detect if caps lock is enabled.\n @param {number} keycode The keycode of the event.\n @param {object} modifiers The modifiers of the event.\n @returns {string} The key string for the event.\n */\n\n function keyFromKeyCodeAndModifiers(keycode, modifiers) {\n if (keycode > 64 && keycode < 91) {\n if (modifiers.shiftKey) {\n return String.fromCharCode(keycode);\n } else {\n return String.fromCharCode(keycode).toLocaleLowerCase();\n }\n }\n\n let key = keyFromKeyCode[keycode];\n\n if (key) {\n return key;\n }\n }\n /**\n * Infers the keycode from the given key\n * @param {string} key The KeyboardEvent#key string\n * @returns {number} The keycode for the given key\n */\n\n\n function keyCodeFromKey(key) {\n let keys = Object.keys(keyFromKeyCode);\n let keyCode = keys.find(keyCode => keyFromKeyCode[Number(keyCode)] === key);\n\n if (!keyCode) {\n keyCode = keys.find(keyCode => keyFromKeyCode[Number(keyCode)] === key.toLowerCase());\n }\n\n return keyCode !== undefined ? parseInt(keyCode) : undefined;\n }\n /**\n @private\n @param {Element | Document} element the element to trigger the key event on\n @param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger\n @param {number|string} key the `keyCode`(number) or `key`(string) of the event being triggered\n @param {Object} [modifiers] the state of various modifier keys\n */\n\n\n function __triggerKeyEvent__(element, eventType, key, modifiers = DEFAULT_MODIFIERS) {\n let props;\n\n if (typeof key === 'number') {\n props = {\n keyCode: key,\n which: key,\n key: keyFromKeyCodeAndModifiers(key, modifiers)\n };\n } else if (typeof key === 'string' && key.length !== 0) {\n let firstCharacter = key[0];\n\n if (firstCharacter !== firstCharacter.toUpperCase()) {\n throw new Error(`Must provide a \\`key\\` to \\`triggerKeyEvent\\` that starts with an uppercase character but you passed \\`${key}\\`.`);\n }\n\n if ((0, _utils.isNumeric)(key) && key.length > 1) {\n throw new Error(`Must provide a numeric \\`keyCode\\` to \\`triggerKeyEvent\\` but you passed \\`${key}\\` as a string.`);\n }\n\n let keyCode = keyCodeFromKey(key);\n props = {\n keyCode,\n which: keyCode,\n key\n };\n } else {\n throw new Error(`Must provide a \\`key\\` or \\`keyCode\\` to \\`triggerKeyEvent\\``);\n }\n\n let options = Ember.assign(props, modifiers);\n (0, _fireEvent.default)(element, eventType, options);\n }\n /**\n Triggers a keyboard event of given type in the target element.\n It also requires the developer to provide either a string with the [`key`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/key/Key_Values)\n or the numeric [`keyCode`](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode) of the pressed key.\n Optionally the user can also provide a POJO with extra modifiers for the event.\n \n @public\n @param {string|Element} target the element or selector to trigger the event on\n @param {'keydown' | 'keyup' | 'keypress'} eventType the type of event to trigger\n @param {number|string} key the `keyCode`(number) or `key`(string) of the event being triggered\n @param {Object} [modifiers] the state of various modifier keys\n @param {boolean} [modifiers.ctrlKey=false] if true the generated event will indicate the control key was pressed during the key event\n @param {boolean} [modifiers.altKey=false] if true the generated event will indicate the alt key was pressed during the key event\n @param {boolean} [modifiers.shiftKey=false] if true the generated event will indicate the shift key was pressed during the key event\n @param {boolean} [modifiers.metaKey=false] if true the generated event will indicate the meta key was pressed during the key event\n @return {Promise} resolves when the application is settled unless awaitSettled is false\n \n @example\n \n Emulating pressing the `ENTER` key on a button using `triggerKeyEvent`\n \n triggerKeyEvent('button', 'keydown', 'Enter');\n */\n\n\n function triggerKeyEvent(target, eventType, key, modifiers = DEFAULT_MODIFIERS) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `triggerKeyEvent`.');\n }\n\n let element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`triggerKeyEvent('${target}', ...)\\`.`);\n }\n\n if (!eventType) {\n throw new Error(`Must provide an \\`eventType\\` to \\`triggerKeyEvent\\``);\n }\n\n if (!(0, _fireEvent.isKeyboardEventType)(eventType)) {\n let validEventTypes = _fireEvent.KEYBOARD_EVENT_TYPES.join(', ');\n\n throw new Error(`Must provide an \\`eventType\\` of ${validEventTypes} to \\`triggerKeyEvent\\` but you passed \\`${eventType}\\`.`);\n }\n\n __triggerKeyEvent__(element, eventType, key, modifiers);\n\n return (0, _settled.default)();\n });\n }\n});","define(\"@ember/test-helpers/dom/type-in\", [\"exports\", \"@ember/test-helpers/-utils\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/-is-form-control\", \"@ember/test-helpers/dom/focus\", \"@ember/test-helpers/dom/-is-focusable\", \"@ember/test-helpers/dom/fire-event\", \"@ember/test-helpers/dom/trigger-key-event\"], function (_exports, _utils, _settled, _getElement, _isFormControl, _focus, _isFocusable, _fireEvent, _triggerKeyEvent) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = typeIn;\n\n /**\n * Mimics character by character entry into the target `input` or `textarea` element.\n *\n * Allows for simulation of slow entry by passing an optional millisecond delay\n * between key events.\n \n * The major difference between `typeIn` and `fillIn` is that `typeIn` triggers\n * keyboard events as well as `input` and `change`.\n * Typically this looks like `focus` -> `focusin` -> `keydown` -> `keypress` -> `keyup` -> `input` -> `change`\n * per character of the passed text (this may vary on some browsers).\n *\n * @public\n * @param {string|Element} target the element or selector to enter text into\n * @param {string} text the test to fill the element with\n * @param {Object} options {delay: x} (default 50) number of milliseconds to wait per keypress\n * @return {Promise} resolves when the application is settled\n *\n * @example\n * \n * Emulating typing in an input using `typeIn`\n * \n *\n * typeIn('hello world');\n */\n function typeIn(target, text, options = {}) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!target) {\n throw new Error('Must pass an element or selector to `typeIn`.');\n }\n\n const element = (0, _getElement.default)(target);\n\n if (!element) {\n throw new Error(`Element not found when calling \\`typeIn('${target}')\\``);\n }\n\n if (!(0, _isFormControl.default)(element)) {\n throw new Error('`typeIn` is only usable on form controls.');\n }\n\n if (typeof text === 'undefined' || text === null) {\n throw new Error('Must provide `text` when calling `typeIn`.');\n }\n\n let {\n delay = 50\n } = options;\n\n if ((0, _isFocusable.default)(element)) {\n (0, _focus.__focus__)(element);\n }\n\n return fillOut(element, text, delay).then(() => (0, _fireEvent.default)(element, 'change')).then(_settled.default);\n });\n } // eslint-disable-next-line require-jsdoc\n\n\n function fillOut(element, text, delay) {\n const inputFunctions = text.split('').map(character => keyEntry(element, character));\n return inputFunctions.reduce((currentPromise, func) => {\n return currentPromise.then(() => delayedExecute(delay)).then(func);\n }, Ember.RSVP.Promise.resolve(undefined));\n } // eslint-disable-next-line require-jsdoc\n\n\n function keyEntry(element, character) {\n let shiftKey = character === character.toUpperCase() && character !== character.toLowerCase();\n let options = {\n shiftKey\n };\n let characterKey = character.toUpperCase();\n return function () {\n return (0, _utils.nextTickPromise)().then(() => (0, _triggerKeyEvent.__triggerKeyEvent__)(element, 'keydown', characterKey, options)).then(() => (0, _triggerKeyEvent.__triggerKeyEvent__)(element, 'keypress', characterKey, options)).then(() => {\n element.value = element.value + character;\n (0, _fireEvent.default)(element, 'input');\n }).then(() => (0, _triggerKeyEvent.__triggerKeyEvent__)(element, 'keyup', characterKey, options));\n };\n } // eslint-disable-next-line require-jsdoc\n\n\n function delayedExecute(delay) {\n return new Ember.RSVP.Promise(resolve => {\n setTimeout(resolve, delay);\n });\n }\n});","define(\"@ember/test-helpers/dom/wait-for\", [\"exports\", \"@ember/test-helpers/wait-until\", \"@ember/test-helpers/dom/-get-element\", \"@ember/test-helpers/dom/-get-elements\", \"@ember/test-helpers/dom/-to-array\", \"@ember/test-helpers/-utils\"], function (_exports, _waitUntil, _getElement, _getElements, _toArray, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = waitFor;\n\n /**\n Used to wait for a particular selector to appear in the DOM. Due to the fact\n that it does not wait for general settledness, this is quite useful for testing\n interim DOM states (e.g. loading states, pending promises, etc).\n \n @param {string} selector the selector to wait for\n @param {Object} [options] the options to be used\n @param {number} [options.timeout=1000] the time to wait (in ms) for a match\n @param {number} [options.count=null] the number of elements that should match the provided selector (null means one or more)\n @return {Promise} resolves when the element(s) appear on the page\n */\n function waitFor(selector, options = {}) {\n return (0, _utils.nextTickPromise)().then(() => {\n if (!selector) {\n throw new Error('Must pass a selector to `waitFor`.');\n }\n\n let {\n timeout = 1000,\n count = null,\n timeoutMessage\n } = options;\n\n if (!timeoutMessage) {\n timeoutMessage = `waitFor timed out waiting for selector \"${selector}\"`;\n }\n\n let callback;\n\n if (count !== null) {\n callback = () => {\n let elements = (0, _getElements.default)(selector);\n\n if (elements.length === count) {\n return (0, _toArray.default)(elements);\n }\n\n return;\n };\n } else {\n callback = () => (0, _getElement.default)(selector);\n }\n\n return (0, _waitUntil.default)(callback, {\n timeout,\n timeoutMessage\n });\n });\n }\n});","define(\"@ember/test-helpers/global\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n /* globals global */\n var _default = (() => {\n if (typeof self !== 'undefined') {\n return self;\n } else if (typeof window !== 'undefined') {\n return window;\n } else if (typeof global !== 'undefined') {\n return global;\n } else {\n return Function('return this')();\n }\n })();\n\n _exports.default = _default;\n});","define(\"@ember/test-helpers/has-ember-version\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = hasEmberVersion;\n\n /**\n Checks if the currently running Ember version is greater than or equal to the\n specified major and minor version numbers.\n \n @private\n @param {number} major the major version number to compare\n @param {number} minor the minor version number to compare\n @returns {boolean} true if the Ember version is >= MAJOR.MINOR specified, false otherwise\n */\n function hasEmberVersion(major, minor) {\n var numbers = Ember.VERSION.split('-')[0].split('.');\n var actualMajor = parseInt(numbers[0], 10);\n var actualMinor = parseInt(numbers[1], 10);\n return actualMajor > major || actualMajor === major && actualMinor >= minor;\n }\n});","define(\"@ember/test-helpers/index\", [\"exports\", \"@ember/test-helpers/resolver\", \"@ember/test-helpers/application\", \"@ember/test-helpers/setup-context\", \"@ember/test-helpers/teardown-context\", \"@ember/test-helpers/setup-rendering-context\", \"@ember/test-helpers/teardown-rendering-context\", \"@ember/test-helpers/setup-application-context\", \"@ember/test-helpers/teardown-application-context\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/wait-until\", \"@ember/test-helpers/validate-error-handler\", \"@ember/test-helpers/setup-onerror\", \"@ember/test-helpers/-internal/debug-info\", \"@ember/test-helpers/-internal/debug-info-helpers\", \"@ember/test-helpers/test-metadata\", \"@ember/test-helpers/dom/click\", \"@ember/test-helpers/dom/double-click\", \"@ember/test-helpers/dom/tap\", \"@ember/test-helpers/dom/focus\", \"@ember/test-helpers/dom/blur\", \"@ember/test-helpers/dom/trigger-event\", \"@ember/test-helpers/dom/trigger-key-event\", \"@ember/test-helpers/dom/fill-in\", \"@ember/test-helpers/dom/wait-for\", \"@ember/test-helpers/dom/get-root-element\", \"@ember/test-helpers/dom/find\", \"@ember/test-helpers/dom/find-all\", \"@ember/test-helpers/dom/type-in\"], function (_exports, _resolver, _application, _setupContext, _teardownContext, _setupRenderingContext, _teardownRenderingContext, _setupApplicationContext, _teardownApplicationContext, _settled, _waitUntil, _validateErrorHandler, _setupOnerror, _debugInfo, _debugInfoHelpers, _testMetadata, _click, _doubleClick, _tap, _focus, _blur, _triggerEvent, _triggerKeyEvent, _fillIn, _waitFor, _getRootElement, _find, _findAll, _typeIn) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"setResolver\", {\n enumerable: true,\n get: function () {\n return _resolver.setResolver;\n }\n });\n Object.defineProperty(_exports, \"getResolver\", {\n enumerable: true,\n get: function () {\n return _resolver.getResolver;\n }\n });\n Object.defineProperty(_exports, \"getApplication\", {\n enumerable: true,\n get: function () {\n return _application.getApplication;\n }\n });\n Object.defineProperty(_exports, \"setApplication\", {\n enumerable: true,\n get: function () {\n return _application.setApplication;\n }\n });\n Object.defineProperty(_exports, \"setupContext\", {\n enumerable: true,\n get: function () {\n return _setupContext.default;\n }\n });\n Object.defineProperty(_exports, \"getContext\", {\n enumerable: true,\n get: function () {\n return _setupContext.getContext;\n }\n });\n Object.defineProperty(_exports, \"setContext\", {\n enumerable: true,\n get: function () {\n return _setupContext.setContext;\n }\n });\n Object.defineProperty(_exports, \"unsetContext\", {\n enumerable: true,\n get: function () {\n return _setupContext.unsetContext;\n }\n });\n Object.defineProperty(_exports, \"pauseTest\", {\n enumerable: true,\n get: function () {\n return _setupContext.pauseTest;\n }\n });\n Object.defineProperty(_exports, \"resumeTest\", {\n enumerable: true,\n get: function () {\n return _setupContext.resumeTest;\n }\n });\n Object.defineProperty(_exports, \"teardownContext\", {\n enumerable: true,\n get: function () {\n return _teardownContext.default;\n }\n });\n Object.defineProperty(_exports, \"setupRenderingContext\", {\n enumerable: true,\n get: function () {\n return _setupRenderingContext.default;\n }\n });\n Object.defineProperty(_exports, \"render\", {\n enumerable: true,\n get: function () {\n return _setupRenderingContext.render;\n }\n });\n Object.defineProperty(_exports, \"clearRender\", {\n enumerable: true,\n get: function () {\n return _setupRenderingContext.clearRender;\n }\n });\n Object.defineProperty(_exports, \"teardownRenderingContext\", {\n enumerable: true,\n get: function () {\n return _teardownRenderingContext.default;\n }\n });\n Object.defineProperty(_exports, \"setupApplicationContext\", {\n enumerable: true,\n get: function () {\n return _setupApplicationContext.default;\n }\n });\n Object.defineProperty(_exports, \"visit\", {\n enumerable: true,\n get: function () {\n return _setupApplicationContext.visit;\n }\n });\n Object.defineProperty(_exports, \"currentRouteName\", {\n enumerable: true,\n get: function () {\n return _setupApplicationContext.currentRouteName;\n }\n });\n Object.defineProperty(_exports, \"currentURL\", {\n enumerable: true,\n get: function () {\n return _setupApplicationContext.currentURL;\n }\n });\n Object.defineProperty(_exports, \"teardownApplicationContext\", {\n enumerable: true,\n get: function () {\n return _teardownApplicationContext.default;\n }\n });\n Object.defineProperty(_exports, \"settled\", {\n enumerable: true,\n get: function () {\n return _settled.default;\n }\n });\n Object.defineProperty(_exports, \"isSettled\", {\n enumerable: true,\n get: function () {\n return _settled.isSettled;\n }\n });\n Object.defineProperty(_exports, \"getSettledState\", {\n enumerable: true,\n get: function () {\n return _settled.getSettledState;\n }\n });\n Object.defineProperty(_exports, \"waitUntil\", {\n enumerable: true,\n get: function () {\n return _waitUntil.default;\n }\n });\n Object.defineProperty(_exports, \"validateErrorHandler\", {\n enumerable: true,\n get: function () {\n return _validateErrorHandler.default;\n }\n });\n Object.defineProperty(_exports, \"setupOnerror\", {\n enumerable: true,\n get: function () {\n return _setupOnerror.default;\n }\n });\n Object.defineProperty(_exports, \"resetOnerror\", {\n enumerable: true,\n get: function () {\n return _setupOnerror.resetOnerror;\n }\n });\n Object.defineProperty(_exports, \"getDebugInfo\", {\n enumerable: true,\n get: function () {\n return _debugInfo.getDebugInfo;\n }\n });\n Object.defineProperty(_exports, \"registerDebugInfoHelper\", {\n enumerable: true,\n get: function () {\n return _debugInfoHelpers.default;\n }\n });\n Object.defineProperty(_exports, \"getTestMetadata\", {\n enumerable: true,\n get: function () {\n return _testMetadata.default;\n }\n });\n Object.defineProperty(_exports, \"click\", {\n enumerable: true,\n get: function () {\n return _click.default;\n }\n });\n Object.defineProperty(_exports, \"doubleClick\", {\n enumerable: true,\n get: function () {\n return _doubleClick.default;\n }\n });\n Object.defineProperty(_exports, \"tap\", {\n enumerable: true,\n get: function () {\n return _tap.default;\n }\n });\n Object.defineProperty(_exports, \"focus\", {\n enumerable: true,\n get: function () {\n return _focus.default;\n }\n });\n Object.defineProperty(_exports, \"blur\", {\n enumerable: true,\n get: function () {\n return _blur.default;\n }\n });\n Object.defineProperty(_exports, \"triggerEvent\", {\n enumerable: true,\n get: function () {\n return _triggerEvent.default;\n }\n });\n Object.defineProperty(_exports, \"triggerKeyEvent\", {\n enumerable: true,\n get: function () {\n return _triggerKeyEvent.default;\n }\n });\n Object.defineProperty(_exports, \"fillIn\", {\n enumerable: true,\n get: function () {\n return _fillIn.default;\n }\n });\n Object.defineProperty(_exports, \"waitFor\", {\n enumerable: true,\n get: function () {\n return _waitFor.default;\n }\n });\n Object.defineProperty(_exports, \"getRootElement\", {\n enumerable: true,\n get: function () {\n return _getRootElement.default;\n }\n });\n Object.defineProperty(_exports, \"find\", {\n enumerable: true,\n get: function () {\n return _find.default;\n }\n });\n Object.defineProperty(_exports, \"findAll\", {\n enumerable: true,\n get: function () {\n return _findAll.default;\n }\n });\n Object.defineProperty(_exports, \"typeIn\", {\n enumerable: true,\n get: function () {\n return _typeIn.default;\n }\n });\n});","define(\"@ember/test-helpers/resolver\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.setResolver = setResolver;\n _exports.getResolver = getResolver;\n\n var __resolver__;\n /**\n Stores the provided resolver instance so that tests being ran can resolve\n objects in the same way as a normal application.\n \n Used by `setupContext` and `setupRenderingContext` as a fallback when `setApplication` was _not_ used.\n \n @public\n @param {Ember.Resolver} resolver the resolver to be used for testing\n */\n\n\n function setResolver(resolver) {\n __resolver__ = resolver;\n }\n /**\n Retrieve the resolver instance stored by `setResolver`.\n \n @public\n @returns {Ember.Resolver} the previously stored resolver\n */\n\n\n function getResolver() {\n return __resolver__;\n }\n});","define(\"@ember/test-helpers/settled\", [\"exports\", \"@ember/test-helpers/-utils\", \"@ember/test-helpers/wait-until\", \"@ember/test-helpers/setup-application-context\", \"ember-test-waiters\", \"@ember/test-helpers/-internal/debug-info\"], function (_exports, _utils, _waitUntil, _setupApplicationContext, _emberTestWaiters, _debugInfo) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports._teardownAJAXHooks = _teardownAJAXHooks;\n _exports._setupAJAXHooks = _setupAJAXHooks;\n _exports.getSettledState = getSettledState;\n _exports.isSettled = isSettled;\n _exports.default = settled;\n\n // Ember internally tracks AJAX requests in the same way that we do here for\n // legacy style \"acceptance\" tests using the `ember-testing.js` asset provided\n // by emberjs/ember.js itself. When `@ember/test-helpers`'s `settled` utility\n // is used in a legacy acceptance test context any pending AJAX requests are\n // not properly considered during the `isSettled` check below.\n //\n // This utilizes a local utility method present in Ember since around 2.8.0 to\n // properly consider pending AJAX requests done within legacy acceptance tests.\n const _internalPendingRequests = (() => {\n let loader = Ember.__loader;\n\n if (loader.registry['ember-testing/test/pending_requests']) {\n // Ember <= 3.1\n return loader.require('ember-testing/test/pending_requests').pendingRequests;\n } else if (loader.registry['ember-testing/lib/test/pending_requests']) {\n // Ember >= 3.2\n return loader.require('ember-testing/lib/test/pending_requests').pendingRequests;\n }\n\n return () => 0;\n })();\n\n let requests;\n /**\n @private\n @returns {number} the count of pending requests\n */\n\n function pendingRequests() {\n let localRequestsPending = requests !== undefined ? requests.length : 0;\n\n let internalRequestsPending = _internalPendingRequests();\n\n return localRequestsPending + internalRequestsPending;\n }\n /**\n @private\n @param {Event} event (unused)\n @param {XMLHTTPRequest} xhr the XHR that has initiated a request\n */\n\n\n function incrementAjaxPendingRequests(event, xhr) {\n requests.push(xhr);\n }\n /**\n @private\n @param {Event} event (unused)\n @param {XMLHTTPRequest} xhr the XHR that has initiated a request\n */\n\n\n function decrementAjaxPendingRequests(event, xhr) {\n // In most Ember versions to date (current version is 2.16) RSVP promises are\n // configured to flush in the actions queue of the Ember run loop, however it\n // is possible that in the future this changes to use \"true\" micro-task\n // queues.\n //\n // The entire point here, is that _whenever_ promises are resolved will be\n // before the next run of the JS event loop. Then in the next event loop this\n // counter will decrement. In the specific case of AJAX, this means that any\n // promises chained off of `$.ajax` will properly have their `.then` called\n // _before_ this is decremented (and testing continues)\n (0, _utils.nextTick)(() => {\n for (let i = 0; i < requests.length; i++) {\n if (xhr === requests[i]) {\n requests.splice(i, 1);\n }\n }\n }, 0);\n }\n /**\n Clears listeners that were previously setup for `ajaxSend` and `ajaxComplete`.\n \n @private\n */\n\n\n function _teardownAJAXHooks() {\n // jQuery will not invoke `ajaxComplete` if\n // 1. `transport.send` throws synchronously and\n // 2. it has an `error` option which also throws synchronously\n // We can no longer handle any remaining requests\n requests = [];\n\n if (typeof jQuery === 'undefined') {\n return;\n }\n\n jQuery(document).off('ajaxSend', incrementAjaxPendingRequests);\n jQuery(document).off('ajaxComplete', decrementAjaxPendingRequests);\n }\n /**\n Sets up listeners for `ajaxSend` and `ajaxComplete`.\n \n @private\n */\n\n\n function _setupAJAXHooks() {\n requests = [];\n\n if (typeof jQuery === 'undefined') {\n return;\n }\n\n jQuery(document).on('ajaxSend', incrementAjaxPendingRequests);\n jQuery(document).on('ajaxComplete', decrementAjaxPendingRequests);\n }\n\n let _internalCheckWaiters;\n\n let loader = Ember.__loader;\n\n if (loader.registry['ember-testing/test/waiters']) {\n // Ember <= 3.1\n _internalCheckWaiters = loader.require('ember-testing/test/waiters').checkWaiters;\n } else if (loader.registry['ember-testing/lib/test/waiters']) {\n // Ember >= 3.2\n _internalCheckWaiters = loader.require('ember-testing/lib/test/waiters').checkWaiters;\n }\n /**\n @private\n @returns {boolean} true if waiters are still pending\n */\n\n\n function checkWaiters() {\n let EmberTest = Ember.Test;\n\n if (_internalCheckWaiters) {\n return _internalCheckWaiters();\n } else if (EmberTest.waiters) {\n if (EmberTest.waiters.some(([context, callback]) => !callback.call(context))) {\n return true;\n }\n }\n\n return false;\n }\n /**\n Check various settledness metrics, and return an object with the following properties:\n \n - `hasRunLoop` - Checks if a run-loop has been started. If it has, this will\n be `true` otherwise it will be `false`.\n - `hasPendingTimers` - Checks if there are scheduled timers in the run-loop.\n These pending timers are primarily registered by `Ember.run.schedule`. If\n there are pending timers, this will be `true`, otherwise `false`.\n - `hasPendingWaiters` - Checks if any registered test waiters are still\n pending (e.g. the waiter returns `true`). If there are pending waiters,\n this will be `true`, otherwise `false`.\n - `hasPendingRequests` - Checks if there are pending AJAX requests (based on\n `ajaxSend` / `ajaxComplete` events triggered by `jQuery.ajax`). If there\n are pending requests, this will be `true`, otherwise `false`.\n - `hasPendingTransitions` - Checks if there are pending route transitions. If the\n router has not been instantiated / setup for the test yet this will return `null`,\n if there are pending transitions, this will be `true`, otherwise `false`.\n - `pendingRequestCount` - The count of pending AJAX requests.\n - `debugInfo` - Debug information that's combined with info return from backburner's\n getDebugInfo method.\n \n @public\n @returns {Object} object with properties for each of the metrics used to determine settledness\n */\n\n\n function getSettledState() {\n let hasPendingTimers = Boolean(Ember.run.hasScheduledTimers());\n let hasRunLoop = Boolean(Ember.run.currentRunLoop);\n let hasPendingLegacyWaiters = checkWaiters();\n let hasPendingTestWaiters = (0, _emberTestWaiters.hasPendingWaiters)();\n let pendingRequestCount = pendingRequests();\n let hasPendingRequests = pendingRequestCount > 0;\n return {\n hasPendingTimers,\n hasRunLoop,\n hasPendingWaiters: hasPendingLegacyWaiters || hasPendingTestWaiters,\n hasPendingRequests,\n hasPendingTransitions: (0, _setupApplicationContext.hasPendingTransitions)(),\n pendingRequestCount,\n debugInfo: new _debugInfo.TestDebugInfo({\n hasPendingTimers,\n hasRunLoop,\n hasPendingLegacyWaiters,\n hasPendingTestWaiters,\n hasPendingRequests\n })\n };\n }\n /**\n Checks various settledness metrics (via `getSettledState()`) to determine if things are settled or not.\n \n Settled generally means that there are no pending timers, no pending waiters,\n no pending AJAX requests, and no current run loop. However, new settledness\n metrics may be added and used as they become available.\n \n @public\n @returns {boolean} `true` if settled, `false` otherwise\n */\n\n\n function isSettled() {\n let {\n hasPendingTimers,\n hasRunLoop,\n hasPendingRequests,\n hasPendingWaiters,\n hasPendingTransitions\n } = getSettledState();\n\n if (hasPendingTimers || hasRunLoop || hasPendingRequests || hasPendingWaiters || hasPendingTransitions) {\n return false;\n }\n\n return true;\n }\n /**\n Returns a promise that resolves when in a settled state (see `isSettled` for\n a definition of \"settled state\").\n \n @public\n @returns {Promise} resolves when settled\n */\n\n\n function settled() {\n return (0, _waitUntil.default)(isSettled, {\n timeout: Infinity\n }).then(() => {});\n }\n});","define(\"@ember/test-helpers/setup-application-context\", [\"exports\", \"@ember/test-helpers/-utils\", \"@ember/test-helpers/setup-context\", \"@ember/test-helpers/global\", \"@ember/test-helpers/has-ember-version\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/test-metadata\"], function (_exports, _utils, _setupContext, _global, _hasEmberVersion, _settled, _testMetadata) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.isApplicationTestContext = isApplicationTestContext;\n _exports.hasPendingTransitions = hasPendingTransitions;\n _exports.setupRouterSettlednessTracking = setupRouterSettlednessTracking;\n _exports.visit = visit;\n _exports.currentRouteName = currentRouteName;\n _exports.currentURL = currentURL;\n _exports.default = setupApplicationContext;\n const CAN_USE_ROUTER_EVENTS = (0, _hasEmberVersion.default)(3, 6);\n let routerTransitionsPending = null;\n const ROUTER = new WeakMap();\n const HAS_SETUP_ROUTER = new WeakMap(); // eslint-disable-next-line require-jsdoc\n\n function isApplicationTestContext(context) {\n return (0, _setupContext.isTestContext)(context);\n }\n /**\n Determines if we have any pending router transtions (used to determine `settled` state)\n \n @public\n @returns {(boolean|null)} if there are pending transitions\n */\n\n\n function hasPendingTransitions() {\n if (CAN_USE_ROUTER_EVENTS) {\n return routerTransitionsPending;\n }\n\n let context = (0, _setupContext.getContext)(); // there is no current context, we cannot check\n\n if (context === undefined) {\n return null;\n }\n\n let router = ROUTER.get(context);\n\n if (router === undefined) {\n // if there is no router (e.g. no `visit` calls made yet), we cannot\n // check for pending transitions but this is explicitly not an error\n // condition\n return null;\n }\n\n let routerMicrolib = router._routerMicrolib || router.router;\n\n if (routerMicrolib === undefined) {\n return null;\n }\n\n return !!routerMicrolib.activeTransition;\n }\n /**\n Setup the current router instance with settledness tracking. Generally speaking this\n is done automatically (during a `visit('/some-url')` invocation), but under some\n circumstances (e.g. a non-application test where you manually call `this.owner.setupRouter()`)\n you may want to call it yourself.\n \n @public\n */\n\n\n function setupRouterSettlednessTracking() {\n const context = (0, _setupContext.getContext)();\n\n if (context === undefined) {\n throw new Error('Cannot setupRouterSettlednessTracking outside of a test context');\n } // avoid setting up many times for the same context\n\n\n if (HAS_SETUP_ROUTER.get(context)) {\n return;\n }\n\n HAS_SETUP_ROUTER.set(context, true);\n let {\n owner\n } = context;\n let router;\n\n if (CAN_USE_ROUTER_EVENTS) {\n router = owner.lookup('service:router'); // track pending transitions via the public routeWillChange / routeDidChange APIs\n // routeWillChange can fire many times and is only useful to know when we have _started_\n // transitioning, we can then use routeDidChange to signal that the transition has settled\n\n router.on('routeWillChange', () => routerTransitionsPending = true);\n router.on('routeDidChange', () => routerTransitionsPending = false);\n } else {\n router = owner.lookup('router:main');\n ROUTER.set(context, router);\n } // hook into teardown to reset local settledness state\n\n\n let ORIGINAL_WILL_DESTROY = router.willDestroy;\n\n router.willDestroy = function () {\n routerTransitionsPending = null;\n return ORIGINAL_WILL_DESTROY.apply(this, arguments);\n };\n }\n /**\n Navigate the application to the provided URL.\n \n @public\n @param {string} url The URL to visit (e.g. `/posts`)\n @param {object} options app boot options\n @returns {Promise} resolves when settled\n */\n\n\n function visit(url, options) {\n const context = (0, _setupContext.getContext)();\n\n if (!context || !isApplicationTestContext(context)) {\n throw new Error('Cannot call `visit` without having first called `setupApplicationContext`.');\n }\n\n let {\n owner\n } = context;\n let testMetadata = (0, _testMetadata.default)(context);\n testMetadata.usedHelpers.push('visit');\n return (0, _utils.nextTickPromise)().then(() => {\n let visitResult = owner.visit(url, options);\n setupRouterSettlednessTracking();\n return visitResult;\n }).then(() => {\n if (_global.default.EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) {\n context.element = document.querySelector('#ember-testing > .ember-view');\n } else {\n context.element = document.querySelector('#ember-testing');\n }\n }).then(_settled.default);\n }\n /**\n @public\n @returns {string} the currently active route name\n */\n\n\n function currentRouteName() {\n const context = (0, _setupContext.getContext)();\n\n if (!context || !isApplicationTestContext(context)) {\n throw new Error('Cannot call `currentRouteName` without having first called `setupApplicationContext`.');\n }\n\n let router = context.owner.lookup('router:main');\n return Ember.get(router, 'currentRouteName');\n }\n\n const HAS_CURRENT_URL_ON_ROUTER = (0, _hasEmberVersion.default)(2, 13);\n /**\n @public\n @returns {string} the applications current url\n */\n\n function currentURL() {\n const context = (0, _setupContext.getContext)();\n\n if (!context || !isApplicationTestContext(context)) {\n throw new Error('Cannot call `currentURL` without having first called `setupApplicationContext`.');\n }\n\n let router = context.owner.lookup('router:main');\n\n if (HAS_CURRENT_URL_ON_ROUTER) {\n return Ember.get(router, 'currentURL');\n } else {\n return Ember.get(router, 'location').getURL();\n }\n }\n /**\n Used by test framework addons to setup the provided context for working with\n an application (e.g. routing).\n \n `setupContext` must have been run on the provided context prior to calling\n `setupApplicationContext`.\n \n Sets up the basic framework used by application tests.\n \n @public\n @param {Object} context the context to setup\n @returns {Promise} resolves with the context that was setup\n */\n\n\n function setupApplicationContext(context) {\n let testMetadata = (0, _testMetadata.default)(context);\n testMetadata.setupTypes.push('setupApplicationContext');\n return (0, _utils.nextTickPromise)();\n }\n});","define(\"@ember/test-helpers/setup-context\", [\"exports\", \"@ember/test-helpers/build-owner\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/global\", \"@ember/test-helpers/resolver\", \"@ember/test-helpers/application\", \"@ember/test-helpers/-utils\", \"@ember/test-helpers/test-metadata\"], function (_exports, _buildOwner, _settled, _global, _resolver, _application, _utils, _testMetadata) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.isTestContext = isTestContext;\n _exports.setContext = setContext;\n _exports.getContext = getContext;\n _exports.unsetContext = unsetContext;\n _exports.pauseTest = pauseTest;\n _exports.resumeTest = resumeTest;\n _exports.default = setupContext;\n _exports.CLEANUP = void 0;\n\n // eslint-disable-next-line require-jsdoc\n function isTestContext(context) {\n return typeof context.pauseTest === 'function' && typeof context.resumeTest === 'function';\n }\n\n let __test_context__;\n /**\n Stores the provided context as the \"global testing context\".\n \n Generally setup automatically by `setupContext`.\n \n @public\n @param {Object} context the context to use\n */\n\n\n function setContext(context) {\n __test_context__ = context;\n }\n /**\n Retrive the \"global testing context\" as stored by `setContext`.\n \n @public\n @returns {Object} the previously stored testing context\n */\n\n\n function getContext() {\n return __test_context__;\n }\n /**\n Clear the \"global testing context\".\n \n Generally invoked from `teardownContext`.\n \n @public\n */\n\n\n function unsetContext() {\n __test_context__ = undefined;\n }\n /**\n * Returns a promise to be used to pauses the current test (due to being\n * returned from the test itself). This is useful for debugging while testing\n * or for test-driving. It allows you to inspect the state of your application\n * at any point.\n *\n * The test framework wrapper (e.g. `ember-qunit` or `ember-mocha`) should\n * ensure that when `pauseTest()` is used, any framework specific test timeouts\n * are disabled.\n *\n * @public\n * @returns {Promise} resolves _only_ when `resumeTest()` is invoked\n * @example Usage via ember-qunit\n *\n * import { setupRenderingTest } from 'ember-qunit';\n * import { render, click, pauseTest } from '@ember/test-helpers';\n *\n *\n * module('awesome-sauce', function(hooks) {\n * setupRenderingTest(hooks);\n *\n * test('does something awesome', async function(assert) {\n * await render(hbs`{{awesome-sauce}}`);\n *\n * // added here to visualize / interact with the DOM prior\n * // to the interaction below\n * await pauseTest();\n *\n * click('.some-selector');\n *\n * assert.equal(this.element.textContent, 'this sauce is awesome!');\n * });\n * });\n */\n\n\n function pauseTest() {\n let context = getContext();\n\n if (!context || !isTestContext(context)) {\n throw new Error('Cannot call `pauseTest` without having first called `setupTest` or `setupRenderingTest`.');\n }\n\n return context.pauseTest();\n }\n /**\n Resumes a test previously paused by `await pauseTest()`.\n \n @public\n */\n\n\n function resumeTest() {\n let context = getContext();\n\n if (!context || !isTestContext(context)) {\n throw new Error('Cannot call `resumeTest` without having first called `setupTest` or `setupRenderingTest`.');\n }\n\n context.resumeTest();\n }\n\n const CLEANUP = Object.create(null);\n /**\n Used by test framework addons to setup the provided context for testing.\n \n Responsible for:\n \n - sets the \"global testing context\" to the provided context (`setContext`)\n - create an owner object and set it on the provided context (e.g. `this.owner`)\n - setup `this.set`, `this.setProperties`, `this.get`, and `this.getProperties` to the provided context\n - setting up AJAX listeners\n - setting up `pauseTest` (also available as `this.pauseTest()`) and `resumeTest` helpers\n \n @public\n @param {Object} context the context to setup\n @param {Object} [options] options used to override defaults\n @param {Resolver} [options.resolver] a resolver to use for customizing normal resolution\n @returns {Promise} resolves with the context that was setup\n */\n\n _exports.CLEANUP = CLEANUP;\n\n function setupContext(context, options = {}) {\n Ember.testing = true;\n setContext(context);\n let contextGuid = Ember.guidFor(context);\n CLEANUP[contextGuid] = [];\n let testMetadata = (0, _testMetadata.default)(context);\n testMetadata.setupTypes.push('setupContext');\n Ember.run.backburner.DEBUG = true;\n return (0, _utils.nextTickPromise)().then(() => {\n let application = (0, _application.getApplication)();\n\n if (application) {\n return application.boot().then(() => {});\n }\n\n return;\n }).then(() => {\n let testElementContainer = document.getElementById('ember-testing-container'); // TODO remove \"!\"\n\n let fixtureResetValue = testElementContainer.innerHTML; // push this into the final cleanup bucket, to be ran _after_ the owner\n // is destroyed and settled (e.g. flushed run loops, etc)\n\n CLEANUP[contextGuid].push(() => {\n testElementContainer.innerHTML = fixtureResetValue;\n });\n let {\n resolver\n } = options; // This handles precendence, specifying a specific option of\n // resolver always trumps whatever is auto-detected, then we fallback to\n // the suite-wide registrations\n //\n // At some later time this can be extended to support specifying a custom\n // engine or application...\n\n if (resolver) {\n return (0, _buildOwner.default)(null, resolver);\n }\n\n return (0, _buildOwner.default)((0, _application.getApplication)(), (0, _resolver.getResolver)());\n }).then(owner => {\n Object.defineProperty(context, 'owner', {\n configurable: true,\n enumerable: true,\n value: owner,\n writable: false\n });\n Object.defineProperty(context, 'set', {\n configurable: true,\n enumerable: true,\n\n value(key, value) {\n let ret = Ember.run(function () {\n return Ember.set(context, key, value);\n });\n return ret;\n },\n\n writable: false\n });\n Object.defineProperty(context, 'setProperties', {\n configurable: true,\n enumerable: true,\n\n value(hash) {\n let ret = Ember.run(function () {\n return Ember.setProperties(context, hash);\n });\n return ret;\n },\n\n writable: false\n });\n Object.defineProperty(context, 'get', {\n configurable: true,\n enumerable: true,\n\n value(key) {\n return Ember.get(context, key);\n },\n\n writable: false\n });\n Object.defineProperty(context, 'getProperties', {\n configurable: true,\n enumerable: true,\n\n value(...args) {\n return Ember.getProperties(context, args);\n },\n\n writable: false\n });\n let resume;\n\n context.resumeTest = function resumeTest() {\n (true && !(Boolean(resume)) && Ember.assert('Testing has not been paused. There is nothing to resume.', Boolean(resume)));\n resume();\n _global.default.resumeTest = resume = undefined;\n };\n\n context.pauseTest = function pauseTest() {\n console.info('Testing paused. Use `resumeTest()` to continue.'); // eslint-disable-line no-console\n\n return new Ember.RSVP.Promise(resolve => {\n resume = resolve;\n _global.default.resumeTest = resumeTest;\n }, 'TestAdapter paused promise');\n };\n\n (0, _settled._setupAJAXHooks)();\n return context;\n });\n }\n});","define(\"@ember/test-helpers/setup-onerror\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = setupOnerror;\n _exports.resetOnerror = void 0;\n const ORIGINAL_EMBER_ONERROR = Ember.onerror;\n /**\n * Sets the `Ember.onerror` function for tests. This value is intended to be reset after\n * each test to ensure correct test isolation. To reset, you should simply call `setupOnerror`\n * without an `onError` argument.\n *\n * @public\n * @param {Function} onError the onError function to be set on Ember.onerror\n *\n * @example Example implementation for `ember-qunit` or `ember-mocha`\n *\n * import { setupOnerror } from '@ember/test-helpers';\n *\n * test('Ember.onerror is stubbed properly', function(assert) {\n * setupOnerror(function(err) {\n * assert.ok(err);\n * });\n * });\n */\n\n function setupOnerror(onError) {\n if (typeof onError !== 'function') {\n onError = ORIGINAL_EMBER_ONERROR;\n }\n\n Ember.onerror = onError;\n }\n /**\n * Resets `Ember.onerror` to the value it originally was at the start of the test run.\n *\n * @public\n *\n * @example\n *\n * import { resetOnerror } from '@ember/test-helpers';\n *\n * QUnit.testDone(function() {\n * resetOnerror();\n * })\n */\n\n\n const resetOnerror = setupOnerror;\n _exports.resetOnerror = resetOnerror;\n});","define(\"@ember/test-helpers/setup-rendering-context\", [\"exports\", \"@ember/test-helpers/global\", \"@ember/test-helpers/setup-context\", \"@ember/test-helpers/-utils\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/dom/get-root-element\", \"@ember/test-helpers/test-metadata\"], function (_exports, _global, _setupContext, _utils, _settled, _getRootElement, _testMetadata) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.isRenderingTestContext = isRenderingTestContext;\n _exports.render = render;\n _exports.clearRender = clearRender;\n _exports.default = setupRenderingContext;\n _exports.RENDERING_CLEANUP = void 0;\n const RENDERING_CLEANUP = Object.create(null);\n _exports.RENDERING_CLEANUP = RENDERING_CLEANUP;\n const OUTLET_TEMPLATE = Ember.HTMLBars.template({\n \"id\": \"Lvsp1nVR\",\n \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[1,[30,[36,1],[[30,[36,0],null,null]],null]]],\\\"hasEval\\\":false,\\\"upvars\\\":[\\\"-outlet\\\",\\\"component\\\"]}\",\n \"meta\": {}\n });\n const EMPTY_TEMPLATE = Ember.HTMLBars.template({\n \"id\": \"cgf6XJaX\",\n \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[],\\\"hasEval\\\":false,\\\"upvars\\\":[]}\",\n \"meta\": {}\n }); // eslint-disable-next-line require-jsdoc\n\n function isRenderingTestContext(context) {\n return (0, _setupContext.isTestContext)(context) && typeof context.render === 'function' && typeof context.clearRender === 'function';\n }\n /**\n @private\n @param {Ember.ApplicationInstance} owner the current owner instance\n @param {string} templateFullName the fill template name\n @returns {Template} the template representing `templateFullName`\n */\n\n\n function lookupTemplate(owner, templateFullName) {\n let template = owner.lookup(templateFullName);\n if (typeof template === 'function') return template(owner);\n return template;\n }\n /**\n @private\n @param {Ember.ApplicationInstance} owner the current owner instance\n @returns {Template} a template representing {{outlet}}\n */\n\n\n function lookupOutletTemplate(owner) {\n let OutletTemplate = lookupTemplate(owner, 'template:-outlet');\n\n if (!OutletTemplate) {\n owner.register('template:-outlet', OUTLET_TEMPLATE);\n OutletTemplate = lookupTemplate(owner, 'template:-outlet');\n }\n\n return OutletTemplate;\n }\n /**\n @private\n @param {string} [selector] the selector to search for relative to element\n @returns {jQuery} a jQuery object representing the selector (or element itself if no selector)\n */\n\n\n function jQuerySelector(selector) {\n (true && !(false) && Ember.deprecate('Using this.$() in a rendering test has been deprecated, consider using this.element instead.', false, {\n id: 'ember-test-helpers.rendering-context.jquery-element',\n until: '2.0.0',\n // @ts-ignore\n url: 'https://emberjs.com/deprecations/v3.x#toc_jquery-apis'\n }));\n let {\n element\n } = (0, _setupContext.getContext)(); // emulates Ember internal behavor of `this.$` in a component\n // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18\n\n return selector ? _global.default.jQuery(selector, element) : _global.default.jQuery(element);\n }\n\n let templateId = 0;\n /**\n Renders the provided template and appends it to the DOM.\n \n @public\n @param {CompiledTemplate} template the template to render\n @returns {Promise} resolves when settled\n */\n\n function render(template) {\n let context = (0, _setupContext.getContext)();\n\n if (!template) {\n throw new Error('you must pass a template to `render()`');\n }\n\n return (0, _utils.nextTickPromise)().then(() => {\n if (!context || !isRenderingTestContext(context)) {\n throw new Error('Cannot call `render` without having first called `setupRenderingContext`.');\n }\n\n let {\n owner\n } = context;\n let testMetadata = (0, _testMetadata.default)(context);\n testMetadata.usedHelpers.push('render');\n let toplevelView = owner.lookup('-top-level-view:main');\n let OutletTemplate = lookupOutletTemplate(owner);\n templateId += 1;\n let templateFullName = `template:-undertest-${templateId}`;\n owner.register(templateFullName, template);\n let outletState = {\n render: {\n owner,\n into: undefined,\n outlet: 'main',\n name: 'application',\n controller: undefined,\n ViewClass: undefined,\n template: OutletTemplate\n },\n outlets: {\n main: {\n render: {\n owner,\n into: undefined,\n outlet: 'main',\n name: 'index',\n controller: context,\n ViewClass: undefined,\n template: lookupTemplate(owner, templateFullName),\n outlets: {}\n },\n outlets: {}\n }\n }\n };\n toplevelView.setOutletState(outletState); // returning settled here because the actual rendering does not happen until\n // the renderer detects it is dirty (which happens on backburner's end\n // hook), see the following implementation details:\n //\n // * [view:outlet](https://github.com/emberjs/ember.js/blob/f94a4b6aef5b41b96ef2e481f35e07608df01440/packages/ember-glimmer/lib/views/outlet.js#L129-L145) manually dirties its own tag upon `setOutletState`\n // * [backburner's custom end hook](https://github.com/emberjs/ember.js/blob/f94a4b6aef5b41b96ef2e481f35e07608df01440/packages/ember-glimmer/lib/renderer.js#L145-L159) detects that the current revision of the root is no longer the latest, and triggers a new rendering transaction\n\n return (0, _settled.default)();\n });\n }\n /**\n Clears any templates previously rendered. This is commonly used for\n confirming behavior that is triggered by teardown (e.g.\n `willDestroyElement`).\n \n @public\n @returns {Promise} resolves when settled\n */\n\n\n function clearRender() {\n let context = (0, _setupContext.getContext)();\n\n if (!context || !isRenderingTestContext(context)) {\n throw new Error('Cannot call `clearRender` without having first called `setupRenderingContext`.');\n }\n\n return render(EMPTY_TEMPLATE);\n }\n /**\n Used by test framework addons to setup the provided context for rendering.\n \n `setupContext` must have been ran on the provided context\n prior to calling `setupRenderingContext`.\n \n Responsible for:\n \n - Setup the basic framework used for rendering by the\n `render` helper.\n - Ensuring the event dispatcher is properly setup.\n - Setting `this.element` to the root element of the testing\n container (things rendered via `render` will go _into_ this\n element).\n \n @public\n @param {Object} context the context to setup for rendering\n @returns {Promise} resolves with the context that was setup\n */\n\n\n function setupRenderingContext(context) {\n let contextGuid = Ember.guidFor(context);\n RENDERING_CLEANUP[contextGuid] = [];\n let testMetadata = (0, _testMetadata.default)(context);\n testMetadata.setupTypes.push('setupRenderingContext');\n return (0, _utils.nextTickPromise)().then(() => {\n let {\n owner\n } = context; // these methods being placed on the context itself will be deprecated in\n // a future version (no giant rush) to remove some confusion about which\n // is the \"right\" way to things...\n\n Object.defineProperty(context, 'render', {\n configurable: true,\n enumerable: true,\n value: render,\n writable: false\n });\n Object.defineProperty(context, 'clearRender', {\n configurable: true,\n enumerable: true,\n value: clearRender,\n writable: false\n });\n\n if (_global.default.jQuery) {\n Object.defineProperty(context, '$', {\n configurable: true,\n enumerable: true,\n value: jQuerySelector,\n writable: false\n });\n } // When the host app uses `setApplication` (instead of `setResolver`) the event dispatcher has\n // already been setup via `applicationInstance.boot()` in `./build-owner`. If using\n // `setResolver` (instead of `setApplication`) a \"mock owner\" is created by extending\n // `Ember._ContainerProxyMixin` and `Ember._RegistryProxyMixin` in this scenario we need to\n // manually start the event dispatcher.\n\n\n if (owner._emberTestHelpersMockOwner) {\n let dispatcher = owner.lookup('event_dispatcher:main') || Ember.EventDispatcher.create();\n dispatcher.setup({}, '#ember-testing');\n }\n\n let OutletView = owner.factoryFor ? owner.factoryFor('view:-outlet') : owner._lookupFactory('view:-outlet');\n let toplevelView = OutletView.create();\n owner.register('-top-level-view:main', {\n create() {\n return toplevelView;\n }\n\n }); // initially render a simple empty template\n\n return render(EMPTY_TEMPLATE).then(() => {\n Ember.run(toplevelView, 'appendTo', (0, _getRootElement.default)());\n return (0, _settled.default)();\n });\n }).then(() => {\n Object.defineProperty(context, 'element', {\n configurable: true,\n enumerable: true,\n // ensure the element is based on the wrapping toplevel view\n // Ember still wraps the main application template with a\n // normal tagged view\n //\n // In older Ember versions (2.4) the element itself is not stable,\n // and therefore we cannot update the `this.element` until after the\n // rendering is completed\n value: _global.default.EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false ? (0, _getRootElement.default)().querySelector('.ember-view') : (0, _getRootElement.default)(),\n writable: false\n });\n return context;\n });\n }\n});","define(\"@ember/test-helpers/teardown-application-context\", [\"exports\", \"@ember/test-helpers/-utils\", \"@ember/test-helpers/settled\"], function (_exports, _utils, _settled) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = _default;\n\n /**\n Used by test framework addons to tear down the provided context after testing is completed.\n \n @public\n @param {Object} context the context to setup\n @param {Object} [options] options used to override defaults\n @param {boolean} [options.waitForSettled=true] should the teardown wait for `settled()`ness\n @returns {Promise} resolves when settled\n */\n function _default(context, options) {\n let waitForSettled = true;\n\n if (options !== undefined && 'waitForSettled' in options) {\n waitForSettled = options.waitForSettled;\n }\n\n if (waitForSettled) {\n return (0, _settled.default)();\n }\n\n return (0, _utils.nextTickPromise)();\n }\n});","define(\"@ember/test-helpers/teardown-context\", [\"exports\", \"@ember/test-helpers/settled\", \"@ember/test-helpers/setup-context\", \"@ember/test-helpers/-utils\"], function (_exports, _settled, _setupContext, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = teardownContext;\n\n /**\n Used by test framework addons to tear down the provided context after testing is completed.\n \n Responsible for:\n \n - un-setting the \"global testing context\" (`unsetContext`)\n - destroy the contexts owner object\n - remove AJAX listeners\n \n @public\n @param {Object} context the context to setup\n @param {Object} [options] options used to override defaults\n @param {boolean} [options.waitForSettled=true] should the teardown wait for `settled()`ness\n @returns {Promise} resolves when settled\n */\n function teardownContext(context, options) {\n let waitForSettled = true;\n\n if (options !== undefined && 'waitForSettled' in options) {\n waitForSettled = options.waitForSettled;\n }\n\n return (0, _utils.nextTickPromise)().then(() => {\n let {\n owner\n } = context;\n (0, _settled._teardownAJAXHooks)();\n Ember.run(owner, 'destroy');\n Ember.testing = false;\n (0, _setupContext.unsetContext)();\n\n if (waitForSettled) {\n return (0, _settled.default)();\n }\n\n return (0, _utils.nextTickPromise)();\n }).finally(() => {\n let contextGuid = Ember.guidFor(context);\n (0, _utils.runDestroyablesFor)(_setupContext.CLEANUP, contextGuid);\n\n if (waitForSettled) {\n return (0, _settled.default)();\n }\n\n return (0, _utils.nextTickPromise)();\n });\n }\n});","define(\"@ember/test-helpers/teardown-rendering-context\", [\"exports\", \"@ember/test-helpers/setup-rendering-context\", \"@ember/test-helpers/-utils\", \"@ember/test-helpers/settled\"], function (_exports, _setupRenderingContext, _utils, _settled) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = teardownRenderingContext;\n\n /**\n Used by test framework addons to tear down the provided context after testing is completed.\n \n Responsible for:\n \n - resetting the `ember-testing-container` to its original state (the value\n when `setupRenderingContext` was called).\n \n @public\n @param {Object} context the context to setup\n @param {Object} [options] options used to override defaults\n @param {boolean} [options.waitForSettled=true] should the teardown wait for `settled()`ness\n @returns {Promise} resolves when settled\n */\n function teardownRenderingContext(context, options) {\n let waitForSettled = true;\n\n if (options !== undefined && 'waitForSettled' in options) {\n waitForSettled = options.waitForSettled;\n }\n\n return (0, _utils.nextTickPromise)().then(() => {\n let contextGuid = Ember.guidFor(context);\n (0, _utils.runDestroyablesFor)(_setupRenderingContext.RENDERING_CLEANUP, contextGuid);\n\n if (waitForSettled) {\n return (0, _settled.default)();\n }\n\n return (0, _utils.nextTickPromise)();\n });\n }\n});","define(\"@ember/test-helpers/test-metadata\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = getTestMetadata;\n _exports.TestMetadata = void 0;\n\n class TestMetadata {\n constructor() {\n this.setupTypes = [];\n this.usedHelpers = [];\n }\n\n get isRendering() {\n return this.setupTypes.indexOf('setupRenderingContext') > -1 && this.usedHelpers.indexOf('render') > -1;\n }\n\n get isApplication() {\n return this.setupTypes.indexOf('setupApplicationContext') > -1;\n }\n\n }\n\n _exports.TestMetadata = TestMetadata;\n const TEST_METADATA = new WeakMap();\n /**\n * Gets the test metadata associated with the provided test context. Will create\n * a new test metadata object if one does not exist.\n *\n * @param {BaseContext} context the context to use\n * @returns {ITestMetadata} the test metadata for the provided context\n */\n\n function getTestMetadata(context) {\n if (!TEST_METADATA.has(context)) {\n TEST_METADATA.set(context, new TestMetadata());\n }\n\n return TEST_METADATA.get(context);\n }\n});","define(\"@ember/test-helpers/validate-error-handler\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = validateErrorHandler;\n const VALID = Object.freeze({\n isValid: true,\n message: null\n });\n const INVALID = Object.freeze({\n isValid: false,\n message: 'error handler should have re-thrown the provided error'\n });\n /**\n * Validate the provided error handler to confirm that it properly re-throws\n * errors when `Ember.testing` is true.\n *\n * This is intended to be used by test framework hosts (or other libraries) to\n * ensure that `Ember.onerror` is properly configured. Without a check like\n * this, `Ember.onerror` could _easily_ swallow all errors and make it _seem_\n * like everything is just fine (and have green tests) when in reality\n * everything is on fire...\n *\n * @public\n * @param {Function} [callback=Ember.onerror] the callback to validate\n * @returns {Object} object with `isValid` and `message`\n *\n * @example Example implementation for `ember-qunit`\n *\n * import { validateErrorHandler } from '@ember/test-helpers';\n *\n * test('Ember.onerror is functioning properly', function(assert) {\n * let result = validateErrorHandler();\n * assert.ok(result.isValid, result.message);\n * });\n */\n\n function validateErrorHandler(callback = Ember.onerror) {\n if (callback === undefined || callback === null) {\n return VALID;\n }\n\n let error = new Error('Error handler validation error!');\n let originalEmberTesting = Ember.testing;\n Ember.testing = true;\n\n try {\n callback(error);\n } catch (e) {\n if (e === error) {\n return VALID;\n }\n } finally {\n Ember.testing = originalEmberTesting;\n }\n\n return INVALID;\n }\n});","define(\"@ember/test-helpers/wait-until\", [\"exports\", \"@ember/test-helpers/-utils\"], function (_exports, _utils) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = waitUntil;\n const TIMEOUTS = [0, 1, 2, 5, 7];\n const MAX_TIMEOUT = 10;\n /**\n Wait for the provided callback to return a truthy value.\n \n This does not leverage `settled()`, and as such can be used to manage async\n while _not_ settled (e.g. \"loading\" or \"pending\" states).\n \n @public\n @param {Function} callback the callback to use for testing when waiting should stop\n @param {Object} [options] options used to override defaults\n @param {number} [options.timeout=1000] the maximum amount of time to wait\n @param {string} [options.timeoutMessage='waitUntil timed out'] the message to use in the reject on timeout\n @returns {Promise} resolves with the callback value when it returns a truthy value\n */\n\n function waitUntil(callback, options = {}) {\n let timeout = 'timeout' in options ? options.timeout : 1000;\n let timeoutMessage = 'timeoutMessage' in options ? options.timeoutMessage : 'waitUntil timed out'; // creating this error eagerly so it has the proper invocation stack\n\n let waitUntilTimedOut = new Error(timeoutMessage);\n return new _utils._Promise(function (resolve, reject) {\n let time = 0; // eslint-disable-next-line require-jsdoc\n\n function scheduleCheck(timeoutsIndex) {\n let interval = TIMEOUTS[timeoutsIndex];\n\n if (interval === undefined) {\n interval = MAX_TIMEOUT;\n }\n\n (0, _utils.futureTick)(function () {\n time += interval;\n let value;\n\n try {\n value = callback();\n } catch (error) {\n reject(error);\n return;\n }\n\n if (value) {\n resolve(value);\n } else if (time < timeout) {\n scheduleCheck(timeoutsIndex + 1);\n } else {\n reject(waitUntilTimedOut);\n return;\n }\n }, interval);\n }\n\n scheduleCheck(0);\n });\n }\n});","define('ember-cli-test-loader/test-support/index', ['exports'], function (exports) {\n /* globals requirejs, require */\n \"use strict\";\n\n Object.defineProperty(exports, \"__esModule\", {\n value: true\n });\n exports.addModuleIncludeMatcher = addModuleIncludeMatcher;\n exports.addModuleExcludeMatcher = addModuleExcludeMatcher;\n let moduleIncludeMatchers = [];\n let moduleExcludeMatchers = [];\n\n function addModuleIncludeMatcher(fn) {\n moduleIncludeMatchers.push(fn);\n }\n\n function addModuleExcludeMatcher(fn) {\n moduleExcludeMatchers.push(fn);\n }\n\n function checkMatchers(matchers, moduleName) {\n return matchers.some(matcher => matcher(moduleName));\n }\n\n class TestLoader {\n static load() {\n new TestLoader().loadModules();\n }\n\n constructor() {\n this._didLogMissingUnsee = false;\n }\n\n shouldLoadModule(moduleName) {\n return moduleName.match(/[-_]test$/);\n }\n\n listModules() {\n return Object.keys(requirejs.entries);\n }\n\n listTestModules() {\n let moduleNames = this.listModules();\n let testModules = [];\n let moduleName;\n\n for (let i = 0; i < moduleNames.length; i++) {\n moduleName = moduleNames[i];\n\n if (checkMatchers(moduleExcludeMatchers, moduleName)) {\n continue;\n }\n\n if (checkMatchers(moduleIncludeMatchers, moduleName) || this.shouldLoadModule(moduleName)) {\n testModules.push(moduleName);\n }\n }\n\n return testModules;\n }\n\n loadModules() {\n let testModules = this.listTestModules();\n let testModule;\n\n for (let i = 0; i < testModules.length; i++) {\n testModule = testModules[i];\n this.require(testModule);\n this.unsee(testModule);\n }\n }\n\n require(moduleName) {\n try {\n require(moduleName);\n } catch (e) {\n this.moduleLoadFailure(moduleName, e);\n }\n }\n\n unsee(moduleName) {\n if (typeof require.unsee === 'function') {\n require.unsee(moduleName);\n } else if (!this._didLogMissingUnsee) {\n this._didLogMissingUnsee = true;\n if (typeof console !== 'undefined') {\n console.warn('unable to require.unsee, please upgrade loader.js to >= v3.3.0');\n }\n }\n }\n\n moduleLoadFailure(moduleName, error) {\n console.error('Error loading: ' + moduleName, error.stack);\n }\n }exports.default = TestLoader;\n ;\n});","define(\"ember-qunit/adapter\", [\"exports\", \"qunit\", \"@ember/test-helpers/has-ember-version\"], function (_exports, _qunit, _hasEmberVersion) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.nonTestDoneCallback = nonTestDoneCallback;\n _exports.default = void 0;\n\n function unhandledRejectionAssertion(current, error) {\n let message, source;\n\n if (typeof error === 'object' && error !== null) {\n message = error.message;\n source = error.stack;\n } else if (typeof error === 'string') {\n message = error;\n source = 'unknown source';\n } else {\n message = 'unhandledRejection occured, but it had no message';\n source = 'unknown source';\n }\n\n current.assert.pushResult({\n result: false,\n actual: false,\n expected: true,\n message: message,\n source: source\n });\n }\n\n function nonTestDoneCallback() {}\n\n let Adapter = Ember.Test.Adapter.extend({\n init() {\n this.doneCallbacks = [];\n this.qunit = this.qunit || _qunit.default;\n },\n\n asyncStart() {\n let currentTest = this.qunit.config.current;\n let done = currentTest && currentTest.assert ? currentTest.assert.async() : nonTestDoneCallback;\n this.doneCallbacks.push({\n test: currentTest,\n done\n });\n },\n\n asyncEnd() {\n let currentTest = this.qunit.config.current;\n\n if (this.doneCallbacks.length === 0) {\n throw new Error('Adapter asyncEnd called when no async was expected. Please create an issue in ember-qunit.');\n }\n\n let {\n test,\n done\n } = this.doneCallbacks.pop(); // In future, we should explore fixing this at a different level, specifically\n // addressing the pairing of asyncStart/asyncEnd behavior in a more consistent way.\n\n if (test === currentTest) {\n done();\n }\n },\n\n // clobber default implementation of `exception` will be added back for Ember\n // < 2.17 just below...\n exception: null\n }); // Ember 2.17 and higher do not require the test adapter to have an `exception`\n // method When `exception` is not present, the unhandled rejection is\n // automatically re-thrown and will therefore hit QUnit's own global error\n // handler (therefore appropriately causing test failure)\n\n if (!(0, _hasEmberVersion.default)(2, 17)) {\n Adapter = Adapter.extend({\n exception(error) {\n unhandledRejectionAssertion(_qunit.default.config.current, error);\n }\n\n });\n }\n\n var _default = Adapter;\n _exports.default = _default;\n});","define(\"ember-qunit/index\", [\"exports\", \"ember-qunit/legacy-2-x/module-for\", \"ember-qunit/legacy-2-x/module-for-component\", \"ember-qunit/legacy-2-x/module-for-model\", \"ember-qunit/adapter\", \"qunit\", \"ember-qunit/test-loader\", \"@ember/test-helpers\", \"ember-qunit/test-isolation-validation\"], function (_exports, _moduleFor, _moduleForComponent, _moduleForModel, _adapter, _qunit, _testLoader, _testHelpers, _testIsolationValidation) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.setupTest = setupTest;\n _exports.setupRenderingTest = setupRenderingTest;\n _exports.setupApplicationTest = setupApplicationTest;\n _exports.setupTestContainer = setupTestContainer;\n _exports.startTests = startTests;\n _exports.setupTestAdapter = setupTestAdapter;\n _exports.setupEmberTesting = setupEmberTesting;\n _exports.setupEmberOnerrorValidation = setupEmberOnerrorValidation;\n _exports.setupResetOnerror = setupResetOnerror;\n _exports.setupTestIsolationValidation = setupTestIsolationValidation;\n _exports.start = start;\n Object.defineProperty(_exports, \"moduleFor\", {\n enumerable: true,\n get: function () {\n return _moduleFor.default;\n }\n });\n Object.defineProperty(_exports, \"moduleForComponent\", {\n enumerable: true,\n get: function () {\n return _moduleForComponent.default;\n }\n });\n Object.defineProperty(_exports, \"moduleForModel\", {\n enumerable: true,\n get: function () {\n return _moduleForModel.default;\n }\n });\n Object.defineProperty(_exports, \"QUnitAdapter\", {\n enumerable: true,\n get: function () {\n return _adapter.default;\n }\n });\n Object.defineProperty(_exports, \"nonTestDoneCallback\", {\n enumerable: true,\n get: function () {\n return _adapter.nonTestDoneCallback;\n }\n });\n Object.defineProperty(_exports, \"module\", {\n enumerable: true,\n get: function () {\n return _qunit.module;\n }\n });\n Object.defineProperty(_exports, \"test\", {\n enumerable: true,\n get: function () {\n return _qunit.test;\n }\n });\n Object.defineProperty(_exports, \"skip\", {\n enumerable: true,\n get: function () {\n return _qunit.skip;\n }\n });\n Object.defineProperty(_exports, \"only\", {\n enumerable: true,\n get: function () {\n return _qunit.only;\n }\n });\n Object.defineProperty(_exports, \"todo\", {\n enumerable: true,\n get: function () {\n return _qunit.todo;\n }\n });\n Object.defineProperty(_exports, \"loadTests\", {\n enumerable: true,\n get: function () {\n return _testLoader.loadTests;\n }\n });\n let waitForSettled = true;\n\n function setupTest(hooks, _options) {\n let options = _options === undefined ? {\n waitForSettled\n } : Ember.assign({\n waitForSettled\n }, _options);\n hooks.beforeEach(function (assert) {\n let testMetadata = (0, _testHelpers.getTestMetadata)(this);\n testMetadata.framework = 'qunit';\n return (0, _testHelpers.setupContext)(this, options).then(() => {\n let originalPauseTest = this.pauseTest;\n\n this.pauseTest = function QUnit_pauseTest() {\n assert.timeout(-1); // prevent the test from timing out\n // This is a temporary work around for\n // https://github.com/emberjs/ember-qunit/issues/496 this clears the\n // timeout that would fail the test when it hits the global testTimeout\n // value.\n\n clearTimeout(_qunit.default.config.timeout);\n return originalPauseTest.call(this);\n };\n });\n });\n hooks.afterEach(function () {\n return (0, _testHelpers.teardownContext)(this, options);\n });\n }\n\n function setupRenderingTest(hooks, _options) {\n let options = _options === undefined ? {\n waitForSettled\n } : Ember.assign({\n waitForSettled\n }, _options);\n setupTest(hooks, options);\n hooks.beforeEach(function () {\n return (0, _testHelpers.setupRenderingContext)(this);\n });\n hooks.afterEach(function () {\n return (0, _testHelpers.teardownRenderingContext)(this, options);\n });\n }\n\n function setupApplicationTest(hooks, _options) {\n let options = _options === undefined ? {\n waitForSettled\n } : Ember.assign({\n waitForSettled\n }, _options);\n setupTest(hooks, options);\n hooks.beforeEach(function () {\n return (0, _testHelpers.setupApplicationContext)(this);\n });\n hooks.afterEach(function () {\n return (0, _testHelpers.teardownApplicationContext)(this, options);\n });\n }\n /**\n Uses current URL configuration to setup the test container.\n \n * If `?nocontainer` is set, the test container will be hidden.\n * If `?dockcontainer` or `?devmode` are set the test container will be\n absolutely positioned.\n * If `?devmode` is set, the test container will be made full screen.\n \n @method setupTestContainer\n */\n\n\n function setupTestContainer() {\n let testContainer = document.getElementById('ember-testing-container');\n\n if (!testContainer) {\n return;\n }\n\n let params = _qunit.default.urlParams;\n let containerVisibility = params.nocontainer ? 'hidden' : 'visible';\n let containerPosition = params.dockcontainer || params.devmode ? 'fixed' : 'relative';\n\n if (params.devmode) {\n testContainer.className = ' full-screen';\n }\n\n testContainer.style.visibility = containerVisibility;\n testContainer.style.position = containerPosition;\n let qunitContainer = document.getElementById('qunit');\n\n if (params.dockcontainer) {\n qunitContainer.style.marginBottom = window.getComputedStyle(testContainer).height;\n }\n }\n /**\n Instruct QUnit to start the tests.\n @method startTests\n */\n\n\n function startTests() {\n _qunit.default.start();\n }\n /**\n Sets up the `Ember.Test` adapter for usage with QUnit 2.x.\n \n @method setupTestAdapter\n */\n\n\n function setupTestAdapter() {\n Ember.Test.adapter = _adapter.default.create();\n }\n /**\n Ensures that `Ember.testing` is set to `true` before each test begins\n (including `before` / `beforeEach`), and reset to `false` after each test is\n completed. This is done via `QUnit.testStart` and `QUnit.testDone`.\n \n */\n\n\n function setupEmberTesting() {\n _qunit.default.testStart(() => {\n Ember.testing = true;\n });\n\n _qunit.default.testDone(() => {\n Ember.testing = false;\n });\n }\n /**\n Ensures that `Ember.onerror` (if present) is properly configured to re-throw\n errors that occur while `Ember.testing` is `true`.\n */\n\n\n function setupEmberOnerrorValidation() {\n _qunit.default.module('ember-qunit: Ember.onerror validation', function () {\n _qunit.default.test('Ember.onerror is functioning properly', function (assert) {\n assert.expect(1);\n let result = (0, _testHelpers.validateErrorHandler)();\n assert.ok(result.isValid, `Ember.onerror handler with invalid testing behavior detected. An Ember.onerror handler _must_ rethrow exceptions when \\`Ember.testing\\` is \\`true\\` or the test suite is unreliable. See https://git.io/vbine for more details.`);\n });\n });\n }\n\n function setupResetOnerror() {\n _qunit.default.testDone(_testHelpers.resetOnerror);\n }\n\n function setupTestIsolationValidation(delay) {\n waitForSettled = false;\n Ember.run.backburner.DEBUG = true;\n\n _qunit.default.on('testStart', () => (0, _testIsolationValidation.installTestNotIsolatedHook)(delay));\n }\n /**\n @method start\n @param {Object} [options] Options to be used for enabling/disabling behaviors\n @param {Boolean} [options.loadTests] If `false` tests will not be loaded automatically.\n @param {Boolean} [options.setupTestContainer] If `false` the test container will not\n be setup based on `devmode`, `dockcontainer`, or `nocontainer` URL params.\n @param {Boolean} [options.startTests] If `false` tests will not be automatically started\n (you must run `QUnit.start()` to kick them off).\n @param {Boolean} [options.setupTestAdapter] If `false` the default Ember.Test adapter will\n not be updated.\n @param {Boolean} [options.setupEmberTesting] `false` opts out of the\n default behavior of setting `Ember.testing` to `true` before all tests and\n back to `false` after each test will.\n @param {Boolean} [options.setupEmberOnerrorValidation] If `false` validation\n of `Ember.onerror` will be disabled.\n @param {Boolean} [options.setupTestIsolationValidation] If `false` test isolation validation\n will be disabled.\n @param {Number} [options.testIsolationValidationDelay] When using\n setupTestIsolationValidation this number represents the maximum amount of\n time in milliseconds that is allowed _after_ the test is completed for all\n async to have been completed. The default value is 50.\n */\n\n\n function start(options = {}) {\n if (options.loadTests !== false) {\n (0, _testLoader.loadTests)();\n }\n\n if (options.setupTestContainer !== false) {\n setupTestContainer();\n }\n\n if (options.setupTestAdapter !== false) {\n setupTestAdapter();\n }\n\n if (options.setupEmberTesting !== false) {\n setupEmberTesting();\n }\n\n if (options.setupEmberOnerrorValidation !== false) {\n setupEmberOnerrorValidation();\n }\n\n if (typeof options.setupTestIsolationValidation !== 'undefined' && options.setupTestIsolationValidation !== false) {\n setupTestIsolationValidation(options.testIsolationValidationDelay);\n }\n\n if (options.startTests !== false) {\n startTests();\n }\n\n setupResetOnerror();\n }\n});","define(\"ember-qunit/legacy-2-x/module-for-component\", [\"exports\", \"ember-qunit/legacy-2-x/qunit-module\", \"ember-test-helpers\"], function (_exports, _qunitModule, _emberTestHelpers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = moduleForComponent;\n\n function moduleForComponent(name, description, callbacks) {\n (0, _qunitModule.createModule)(_emberTestHelpers.TestModuleForComponent, name, description, callbacks);\n (true && !(false) && Ember.deprecate(`The usage \"moduleForComponent\" is deprecated. Please migrate the \"${name}\" module to use \"setupRenderingTest\".`, false, {\n id: 'ember-qunit.deprecate-legacy-apis',\n until: '5.0.0',\n url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md'\n }));\n }\n});","define(\"ember-qunit/legacy-2-x/module-for-model\", [\"exports\", \"ember-qunit/legacy-2-x/qunit-module\", \"ember-test-helpers\"], function (_exports, _qunitModule, _emberTestHelpers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = moduleForModel;\n\n function moduleForModel(name, description, callbacks) {\n (true && !(false) && Ember.deprecate(`The usage \"moduleForModel\" is deprecated. Please migrate the \"${name}\" module to the new test APIs.`, false, {\n id: 'ember-qunit.deprecate-legacy-apis',\n until: '5.0.0',\n url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md'\n }));\n (0, _qunitModule.createModule)(_emberTestHelpers.TestModuleForModel, name, description, callbacks);\n }\n});","define(\"ember-qunit/legacy-2-x/module-for\", [\"exports\", \"ember-qunit/legacy-2-x/qunit-module\", \"ember-test-helpers\"], function (_exports, _qunitModule, _emberTestHelpers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = moduleFor;\n\n function moduleFor(name, description, callbacks) {\n (true && !(false) && Ember.deprecate(`The usage \"moduleFor\" is deprecated. Please migrate the \"${name}\" module to use \"module\"`, false, {\n id: 'ember-qunit.deprecate-legacy-apis',\n until: '5.0.0',\n url: 'https://github.com/emberjs/ember-qunit/blob/master/docs/migration.md'\n }));\n (0, _qunitModule.createModule)(_emberTestHelpers.TestModule, name, description, callbacks);\n }\n});","define(\"ember-qunit/legacy-2-x/qunit-module\", [\"exports\", \"qunit\"], function (_exports, _qunit) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.createModule = createModule;\n\n function noop() {}\n\n function callbackFor(name, callbacks) {\n if (typeof callbacks !== 'object') {\n return noop;\n }\n\n if (!callbacks) {\n return noop;\n }\n\n var callback = noop;\n\n if (callbacks[name]) {\n callback = callbacks[name];\n delete callbacks[name];\n }\n\n return callback;\n }\n\n function createModule(Constructor, name, description, callbacks) {\n if (!callbacks && typeof description === 'object') {\n callbacks = description;\n description = name;\n }\n\n var before = callbackFor('before', callbacks);\n var beforeEach = callbackFor('beforeEach', callbacks);\n var afterEach = callbackFor('afterEach', callbacks);\n var after = callbackFor('after', callbacks);\n var module;\n var moduleName = typeof description === 'string' ? description : name;\n (0, _qunit.module)(moduleName, {\n before() {\n // storing this in closure scope to avoid exposing these\n // private internals to the test context\n module = new Constructor(name, description, callbacks);\n return before.apply(this, arguments);\n },\n\n beforeEach() {\n // provide the test context to the underlying module\n module.setContext(this);\n return module.setup(...arguments).then(() => {\n return beforeEach.apply(this, arguments);\n });\n },\n\n afterEach() {\n let result = afterEach.apply(this, arguments);\n return Ember.RSVP.resolve(result).then(() => module.teardown(...arguments));\n },\n\n after() {\n try {\n return after.apply(this, arguments);\n } finally {\n after = afterEach = before = beforeEach = callbacks = module = null;\n }\n }\n\n });\n }\n});","define(\"ember-qunit/test-isolation-validation\", [\"exports\", \"qunit\", \"@ember/test-helpers\"], function (_exports, _qunit, _testHelpers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.detectIfTestNotIsolated = detectIfTestNotIsolated;\n _exports.installTestNotIsolatedHook = installTestNotIsolatedHook;\n\n /* eslint-disable no-console */\n\n /**\n * Detects if a specific test isn't isolated. A test is considered\n * not isolated if it:\n *\n * - has pending timers\n * - is in a runloop\n * - has pending AJAX requests\n * - has pending test waiters\n *\n * @function detectIfTestNotIsolated\n * @param {Object} testInfo\n * @param {string} testInfo.module The name of the test module\n * @param {string} testInfo.name The test name\n */\n function detectIfTestNotIsolated(test, message = '') {\n if (!(0, _testHelpers.isSettled)()) {\n let {\n debugInfo\n } = (0, _testHelpers.getSettledState)();\n console.group(`${test.module.name}: ${test.testName}`);\n debugInfo.toConsole();\n console.groupEnd();\n test.expected++;\n test.assert.pushResult({\n result: false,\n message: `${message} \\nMore information has been printed to the console. Please use that information to help in debugging.\\n\\n`\n });\n }\n }\n /**\n * Installs a hook to detect if a specific test isn't isolated.\n * This hook is installed by patching into the `test.finish` method,\n * which allows us to be very precise as to when the detection occurs.\n *\n * @function installTestNotIsolatedHook\n * @param {number} delay the delay delay to use when checking for isolation validation\n */\n\n\n function installTestNotIsolatedHook(delay = 50) {\n if (!(0, _testHelpers.getDebugInfo)()) {\n return;\n }\n\n let test = _qunit.default.config.current;\n let finish = test.finish;\n let pushFailure = test.pushFailure;\n\n test.pushFailure = function (message) {\n if (message.indexOf('Test took longer than') === 0) {\n detectIfTestNotIsolated(this, message);\n } else {\n return pushFailure.apply(this, arguments);\n }\n }; // We're hooking into `test.finish`, which utilizes internal ordering of\n // when a test's hooks are invoked. We do this mainly becuase we need\n // greater precision as to when to detect and subsequently report if the\n // test is isolated.\n //\n // We looked at using:\n // - `afterEach`\n // - the ordering of when the `afterEach` is called is not easy to guarantee\n // (ancestor `afterEach`es have to be accounted for too)\n // - `QUnit.on('testEnd')`\n // - is executed too late; the test is already considered done so\n // we're unable to push a new assert to fail the current test\n // - 'QUnit.done'\n // - it detatches the failure from the actual test that failed, making it\n // more confusing to the end user.\n\n\n test.finish = function () {\n let doFinish = () => finish.apply(this, arguments);\n\n if ((0, _testHelpers.isSettled)()) {\n return doFinish();\n } else {\n return (0, _testHelpers.waitUntil)(_testHelpers.isSettled, {\n timeout: delay\n }).catch(() => {// we consider that when waitUntil times out, you're in a state of\n // test isolation violation. The nature of the error is irrelevant\n // in this case, and we want to allow the error to fall through\n // to the finally, where cleanup occurs.\n }).finally(() => {\n detectIfTestNotIsolated(this, 'Test is not isolated (async execution is extending beyond the duration of the test).'); // canceling timers here isn't perfect, but is as good as we can do\n // to attempt to prevent future tests from failing due to this test's\n // leakage\n\n Ember.run.cancelTimers();\n return doFinish();\n });\n }\n };\n }\n});","define(\"ember-qunit/test-loader\", [\"exports\", \"qunit\", \"ember-cli-test-loader/test-support/index\"], function (_exports, _qunit, _index) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.loadTests = loadTests;\n _exports.TestLoader = void 0;\n (0, _index.addModuleExcludeMatcher)(function (moduleName) {\n return _qunit.default.urlParams.nolint && moduleName.match(/\\.(jshint|lint-test)$/);\n });\n (0, _index.addModuleIncludeMatcher)(function (moduleName) {\n return moduleName.match(/\\.jshint$/);\n });\n let moduleLoadFailures = [];\n\n _qunit.default.done(function () {\n let length = moduleLoadFailures.length;\n\n try {\n if (length === 0) {// do nothing\n } else if (length === 1) {\n throw moduleLoadFailures[0];\n } else {\n throw new Error('\\n' + moduleLoadFailures.join('\\n'));\n }\n } finally {\n // ensure we release previously captured errors.\n moduleLoadFailures = [];\n }\n });\n\n class TestLoader extends _index.default {\n moduleLoadFailure(moduleName, error) {\n moduleLoadFailures.push(error);\n\n _qunit.default.module('TestLoader Failures');\n\n _qunit.default.test(moduleName + ': could not be loaded', function () {\n throw error;\n });\n }\n\n }\n /**\n Load tests following the default patterns:\n \n * The module name ends with `-test`\n * The module name ends with `.jshint`\n \n Excludes tests that match the following\n patterns when `?nolint` URL param is set:\n \n * The module name ends with `.jshint`\n * The module name ends with `-lint-test`\n \n @method loadTests\n */\n\n\n _exports.TestLoader = TestLoader;\n\n function loadTests() {\n new TestLoader().loadModules();\n }\n});","define(\"ember-test-helpers/has-ember-version\", [\"exports\", \"@ember/test-helpers/has-ember-version\"], function (_exports, _hasEmberVersion) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _hasEmberVersion.default;\n }\n });\n});","define(\"ember-test-helpers/index\", [\"exports\", \"@ember/test-helpers\", \"ember-test-helpers/legacy-0-6-x/test-module\", \"ember-test-helpers/legacy-0-6-x/test-module-for-acceptance\", \"ember-test-helpers/legacy-0-6-x/test-module-for-component\", \"ember-test-helpers/legacy-0-6-x/test-module-for-model\"], function (_exports, _testHelpers, _testModule, _testModuleForAcceptance, _testModuleForComponent, _testModuleForModel) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n var _exportNames = {\n TestModule: true,\n TestModuleForAcceptance: true,\n TestModuleForComponent: true,\n TestModuleForModel: true\n };\n Object.defineProperty(_exports, \"TestModule\", {\n enumerable: true,\n get: function () {\n return _testModule.default;\n }\n });\n Object.defineProperty(_exports, \"TestModuleForAcceptance\", {\n enumerable: true,\n get: function () {\n return _testModuleForAcceptance.default;\n }\n });\n Object.defineProperty(_exports, \"TestModuleForComponent\", {\n enumerable: true,\n get: function () {\n return _testModuleForComponent.default;\n }\n });\n Object.defineProperty(_exports, \"TestModuleForModel\", {\n enumerable: true,\n get: function () {\n return _testModuleForModel.default;\n }\n });\n Object.keys(_testHelpers).forEach(function (key) {\n if (key === \"default\" || key === \"__esModule\") return;\n if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;\n if (key in _exports && _exports[key] === _testHelpers[key]) return;\n Object.defineProperty(_exports, key, {\n enumerable: true,\n get: function () {\n return _testHelpers[key];\n }\n });\n });\n});","define(\"ember-test-helpers/legacy-0-6-x/-legacy-overrides\", [\"exports\", \"ember-test-helpers/has-ember-version\"], function (_exports, _hasEmberVersion) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.preGlimmerSetupIntegrationForComponent = preGlimmerSetupIntegrationForComponent;\n\n function preGlimmerSetupIntegrationForComponent() {\n var module = this;\n var context = this.context;\n this.actionHooks = {};\n context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n context.actions = module.actionHooks;\n (this.registry || this.container).register('component:-test-holder', Ember.Component.extend());\n\n context.render = function (template) {\n // in case `this.render` is called twice, make sure to teardown the first invocation\n module.teardownComponent();\n\n if (!template) {\n throw new Error('in a component integration test you must pass a template to `render()`');\n }\n\n if (Ember.isArray(template)) {\n template = template.join('');\n }\n\n if (typeof template === 'string') {\n template = Ember.Handlebars.compile(template);\n }\n\n module.component = module.container.lookupFactory('component:-test-holder').create({\n layout: template\n });\n module.component.set('context', context);\n module.component.set('controller', context);\n Ember.run(function () {\n module.component.appendTo('#ember-testing');\n });\n context._element = module.component.element;\n };\n\n context.$ = function () {\n return module.component.$.apply(module.component, arguments);\n };\n\n context.set = function (key, value) {\n var ret = Ember.run(function () {\n return Ember.set(context, key, value);\n });\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n return ret;\n }\n };\n\n context.setProperties = function (hash) {\n var ret = Ember.run(function () {\n return Ember.setProperties(context, hash);\n });\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n return ret;\n }\n };\n\n context.get = function (key) {\n return Ember.get(context, key);\n };\n\n context.getProperties = function () {\n var args = Array.prototype.slice.call(arguments);\n return Ember.getProperties(context, args);\n };\n\n context.on = function (actionName, handler) {\n module.actionHooks[actionName] = handler;\n };\n\n context.send = function (actionName) {\n var hook = module.actionHooks[actionName];\n\n if (!hook) {\n throw new Error('integration testing template received unexpected action ' + actionName);\n }\n\n hook.apply(module, Array.prototype.slice.call(arguments, 1));\n };\n\n context.clearRender = function () {\n module.teardownComponent();\n };\n }\n});","define(\"ember-test-helpers/legacy-0-6-x/abstract-test-module\", [\"exports\", \"ember-test-helpers/legacy-0-6-x/ext/rsvp\", \"@ember/test-helpers/settled\", \"@ember/test-helpers\"], function (_exports, _rsvp, _settled, _testHelpers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n class _default {\n constructor(name, options) {\n this.context = undefined;\n this.name = name;\n this.callbacks = options || {};\n this.initSetupSteps();\n this.initTeardownSteps();\n }\n\n setup(assert) {\n Ember.testing = true;\n Ember.run.backburner.DEBUG = true;\n return this.invokeSteps(this.setupSteps, this, assert).then(() => {\n this.contextualizeCallbacks();\n return this.invokeSteps(this.contextualizedSetupSteps, this.context, assert);\n });\n }\n\n teardown(assert) {\n return this.invokeSteps(this.contextualizedTeardownSteps, this.context, assert).then(() => {\n return this.invokeSteps(this.teardownSteps, this, assert);\n }).then(() => {\n this.cache = null;\n this.cachedCalls = null;\n }).finally(function () {\n Ember.testing = false;\n });\n }\n\n initSetupSteps() {\n this.setupSteps = [];\n this.contextualizedSetupSteps = [];\n\n if (this.callbacks.beforeSetup) {\n this.setupSteps.push(this.callbacks.beforeSetup);\n delete this.callbacks.beforeSetup;\n }\n\n this.setupSteps.push(this.setupContext);\n this.setupSteps.push(this.setupTestElements);\n this.setupSteps.push(this.setupAJAXListeners);\n this.setupSteps.push(this.setupPromiseListeners);\n\n if (this.callbacks.setup) {\n this.contextualizedSetupSteps.push(this.callbacks.setup);\n delete this.callbacks.setup;\n }\n }\n\n invokeSteps(steps, context, assert) {\n steps = steps.slice();\n\n function nextStep() {\n var step = steps.shift();\n\n if (step) {\n // guard against exceptions, for example missing components referenced from needs.\n return new Ember.RSVP.Promise(resolve => {\n resolve(step.call(context, assert));\n }).then(nextStep);\n } else {\n return Ember.RSVP.resolve();\n }\n }\n\n return nextStep();\n }\n\n contextualizeCallbacks() {}\n\n initTeardownSteps() {\n this.teardownSteps = [];\n this.contextualizedTeardownSteps = [];\n\n if (this.callbacks.teardown) {\n this.contextualizedTeardownSteps.push(this.callbacks.teardown);\n delete this.callbacks.teardown;\n }\n\n this.teardownSteps.push(this.teardownContext);\n this.teardownSteps.push(this.teardownTestElements);\n this.teardownSteps.push(this.teardownAJAXListeners);\n this.teardownSteps.push(this.teardownPromiseListeners);\n\n if (this.callbacks.afterTeardown) {\n this.teardownSteps.push(this.callbacks.afterTeardown);\n delete this.callbacks.afterTeardown;\n }\n }\n\n setupTestElements() {\n let testElementContainer = document.querySelector('#ember-testing-container');\n\n if (!testElementContainer) {\n testElementContainer = document.createElement('div');\n testElementContainer.setAttribute('id', 'ember-testing-container');\n document.body.appendChild(testElementContainer);\n }\n\n let testEl = document.querySelector('#ember-testing');\n\n if (!testEl) {\n let element = document.createElement('div');\n element.setAttribute('id', 'ember-testing');\n testElementContainer.appendChild(element);\n this.fixtureResetValue = '';\n } else {\n this.fixtureResetValue = testElementContainer.innerHTML;\n }\n }\n\n setupContext(options) {\n let context = this.getContext();\n Ember.assign(context, {\n dispatcher: null,\n inject: {}\n }, options);\n this.setToString();\n (0, _testHelpers.setContext)(context);\n this.context = context;\n }\n\n setContext(context) {\n this.context = context;\n }\n\n getContext() {\n if (this.context) {\n return this.context;\n }\n\n return this.context = (0, _testHelpers.getContext)() || {};\n }\n\n setToString() {\n this.context.toString = () => {\n if (this.subjectName) {\n return `test context for: ${this.subjectName}`;\n }\n\n if (this.name) {\n return `test context for: ${this.name}`;\n }\n };\n }\n\n setupAJAXListeners() {\n (0, _settled._setupAJAXHooks)();\n }\n\n teardownAJAXListeners() {\n (0, _settled._teardownAJAXHooks)();\n }\n\n setupPromiseListeners() {\n (0, _rsvp._setupPromiseListeners)();\n }\n\n teardownPromiseListeners() {\n (0, _rsvp._teardownPromiseListeners)();\n }\n\n teardownTestElements() {\n document.getElementById('ember-testing-container').innerHTML = this.fixtureResetValue; // Ember 2.0.0 removed Ember.View as public API, so only do this when\n // Ember.View is present\n\n if (Ember.View && Ember.View.views) {\n Ember.View.views = {};\n }\n }\n\n teardownContext() {\n var context = this.context;\n this.context = undefined;\n (0, _testHelpers.unsetContext)();\n\n if (context && context.dispatcher && !context.dispatcher.isDestroyed) {\n Ember.run(function () {\n context.dispatcher.destroy();\n });\n }\n }\n\n }\n\n _exports.default = _default;\n});","define(\"ember-test-helpers/legacy-0-6-x/build-registry\", [\"exports\", \"require\"], function (_exports, _require) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = _default;\n\n function exposeRegistryMethodsWithoutDeprecations(container) {\n var methods = ['register', 'unregister', 'resolve', 'normalize', 'typeInjection', 'injection', 'factoryInjection', 'factoryTypeInjection', 'has', 'options', 'optionsForType'];\n\n function exposeRegistryMethod(container, method) {\n if (method in container) {\n container[method] = function () {\n return container._registry[method].apply(container._registry, arguments);\n };\n }\n }\n\n for (var i = 0, l = methods.length; i < l; i++) {\n exposeRegistryMethod(container, methods[i]);\n }\n }\n\n var Owner = function () {\n if (Ember._RegistryProxyMixin && Ember._ContainerProxyMixin) {\n return Ember.Object.extend(Ember._RegistryProxyMixin, Ember._ContainerProxyMixin, {\n _emberTestHelpersMockOwner: true\n });\n }\n\n return Ember.Object.extend({\n _emberTestHelpersMockOwner: true\n });\n }();\n\n function _default(resolver) {\n var fallbackRegistry, registry, container;\n var namespace = Ember.Object.create({\n Resolver: {\n create() {\n return resolver;\n }\n\n }\n });\n\n function register(name, factory) {\n var thingToRegisterWith = registry || container;\n\n if (!(container.factoryFor ? container.factoryFor(name) : container.lookupFactory(name))) {\n thingToRegisterWith.register(name, factory);\n }\n }\n\n if (Ember.Application.buildRegistry) {\n fallbackRegistry = Ember.Application.buildRegistry(namespace);\n fallbackRegistry.register('component-lookup:main', Ember.ComponentLookup);\n registry = new Ember.Registry({\n fallback: fallbackRegistry\n });\n\n if (Ember.ApplicationInstance && Ember.ApplicationInstance.setupRegistry) {\n Ember.ApplicationInstance.setupRegistry(registry);\n } // these properties are set on the fallback registry by `buildRegistry`\n // and on the primary registry within the ApplicationInstance constructor\n // but we need to manually recreate them since ApplicationInstance's are not\n // exposed externally\n\n\n registry.normalizeFullName = fallbackRegistry.normalizeFullName;\n registry.makeToString = fallbackRegistry.makeToString;\n registry.describe = fallbackRegistry.describe;\n var owner = Owner.create({\n __registry__: registry,\n __container__: null\n });\n container = registry.container({\n owner: owner\n });\n owner.__container__ = container;\n exposeRegistryMethodsWithoutDeprecations(container);\n } else {\n container = Ember.Application.buildContainer(namespace);\n container.register('component-lookup:main', Ember.ComponentLookup);\n } // Ember 1.10.0 did not properly add `view:toplevel` or `view:default`\n // to the registry in Ember.Application.buildRegistry :(\n //\n // Ember 2.0.0 removed Ember.View as public API, so only do this when\n // Ember.View is present\n\n\n if (Ember.View) {\n register('view:toplevel', Ember.View.extend());\n } // Ember 2.0.0 removed Ember._MetamorphView from the Ember global, so only\n // do this when present\n\n\n if (Ember._MetamorphView) {\n register('view:default', Ember._MetamorphView);\n }\n\n var globalContext = typeof global === 'object' && global || self;\n\n if (requirejs.entries['ember-data/setup-container']) {\n // ember-data is a proper ember-cli addon since 2.3; if no 'import\n // 'ember-data'' is present somewhere in the tests, there is also no `DS`\n // available on the globalContext and hence ember-data wouldn't be setup\n // correctly for the tests; that's why we import and call setupContainer\n // here; also see https://github.com/emberjs/data/issues/4071 for context\n var setupContainer = (0, _require.default)(\"ember-data/setup-container\")['default'];\n setupContainer(registry || container);\n } else if (globalContext.DS) {\n var DS = globalContext.DS;\n\n if (DS._setupContainer) {\n DS._setupContainer(registry || container);\n } else {\n register('transform:boolean', DS.BooleanTransform);\n register('transform:date', DS.DateTransform);\n register('transform:number', DS.NumberTransform);\n register('transform:string', DS.StringTransform);\n register('serializer:-default', DS.JSONSerializer);\n register('serializer:-rest', DS.RESTSerializer);\n register('adapter:-rest', DS.RESTAdapter);\n }\n }\n\n return {\n registry,\n container,\n owner\n };\n }\n});","define(\"ember-test-helpers/legacy-0-6-x/ext/rsvp\", [\"exports\", \"ember-test-helpers/has-ember-version\"], function (_exports, _hasEmberVersion) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports._setupPromiseListeners = _setupPromiseListeners;\n _exports._teardownPromiseListeners = _teardownPromiseListeners;\n let originalAsync;\n /**\n Configures `RSVP` to resolve promises on the run-loop's action queue. This is\n done by Ember internally since Ember 1.7 and it is only needed to\n provide a consistent testing experience for users of Ember < 1.7.\n \n @private\n */\n\n function _setupPromiseListeners() {\n if (!(0, _hasEmberVersion.default)(1, 7)) {\n originalAsync = Ember.RSVP.configure('async');\n Ember.RSVP.configure('async', function (callback, promise) {\n Ember.run.backburner.schedule('actions', () => {\n callback(promise);\n });\n });\n }\n }\n /**\n Resets `RSVP`'s `async` to its prior value.\n \n @private\n */\n\n\n function _teardownPromiseListeners() {\n if (!(0, _hasEmberVersion.default)(1, 7)) {\n Ember.RSVP.configure('async', originalAsync);\n }\n }\n});","define(\"ember-test-helpers/legacy-0-6-x/test-module-for-acceptance\", [\"exports\", \"ember-test-helpers/legacy-0-6-x/abstract-test-module\", \"@ember/test-helpers\"], function (_exports, _abstractTestModule, _testHelpers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n class _default extends _abstractTestModule.default {\n setupContext() {\n super.setupContext({\n application: this.createApplication()\n });\n }\n\n teardownContext() {\n Ember.run(() => {\n (0, _testHelpers.getContext)().application.destroy();\n });\n super.teardownContext();\n }\n\n createApplication() {\n let {\n Application,\n config\n } = this.callbacks;\n let application;\n Ember.run(() => {\n application = Application.create(config);\n application.setupForTesting();\n application.injectTestHelpers();\n });\n return application;\n }\n\n }\n\n _exports.default = _default;\n});","define(\"ember-test-helpers/legacy-0-6-x/test-module-for-component\", [\"exports\", \"ember-test-helpers/legacy-0-6-x/test-module\", \"ember-test-helpers/has-ember-version\", \"ember-test-helpers/legacy-0-6-x/-legacy-overrides\"], function (_exports, _testModule, _hasEmberVersion, _legacyOverrides) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.setupComponentIntegrationTest = setupComponentIntegrationTest;\n _exports.default = void 0;\n let ACTION_KEY;\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n ACTION_KEY = 'actions';\n } else {\n ACTION_KEY = '_actions';\n }\n\n const isPreGlimmer = !(0, _hasEmberVersion.default)(1, 13);\n\n class _default extends _testModule.default {\n constructor(componentName, description, callbacks) {\n // Allow `description` to be omitted\n if (!callbacks && typeof description === 'object') {\n callbacks = description;\n description = null;\n } else if (!callbacks) {\n callbacks = {};\n }\n\n let integrationOption = callbacks.integration;\n let hasNeeds = Array.isArray(callbacks.needs);\n super('component:' + componentName, description, callbacks);\n this.componentName = componentName;\n\n if (hasNeeds || callbacks.unit || integrationOption === false) {\n this.isUnitTest = true;\n } else if (integrationOption) {\n this.isUnitTest = false;\n } else {\n (true && !(false) && Ember.deprecate('the component:' + componentName + ' test module is implicitly running in unit test mode, ' + 'which will change to integration test mode by default in an upcoming version of ' + 'ember-test-helpers. Add `unit: true` or a `needs:[]` list to explicitly opt in to unit ' + 'test mode.', false, {\n id: 'ember-test-helpers.test-module-for-component.test-type',\n until: '0.6.0'\n }));\n this.isUnitTest = true;\n }\n\n if (!this.isUnitTest && !this.isLegacy) {\n callbacks.integration = true;\n }\n\n if (this.isUnitTest || this.isLegacy) {\n this.setupSteps.push(this.setupComponentUnitTest);\n } else {\n this.callbacks.subject = function () {\n throw new Error(\"component integration tests do not support `subject()`. Instead, render the component as if it were HTML: `this.render('');`. For more information, read: http://guides.emberjs.com/current/testing/testing-components/\");\n };\n\n this.setupSteps.push(this.setupComponentIntegrationTest);\n this.teardownSteps.unshift(this.teardownComponent);\n }\n\n if (Ember.View && Ember.View.views) {\n this.setupSteps.push(this._aliasViewRegistry);\n this.teardownSteps.unshift(this._resetViewRegistry);\n }\n }\n\n initIntegration(options) {\n this.isLegacy = options.integration === 'legacy';\n this.isIntegration = options.integration !== 'legacy';\n }\n\n _aliasViewRegistry() {\n this._originalGlobalViewRegistry = Ember.View.views;\n var viewRegistry = this.container.lookup('-view-registry:main');\n\n if (viewRegistry) {\n Ember.View.views = viewRegistry;\n }\n }\n\n _resetViewRegistry() {\n Ember.View.views = this._originalGlobalViewRegistry;\n }\n\n setupComponentUnitTest() {\n var _this = this;\n\n var resolver = this.resolver;\n var context = this.context;\n var layoutName = 'template:components/' + this.componentName;\n var layout = resolver.resolve(layoutName);\n var thingToRegisterWith = this.registry || this.container;\n\n if (layout) {\n thingToRegisterWith.register(layoutName, layout);\n thingToRegisterWith.injection(this.subjectName, 'layout', layoutName);\n }\n\n var eventDispatcher = resolver.resolve('event_dispatcher:main');\n\n if (eventDispatcher) {\n thingToRegisterWith.register('event_dispatcher:main', eventDispatcher);\n }\n\n context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n context._element = null;\n\n this.callbacks.render = function () {\n var subject;\n Ember.run(function () {\n subject = context.subject();\n subject.appendTo('#ember-testing');\n });\n context._element = subject.element;\n\n _this.teardownSteps.unshift(function () {\n Ember.run(function () {\n Ember.tryInvoke(subject, 'destroy');\n });\n });\n };\n\n this.callbacks.append = function () {\n (true && !(false) && Ember.deprecate('this.append() is deprecated. Please use this.render() or this.$() instead.', false, {\n id: 'ember-test-helpers.test-module-for-component.append',\n until: '0.6.0'\n }));\n return context.$();\n };\n\n context.$ = function () {\n this.render();\n var subject = this.subject();\n return subject.$.apply(subject, arguments);\n };\n }\n\n setupComponentIntegrationTest() {\n if (isPreGlimmer) {\n return _legacyOverrides.preGlimmerSetupIntegrationForComponent.apply(this, arguments);\n } else {\n return setupComponentIntegrationTest.apply(this, arguments);\n }\n }\n\n setupContext() {\n super.setupContext(); // only setup the injection if we are running against a version\n // of Ember that has `-view-registry:main` (Ember >= 1.12)\n\n if (this.container.factoryFor ? this.container.factoryFor('-view-registry:main') : this.container.lookupFactory('-view-registry:main')) {\n (this.registry || this.container).injection('component', '_viewRegistry', '-view-registry:main');\n }\n\n if (!this.isUnitTest && !this.isLegacy) {\n this.context.factory = function () {};\n }\n }\n\n teardownComponent() {\n var component = this.component;\n\n if (component) {\n Ember.run(component, 'destroy');\n this.component = null;\n }\n }\n\n }\n\n _exports.default = _default;\n\n function getOwnerFromModule(module) {\n return Ember.getOwner && Ember.getOwner(module.container) || module.container.owner;\n }\n\n function lookupTemplateFromModule(module, templateFullName) {\n var template = module.container.lookup(templateFullName);\n if (typeof template === 'function') template = template(getOwnerFromModule(module));\n return template;\n }\n\n function setupComponentIntegrationTest() {\n var module = this;\n var context = this.context;\n this.actionHooks = context[ACTION_KEY] = {};\n context.dispatcher = this.container.lookup('event_dispatcher:main') || Ember.EventDispatcher.create();\n context.dispatcher.setup({}, '#ember-testing');\n var hasRendered = false;\n var OutletView = module.container.factoryFor ? module.container.factoryFor('view:-outlet') : module.container.lookupFactory('view:-outlet');\n var OutletTemplate = lookupTemplateFromModule(module, 'template:-outlet');\n var toplevelView = module.component = OutletView.create();\n var hasOutletTemplate = !!OutletTemplate;\n var outletState = {\n render: {\n owner: getOwnerFromModule(module),\n into: undefined,\n outlet: 'main',\n name: 'application',\n controller: module.context,\n ViewClass: undefined,\n template: OutletTemplate\n },\n outlets: {}\n };\n var element = document.getElementById('ember-testing');\n var templateId = 0;\n\n if (hasOutletTemplate) {\n Ember.run(() => {\n toplevelView.setOutletState(outletState);\n });\n }\n\n context.render = function (template) {\n if (!template) {\n throw new Error('in a component integration test you must pass a template to `render()`');\n }\n\n if (Ember.isArray(template)) {\n template = template.join('');\n }\n\n if (typeof template === 'string') {\n template = Ember.Handlebars.compile(template);\n }\n\n var templateFullName = 'template:-undertest-' + ++templateId;\n this.registry.register(templateFullName, template);\n var stateToRender = {\n owner: getOwnerFromModule(module),\n into: undefined,\n outlet: 'main',\n name: 'index',\n controller: module.context,\n ViewClass: undefined,\n template: lookupTemplateFromModule(module, templateFullName),\n outlets: {}\n };\n\n if (hasOutletTemplate) {\n stateToRender.name = 'index';\n outletState.outlets.main = {\n render: stateToRender,\n outlets: {}\n };\n } else {\n stateToRender.name = 'application';\n outletState = {\n render: stateToRender,\n outlets: {}\n };\n }\n\n Ember.run(() => {\n toplevelView.setOutletState(outletState);\n });\n\n if (!hasRendered) {\n Ember.run(module.component, 'appendTo', '#ember-testing');\n hasRendered = true;\n }\n\n if (EmberENV._APPLICATION_TEMPLATE_WRAPPER !== false) {\n // ensure the element is based on the wrapping toplevel view\n // Ember still wraps the main application template with a\n // normal tagged view\n context._element = element = document.querySelector('#ember-testing > .ember-view');\n } else {\n context._element = element = document.querySelector('#ember-testing');\n }\n };\n\n context.$ = function (selector) {\n // emulates Ember internal behavor of `this.$` in a component\n // https://github.com/emberjs/ember.js/blob/v2.5.1/packages/ember-views/lib/views/states/has_element.js#L18\n return selector ? jQuery(selector, element) : jQuery(element);\n };\n\n context.set = function (key, value) {\n var ret = Ember.run(function () {\n return Ember.set(context, key, value);\n });\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n return ret;\n }\n };\n\n context.setProperties = function (hash) {\n var ret = Ember.run(function () {\n return Ember.setProperties(context, hash);\n });\n\n if ((0, _hasEmberVersion.default)(2, 0)) {\n return ret;\n }\n };\n\n context.get = function (key) {\n return Ember.get(context, key);\n };\n\n context.getProperties = function () {\n var args = Array.prototype.slice.call(arguments);\n return Ember.getProperties(context, args);\n };\n\n context.on = function (actionName, handler) {\n module.actionHooks[actionName] = handler;\n };\n\n context.send = function (actionName) {\n var hook = module.actionHooks[actionName];\n\n if (!hook) {\n throw new Error('integration testing template received unexpected action ' + actionName);\n }\n\n hook.apply(module.context, Array.prototype.slice.call(arguments, 1));\n };\n\n context.clearRender = function () {\n Ember.run(function () {\n toplevelView.setOutletState({\n render: {\n owner: module.container,\n into: undefined,\n outlet: 'main',\n name: 'application',\n controller: module.context,\n ViewClass: undefined,\n template: undefined\n },\n outlets: {}\n });\n });\n };\n }\n});","define(\"ember-test-helpers/legacy-0-6-x/test-module-for-model\", [\"exports\", \"require\", \"ember-test-helpers/legacy-0-6-x/test-module\"], function (_exports, _require, _testModule) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n class _default extends _testModule.default {\n constructor(modelName, description, callbacks) {\n super('model:' + modelName, description, callbacks);\n this.modelName = modelName;\n this.setupSteps.push(this.setupModel);\n }\n\n setupModel() {\n var container = this.container;\n var defaultSubject = this.defaultSubject;\n var callbacks = this.callbacks;\n var modelName = this.modelName;\n var adapterFactory = container.factoryFor ? container.factoryFor('adapter:application') : container.lookupFactory('adapter:application');\n\n if (!adapterFactory) {\n if (requirejs.entries['ember-data/adapters/json-api']) {\n adapterFactory = (0, _require.default)(\"ember-data/adapters/json-api\")['default'];\n } // when ember-data/adapters/json-api is provided via ember-cli shims\n // using Ember Data 1.x the actual JSONAPIAdapter isn't found, but the\n // above require statement returns a bizzaro object with only a `default`\n // property (circular reference actually)\n\n\n if (!adapterFactory || !adapterFactory.create) {\n adapterFactory = DS.JSONAPIAdapter || DS.FixtureAdapter;\n }\n\n var thingToRegisterWith = this.registry || this.container;\n thingToRegisterWith.register('adapter:application', adapterFactory);\n }\n\n callbacks.store = function () {\n var container = this.container;\n return container.lookup('service:store') || container.lookup('store:main');\n };\n\n if (callbacks.subject === defaultSubject) {\n callbacks.subject = function (options) {\n var container = this.container;\n return Ember.run(function () {\n var store = container.lookup('service:store') || container.lookup('store:main');\n return store.createRecord(modelName, options);\n });\n };\n }\n }\n\n }\n\n _exports.default = _default;\n});","define(\"ember-test-helpers/legacy-0-6-x/test-module\", [\"exports\", \"ember-test-helpers/legacy-0-6-x/abstract-test-module\", \"@ember/test-helpers\", \"ember-test-helpers/legacy-0-6-x/build-registry\", \"@ember/test-helpers/has-ember-version\"], function (_exports, _abstractTestModule, _testHelpers, _buildRegistry, _hasEmberVersion) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n class _default extends _abstractTestModule.default {\n constructor(subjectName, description, callbacks) {\n // Allow `description` to be omitted, in which case it should\n // default to `subjectName`\n if (!callbacks && typeof description === 'object') {\n callbacks = description;\n description = subjectName;\n }\n\n super(description || subjectName, callbacks);\n this.subjectName = subjectName;\n this.description = description || subjectName;\n this.resolver = this.callbacks.resolver || (0, _testHelpers.getResolver)();\n\n if (this.callbacks.integration && this.callbacks.needs) {\n throw new Error(\"cannot declare 'integration: true' and 'needs' in the same module\");\n }\n\n if (this.callbacks.integration) {\n this.initIntegration(callbacks);\n delete callbacks.integration;\n }\n\n this.initSubject();\n this.initNeeds();\n }\n\n initIntegration(options) {\n if (options.integration === 'legacy') {\n throw new Error(\"`integration: 'legacy'` is only valid for component tests.\");\n }\n\n this.isIntegration = true;\n }\n\n initSubject() {\n this.callbacks.subject = this.callbacks.subject || this.defaultSubject;\n }\n\n initNeeds() {\n this.needs = [this.subjectName];\n\n if (this.callbacks.needs) {\n this.needs = this.needs.concat(this.callbacks.needs);\n delete this.callbacks.needs;\n }\n }\n\n initSetupSteps() {\n this.setupSteps = [];\n this.contextualizedSetupSteps = [];\n\n if (this.callbacks.beforeSetup) {\n this.setupSteps.push(this.callbacks.beforeSetup);\n delete this.callbacks.beforeSetup;\n }\n\n this.setupSteps.push(this.setupContainer);\n this.setupSteps.push(this.setupContext);\n this.setupSteps.push(this.setupTestElements);\n this.setupSteps.push(this.setupAJAXListeners);\n this.setupSteps.push(this.setupPromiseListeners);\n\n if (this.callbacks.setup) {\n this.contextualizedSetupSteps.push(this.callbacks.setup);\n delete this.callbacks.setup;\n }\n }\n\n initTeardownSteps() {\n this.teardownSteps = [];\n this.contextualizedTeardownSteps = [];\n\n if (this.callbacks.teardown) {\n this.contextualizedTeardownSteps.push(this.callbacks.teardown);\n delete this.callbacks.teardown;\n }\n\n this.teardownSteps.push(this.teardownSubject);\n this.teardownSteps.push(this.teardownContainer);\n this.teardownSteps.push(this.teardownContext);\n this.teardownSteps.push(this.teardownTestElements);\n this.teardownSteps.push(this.teardownAJAXListeners);\n this.teardownSteps.push(this.teardownPromiseListeners);\n\n if (this.callbacks.afterTeardown) {\n this.teardownSteps.push(this.callbacks.afterTeardown);\n delete this.callbacks.afterTeardown;\n }\n }\n\n setupContainer() {\n if (this.isIntegration || this.isLegacy) {\n this._setupIntegratedContainer();\n } else {\n this._setupIsolatedContainer();\n }\n }\n\n setupContext() {\n var subjectName = this.subjectName;\n var container = this.container;\n\n var factory = function () {\n return container.factoryFor ? container.factoryFor(subjectName) : container.lookupFactory(subjectName);\n };\n\n super.setupContext({\n container: this.container,\n registry: this.registry,\n factory: factory,\n\n register() {\n var target = this.registry || this.container;\n return target.register.apply(target, arguments);\n }\n\n });\n\n if (Ember.setOwner) {\n Ember.setOwner(this.context, this.container.owner);\n }\n\n this.setupInject();\n }\n\n setupInject() {\n var module = this;\n var context = this.context;\n\n if (Ember.inject) {\n var keys = (Object.keys || keys)(Ember.inject);\n keys.forEach(function (typeName) {\n context.inject[typeName] = function (name, opts) {\n var alias = opts && opts.as || name;\n Ember.run(function () {\n Ember.set(context, alias, module.container.lookup(typeName + ':' + name));\n });\n };\n });\n }\n }\n\n teardownSubject() {\n var subject = this.cache.subject;\n\n if (subject) {\n Ember.run(function () {\n Ember.tryInvoke(subject, 'destroy');\n });\n }\n }\n\n teardownContainer() {\n var container = this.container;\n Ember.run(function () {\n container.destroy();\n });\n }\n\n defaultSubject(options, factory) {\n return factory.create(options);\n } // allow arbitrary named factories, like rspec let\n\n\n contextualizeCallbacks() {\n var callbacks = this.callbacks;\n var context = this.context;\n this.cache = this.cache || {};\n this.cachedCalls = this.cachedCalls || {};\n var keys = (Object.keys || keys)(callbacks);\n var keysLength = keys.length;\n\n if (keysLength) {\n var deprecatedContext = this._buildDeprecatedContext(this, context);\n\n for (var i = 0; i < keysLength; i++) {\n this._contextualizeCallback(context, keys[i], deprecatedContext);\n }\n }\n }\n\n _contextualizeCallback(context, key, callbackContext) {\n var _this = this;\n\n var callbacks = this.callbacks;\n var factory = context.factory;\n\n context[key] = function (options) {\n if (_this.cachedCalls[key]) {\n return _this.cache[key];\n }\n\n var result = callbacks[key].call(callbackContext, options, factory());\n _this.cache[key] = result;\n _this.cachedCalls[key] = true;\n return result;\n };\n }\n /*\n Builds a version of the passed in context that contains deprecation warnings\n for accessing properties that exist on the module.\n */\n\n\n _buildDeprecatedContext(module, context) {\n var deprecatedContext = Object.create(context);\n var keysForDeprecation = Object.keys(module);\n\n for (var i = 0, l = keysForDeprecation.length; i < l; i++) {\n this._proxyDeprecation(module, deprecatedContext, keysForDeprecation[i]);\n }\n\n return deprecatedContext;\n }\n /*\n Defines a key on an object to act as a proxy for deprecating the original.\n */\n\n\n _proxyDeprecation(obj, proxy, key) {\n if (typeof proxy[key] === 'undefined') {\n Object.defineProperty(proxy, key, {\n get() {\n (true && !(false) && Ember.deprecate('Accessing the test module property \"' + key + '\" from a callback is deprecated.', false, {\n id: 'ember-test-helpers.test-module.callback-context',\n until: '0.6.0'\n }));\n return obj[key];\n }\n\n });\n }\n }\n\n _setupContainer(isolated) {\n var resolver = this.resolver;\n var items = (0, _buildRegistry.default)(!isolated ? resolver : Object.create(resolver, {\n resolve: {\n value() {}\n\n }\n }));\n this.container = items.container;\n this.registry = items.registry;\n\n if ((0, _hasEmberVersion.default)(1, 13)) {\n var thingToRegisterWith = this.registry || this.container;\n var router = resolver.resolve('router:main');\n router = router || Ember.Router.extend();\n thingToRegisterWith.register('router:main', router);\n }\n }\n\n _setupIsolatedContainer() {\n var resolver = this.resolver;\n\n this._setupContainer(true);\n\n var thingToRegisterWith = this.registry || this.container;\n\n for (var i = this.needs.length; i > 0; i--) {\n var fullName = this.needs[i - 1];\n var normalizedFullName = resolver.normalize(fullName);\n thingToRegisterWith.register(fullName, resolver.resolve(normalizedFullName));\n }\n\n if (!this.registry) {\n this.container.resolver = function () {};\n }\n }\n\n _setupIntegratedContainer() {\n this._setupContainer();\n }\n\n }\n\n _exports.default = _default;\n});","define(\"ember-test-helpers/wait\", [\"exports\", \"@ember/test-helpers/settled\", \"@ember/test-helpers\"], function (_exports, _settled, _testHelpers) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = wait;\n Object.defineProperty(_exports, \"_setupAJAXHooks\", {\n enumerable: true,\n get: function () {\n return _settled._setupAJAXHooks;\n }\n });\n Object.defineProperty(_exports, \"_teardownAJAXHooks\", {\n enumerable: true,\n get: function () {\n return _settled._teardownAJAXHooks;\n }\n });\n\n /**\n Returns a promise that resolves when in a settled state (see `isSettled` for\n a definition of \"settled state\").\n \n @private\n @deprecated\n @param {Object} [options={}] the options to be used for waiting\n @param {boolean} [options.waitForTimers=true] should timers be waited upon\n @param {boolean} [options.waitForAjax=true] should $.ajax requests be waited upon\n @param {boolean} [options.waitForWaiters=true] should test waiters be waited upon\n @returns {Promise} resolves when settled\n */\n function wait(options = {}) {\n if (typeof options !== 'object' || options === null) {\n options = {};\n }\n\n return (0, _testHelpers.waitUntil)(() => {\n let waitForTimers = 'waitForTimers' in options ? options.waitForTimers : true;\n let waitForAJAX = 'waitForAJAX' in options ? options.waitForAJAX : true;\n let waitForWaiters = 'waitForWaiters' in options ? options.waitForWaiters : true;\n let {\n hasPendingTimers,\n hasRunLoop,\n hasPendingRequests,\n hasPendingWaiters\n } = (0, _testHelpers.getSettledState)();\n\n if (waitForTimers && (hasPendingTimers || hasRunLoop)) {\n return false;\n }\n\n if (waitForAJAX && hasPendingRequests) {\n return false;\n }\n\n if (waitForWaiters && hasPendingWaiters) {\n return false;\n }\n\n return true;\n }, {\n timeout: Infinity\n });\n }\n});","define('qunit-dom', [], function() {\n return {};\n});\n","define(\"qunit/index\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = _exports.todo = _exports.only = _exports.skip = _exports.test = _exports.module = void 0;\n\n /* globals QUnit */\n var module = QUnit.module;\n _exports.module = module;\n var test = QUnit.test;\n _exports.test = test;\n var skip = QUnit.skip;\n _exports.skip = skip;\n var only = QUnit.only;\n _exports.only = only;\n var todo = QUnit.todo;\n _exports.todo = todo;\n var _default = QUnit;\n _exports.default = _default;\n});","runningTests = true;\n\nif (window.Testem) {\n window.Testem.hookIntoTestFramework();\n}\n\n\n"],"names":[],"mappings":"AAAA;;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5GA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5KA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;AC1IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5nOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACn9CA;AACA;AACA;AACA;AACA;AACA;AACA;;ACNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5PA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACnQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC7BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC/FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtSA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACfA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjMA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACzDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9RA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChEA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"test-support.js"} \ No newline at end of file diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/tests.js b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/tests.js deleted file mode 100644 index d73769346..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/tests.js +++ /dev/null @@ -1,44 +0,0 @@ -'use strict'; - -define("fastboot-app/tests/test-helper", ["fastboot-app/app", "fastboot-app/config/environment", "@ember/test-helpers", "ember-qunit"], function (_app, _environment, _testHelpers, _emberQunit) { - "use strict"; - - (0, _testHelpers.setApplication)(_app.default.create(_environment.default.APP)); - (0, _emberQunit.start)(); -}); -define("fastboot-app/tests/unit/routes/index-test", ["qunit", "ember-qunit"], function (_qunit, _emberQunit) { - "use strict"; - - (0, _qunit.module)('Unit | Route | index', function (hooks) { - (0, _emberQunit.setupTest)(hooks); - (0, _qunit.test)('it exists', function (assert) { - let route = this.owner.lookup('route:index'); - assert.ok(route); - }); - }); -}); -define('fastboot-app/config/environment', [], function() { - if (typeof FastBoot !== 'undefined') { -return FastBoot.config('fastboot-app'); -} else { -var prefix = 'fastboot-app';try { - var metaName = prefix + '/config/environment'; - var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content'); - var config = JSON.parse(decodeURIComponent(rawConfig)); - - var exports = { 'default': config }; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; -} -catch(err) { - throw new Error('Could not read config from meta tag with name "' + metaName + '".'); -} - -} -}); - -require('fastboot-app/tests/test-helper'); -EmberENV.TESTS_FILE_LOADED = true; -//# sourceMappingURL=tests.map diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/tests.map b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/tests.map deleted file mode 100644 index 14ebc8c76..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/tests.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["vendor/ember-cli/tests-prefix.js","fastboot-app/tests/test-helper.js","fastboot-app/tests/unit/routes/index-test.js","vendor/ember-cli/app-config.js","vendor/ember-cli/tests-suffix.js"],"sourcesContent":["'use strict';\n","define(\"fastboot-app/tests/test-helper\", [\"fastboot-app/app\", \"fastboot-app/config/environment\", \"@ember/test-helpers\", \"ember-qunit\"], function (_app, _environment, _testHelpers, _emberQunit) {\n \"use strict\";\n\n (0, _testHelpers.setApplication)(_app.default.create(_environment.default.APP));\n (0, _emberQunit.start)();\n});","define(\"fastboot-app/tests/unit/routes/index-test\", [\"qunit\", \"ember-qunit\"], function (_qunit, _emberQunit) {\n \"use strict\";\n\n (0, _qunit.module)('Unit | Route | index', function (hooks) {\n (0, _emberQunit.setupTest)(hooks);\n (0, _qunit.test)('it exists', function (assert) {\n let route = this.owner.lookup('route:index');\n assert.ok(route);\n });\n });\n});","define('fastboot-app/config/environment', [], function() {\n if (typeof FastBoot !== 'undefined') {\nreturn FastBoot.config('fastboot-app');\n} else {\nvar prefix = 'fastboot-app';try {\n var metaName = prefix + '/config/environment';\n var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n var config = JSON.parse(decodeURIComponent(rawConfig));\n\n var exports = { 'default': config };\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n}\ncatch(err) {\n throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n}\n});\n","require('fastboot-app/tests/test-helper');\nEmberENV.TESTS_FILE_LOADED = true;\n"],"names":[],"mappings":"AAAA;;ACAA;AACA;AACA;AACA;AACA;;ACJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;","file":"tests.js"} \ No newline at end of file diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/vendor.css b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/vendor.css deleted file mode 100644 index abac03bcd..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/vendor.css +++ /dev/null @@ -1,97 +0,0 @@ -#ember-welcome-page-id-selector { - padding: 2em; - box-shadow: 0 0 0px 10px #FFFBF5; - font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; - font-size: 16px; - line-height: 1.35em; - background: #FFFBF5; - color: #865931; - height: 100vh; -} -#ember-welcome-page-id-selector img { - max-width: 100%; -} -#ember-welcome-page-id-selector p { - margin: 0 0 .75em; -} -#ember-welcome-page-id-selector h2 { - color: #dd6a58; - margin-top: 1em; - font-size: 1.75em; - line-height: 1.2 -} -#ember-welcome-page-id-selector a:link, -#ember-welcome-page-id-selector a:visited { - color: #dd6a58; - text-decoration: none; -} -#ember-welcome-page-id-selector a:hover, -#ember-welcome-page-id-selector a:active { - color: #c13c27; -} -#ember-welcome-page-id-selector .tomster { - flex: 2; -} -#ember-welcome-page-id-selector .welcome { - flex: 3; -} -#ember-welcome-page-id-selector .columns { - display: flex; - max-width: 960px; - margin: 0 auto; -} -#ember-welcome-page-id-selector .welcome ol { - list-style: disc; - padding-left: 2em; - margin-bottom: .75em; -} -#ember-welcome-page-id-selector .welcome > ol > li { - padding-bottom: .5em; -} -#ember-welcome-page-id-selector .postscript { - clear: both; - text-align: center; - padding-top: 3em; - font-size: 14px; - color: #888; - font-style: italic; - line-height: 2; -} -#ember-welcome-page-id-selector .postscript code { - background-color: #F8E7CF; - border-radius: 3px; - font-family: Menlo, Courier, monospace; - font-size: 0.9em; - padding: 0.2em 0.5em; - margin: 0 0.1em; -} -@media (max-width: 700px) { - #ember-welcome-page-id-selector { - padding: 1em; - } - #ember-welcome-page-id-selector .columns { - flex-direction: column; - } - #ember-welcome-page-id-selector .welcome, - #ember-welcome-page-id-selector .tomster { - } - #ember-welcome-page-id-selector .tomster img { - width: 50%; - margin: auto; - display: block; - } - #ember-welcome-page-id-selector h2 { - text-align: center; - } -} -@media (max-width: 400px) { - #ember-welcome-page-id-selector .tomster img { - width: 60%; - } - #ember-welcome-page-id-selector .welcome, - #ember-welcome-page-id-selector .tomster { - width: 100%; - float: none; - margin: auto; - } -} diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/vendor.js b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/vendor.js deleted file mode 100644 index 2257b2542..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/assets/vendor.js +++ /dev/null @@ -1,92996 +0,0 @@ -window.EmberENV = (function(EmberENV, extra) { - for (var key in extra) { - EmberENV[key] = extra[key]; - } - - return EmberENV; -})(window.EmberENV || {}, {"FEATURES":{},"EXTEND_PROTOTYPES":{"Date":false},"_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true}); - -var runningTests = false; - - - -;var loader, define, requireModule, require, requirejs; - -(function (global) { - 'use strict'; - - function dict() { - var obj = Object.create(null); - obj['__'] = undefined; - delete obj['__']; - return obj; - } - - // Save off the original values of these globals, so we can restore them if someone asks us to - var oldGlobals = { - loader: loader, - define: define, - requireModule: requireModule, - require: require, - requirejs: requirejs - }; - - requirejs = require = requireModule = function (id) { - var pending = []; - var mod = findModule(id, '(require)', pending); - - for (var i = pending.length - 1; i >= 0; i--) { - pending[i].exports(); - } - - return mod.module.exports; - }; - - loader = { - noConflict: function (aliases) { - var oldName, newName; - - for (oldName in aliases) { - if (aliases.hasOwnProperty(oldName)) { - if (oldGlobals.hasOwnProperty(oldName)) { - newName = aliases[oldName]; - - global[newName] = global[oldName]; - global[oldName] = oldGlobals[oldName]; - } - } - } - }, - // Option to enable or disable the generation of default exports - makeDefaultExport: true - }; - - var registry = dict(); - var seen = dict(); - - var uuid = 0; - - function unsupportedModule(length) { - throw new Error('an unsupported module was defined, expected `define(id, deps, module)` instead got: `' + length + '` arguments to define`'); - } - - var defaultDeps = ['require', 'exports', 'module']; - - function Module(id, deps, callback, alias) { - this.uuid = uuid++; - this.id = id; - this.deps = !deps.length && callback.length ? defaultDeps : deps; - this.module = { exports: {} }; - this.callback = callback; - this.hasExportsAsDep = false; - this.isAlias = alias; - this.reified = new Array(deps.length); - - /* - Each module normally passes through these states, in order: - new : initial state - pending : this module is scheduled to be executed - reifying : this module's dependencies are being executed - reified : this module's dependencies finished executing successfully - errored : this module's dependencies failed to execute - finalized : this module executed successfully - */ - this.state = 'new'; - } - - Module.prototype.makeDefaultExport = function () { - var exports = this.module.exports; - if (exports !== null && (typeof exports === 'object' || typeof exports === 'function') && exports['default'] === undefined && Object.isExtensible(exports)) { - exports['default'] = exports; - } - }; - - Module.prototype.exports = function () { - // if finalized, there is no work to do. If reifying, there is a - // circular dependency so we must return our (partial) exports. - if (this.state === 'finalized' || this.state === 'reifying') { - return this.module.exports; - } - - - if (loader.wrapModules) { - this.callback = loader.wrapModules(this.id, this.callback); - } - - this.reify(); - - var result = this.callback.apply(this, this.reified); - this.reified.length = 0; - this.state = 'finalized'; - - if (!(this.hasExportsAsDep && result === undefined)) { - this.module.exports = result; - } - if (loader.makeDefaultExport) { - this.makeDefaultExport(); - } - return this.module.exports; - }; - - Module.prototype.unsee = function () { - this.state = 'new'; - this.module = { exports: {} }; - }; - - Module.prototype.reify = function () { - if (this.state === 'reified') { - return; - } - this.state = 'reifying'; - try { - this.reified = this._reify(); - this.state = 'reified'; - } finally { - if (this.state === 'reifying') { - this.state = 'errored'; - } - } - }; - - Module.prototype._reify = function () { - var reified = this.reified.slice(); - for (var i = 0; i < reified.length; i++) { - var mod = reified[i]; - reified[i] = mod.exports ? mod.exports : mod.module.exports(); - } - return reified; - }; - - Module.prototype.findDeps = function (pending) { - if (this.state !== 'new') { - return; - } - - this.state = 'pending'; - - var deps = this.deps; - - for (var i = 0; i < deps.length; i++) { - var dep = deps[i]; - var entry = this.reified[i] = { exports: undefined, module: undefined }; - if (dep === 'exports') { - this.hasExportsAsDep = true; - entry.exports = this.module.exports; - } else if (dep === 'require') { - entry.exports = this.makeRequire(); - } else if (dep === 'module') { - entry.exports = this.module; - } else { - entry.module = findModule(resolve(dep, this.id), this.id, pending); - } - } - }; - - Module.prototype.makeRequire = function () { - var id = this.id; - var r = function (dep) { - return require(resolve(dep, id)); - }; - r['default'] = r; - r.moduleId = id; - r.has = function (dep) { - return has(resolve(dep, id)); - }; - return r; - }; - - define = function (id, deps, callback) { - var module = registry[id]; - - // If a module for this id has already been defined and is in any state - // other than `new` (meaning it has been or is currently being required), - // then we return early to avoid redefinition. - if (module && module.state !== 'new') { - return; - } - - if (arguments.length < 2) { - unsupportedModule(arguments.length); - } - - if (!Array.isArray(deps)) { - callback = deps; - deps = []; - } - - if (callback instanceof Alias) { - registry[id] = new Module(callback.id, deps, callback, true); - } else { - registry[id] = new Module(id, deps, callback, false); - } - }; - - define.exports = function (name, defaultExport) { - var module = registry[name]; - - // If a module for this name has already been defined and is in any state - // other than `new` (meaning it has been or is currently being required), - // then we return early to avoid redefinition. - if (module && module.state !== 'new') { - return; - } - - module = new Module(name, [], noop, null); - module.module.exports = defaultExport; - module.state = 'finalized'; - registry[name] = module; - - return module; - }; - - function noop() {} - // we don't support all of AMD - // define.amd = {}; - - function Alias(id) { - this.id = id; - } - - define.alias = function (id, target) { - if (arguments.length === 2) { - return define(target, new Alias(id)); - } - - return new Alias(id); - }; - - function missingModule(id, referrer) { - throw new Error('Could not find module `' + id + '` imported from `' + referrer + '`'); - } - - function findModule(id, referrer, pending) { - var mod = registry[id] || registry[id + '/index']; - - while (mod && mod.isAlias) { - mod = registry[mod.id] || registry[mod.id + '/index']; - } - - if (!mod) { - missingModule(id, referrer); - } - - if (pending && mod.state !== 'pending' && mod.state !== 'finalized') { - mod.findDeps(pending); - pending.push(mod); - } - return mod; - } - - function resolve(child, id) { - if (child.charAt(0) !== '.') { - return child; - } - - - var parts = child.split('/'); - var nameParts = id.split('/'); - var parentBase = nameParts.slice(0, -1); - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i]; - - if (part === '..') { - if (parentBase.length === 0) { - throw new Error('Cannot access parent module of root'); - } - parentBase.pop(); - } else if (part === '.') { - continue; - } else { - parentBase.push(part); - } - } - - return parentBase.join('/'); - } - - function has(id) { - return !!(registry[id] || registry[id + '/index']); - } - - requirejs.entries = requirejs._eak_seen = registry; - requirejs.has = has; - requirejs.unsee = function (id) { - findModule(id, '(unsee)', false).unsee(); - }; - - requirejs.clear = function () { - requirejs.entries = requirejs._eak_seen = registry = dict(); - seen = dict(); - }; - - // This code primes the JS engine for good performance by warming the - // JIT compiler for these functions. - define('foo', function () {}); - define('foo/bar', [], function () {}); - define('foo/asdf', ['module', 'exports', 'require'], function (module, exports, require) { - if (require.has('foo/bar')) { - require('foo/bar'); - } - }); - define('foo/baz', [], define.alias('foo')); - define('foo/quz', define.alias('foo')); - define.alias('foo', 'foo/qux'); - define('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function () {}); - define('foo/main', ['foo/bar'], function () {}); - define.exports('foo/exports', {}); - - require('foo/exports'); - require('foo/main'); - require.unsee('foo/bar'); - - requirejs.clear(); - - if (typeof exports === 'object' && typeof module === 'object' && module.exports) { - module.exports = { require: require, define: define }; - } -})(this); -;(function() { -/*! - * @overview Ember - JavaScript Application Framework - * @copyright Copyright 2011-2019 Tilde Inc. and contributors - * Portions Copyright 2006-2011 Strobe Inc. - * Portions Copyright 2008-2011 Apple Inc. All rights reserved. - * @license Licensed under MIT license - * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 3.18.1 - */ -/*globals process */ -var define, require, Ember; // Used in @ember/-internals/environment/lib/global.js - - -mainContext = this; // eslint-disable-line no-undef - -(function () { - var registry; - var seen; - - function missingModule(name, referrerName) { - if (referrerName) { - throw new Error('Could not find module ' + name + ' required by: ' + referrerName); - } else { - throw new Error('Could not find module ' + name); - } - } - - function internalRequire(_name, referrerName) { - var name = _name; - var mod = registry[name]; - - if (!mod) { - name = name + '/index'; - mod = registry[name]; - } - - var exports = seen[name]; - - if (exports !== undefined) { - return exports; - } - - exports = seen[name] = {}; - - if (!mod) { - missingModule(_name, referrerName); - } - - var deps = mod.deps; - var callback = mod.callback; - var reified = new Array(deps.length); - - for (var i = 0; i < deps.length; i++) { - if (deps[i] === 'exports') { - reified[i] = exports; - } else if (deps[i] === 'require') { - reified[i] = require; - } else { - reified[i] = internalRequire(deps[i], name); - } - } - - callback.apply(this, reified); - return exports; - } - - var isNode = typeof window === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; - - if (!isNode) { - Ember = this.Ember = this.Ember || {}; - } - - if (typeof Ember === 'undefined') { - Ember = {}; - } - - if (typeof Ember.__loader === 'undefined') { - registry = Object.create(null); - seen = Object.create(null); - - define = function (name, deps, callback) { - var value = {}; - - if (!callback) { - value.deps = []; - value.callback = deps; - } else { - value.deps = deps; - value.callback = callback; - } - - registry[name] = value; - }; - - require = function (name) { - return internalRequire(name, null); - }; // setup `require` module - - - require['default'] = require; - - require.has = function registryHas(moduleName) { - return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']); - }; - - require._eak_seen = registry; - Ember.__loader = { - define: define, - require: require, - registry: registry - }; - } else { - define = Ember.__loader.define; - require = Ember.__loader.require; - } -})(); -define("@ember/-internals/browser-environment/index", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.hasDOM = _exports.isFirefox = _exports.isChrome = _exports.userAgent = _exports.history = _exports.location = _exports.window = void 0; - // check if window exists and actually is the global - var hasDom = typeof self === 'object' && self !== null && self.Object === Object && typeof Window !== 'undefined' && self.constructor === Window && typeof document === 'object' && document !== null && self.document === document && typeof location === 'object' && location !== null && self.location === location && typeof history === 'object' && history !== null && self.history === history && typeof navigator === 'object' && navigator !== null && self.navigator === navigator && typeof navigator.userAgent === 'string'; - _exports.hasDOM = hasDom; - var window = hasDom ? self : null; - _exports.window = window; - var location$1 = hasDom ? self.location : null; - _exports.location = location$1; - var history$1 = hasDom ? self.history : null; - _exports.history = history$1; - var userAgent = hasDom ? self.navigator.userAgent : 'Lynx (textmode)'; - _exports.userAgent = userAgent; - var isChrome = hasDom ? Boolean(window.chrome) && !window.opera : false; - _exports.isChrome = isChrome; - var isFirefox = hasDom ? typeof InstallTrigger !== 'undefined' : false; - _exports.isFirefox = isFirefox; -}); -define("@ember/-internals/console/index", ["exports", "@ember/debug", "@ember/deprecated-features"], function (_exports, _debug, _deprecatedFeatures) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - // Deliver message that the function is deprecated - var DEPRECATION_MESSAGE = 'Use of Ember.Logger is deprecated. Please use `console` for logging.'; - var DEPRECATION_ID = 'ember-console.deprecate-logger'; - var DEPRECATION_URL = 'https://emberjs.com/deprecations/v3.x#toc_use-console-rather-than-ember-logger'; - /** - @module ember - */ - - /** - Inside Ember-Metal, simply uses the methods from `imports.console`. - Override this to provide more robust logging functionality. - - @class Logger - @deprecated Use 'console' instead - - @namespace Ember - @public - */ - - var DEPRECATED_LOGGER; - - if (_deprecatedFeatures.LOGGER) { - DEPRECATED_LOGGER = { - /** - Logs the arguments to the console. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.log('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method log - @for Ember.Logger - @param {*} arguments - @public - */ - log() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.log(...arguments); // eslint-disable-line no-console - }, - - /** - Prints the arguments to the console with a warning icon. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - Ember.Logger.warn('Something happened!'); - // "Something happened!" will be printed to the console with a warning icon. - ``` - @method warn - @for Ember.Logger - @param {*} arguments - @public - */ - warn() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.warn(...arguments); // eslint-disable-line no-console - }, - - /** - Prints the arguments to the console with an error icon, red text and a stack trace. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - Ember.Logger.error('Danger! Danger!'); - // "Danger! Danger!" will be printed to the console in red text. - ``` - @method error - @for Ember.Logger - @param {*} arguments - @public - */ - error() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.error(...arguments); // eslint-disable-line no-console - }, - - /** - Logs the arguments to the console. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.info('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method info - @for Ember.Logger - @param {*} arguments - @public - */ - info() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.info(...arguments); // eslint-disable-line no-console - }, - - /** - Logs the arguments to the console in blue text. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.debug('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method debug - @for Ember.Logger - @param {*} arguments - @public - */ - debug() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - /* eslint-disable no-console */ - - if (console.debug) { - return console.debug(...arguments); - } - - return console.info(...arguments); - /* eslint-enable no-console */ - }, - - /** - If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace. - ```javascript - Ember.Logger.assert(true); // undefined - Ember.Logger.assert(true === false); // Throws an Assertion failed error. - Ember.Logger.assert(true === false, 'Something invalid'); // Throws an Assertion failed error with message. - ``` - @method assert - @for Ember.Logger - @param {Boolean} bool Value to test - @param {String} message Assertion message on failed - @public - */ - assert() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.assert(...arguments); // eslint-disable-line no-console - } - - }; - } - - var _default = DEPRECATED_LOGGER; - _exports.default = _default; -}); -define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@ember/polyfills"], function (_exports, _owner, _utils, _debug, _polyfills) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.privatize = privatize; - _exports.FACTORY_FOR = _exports.Container = _exports.Registry = void 0; - var leakTracking; - var containers; - - if (true - /* DEBUG */ - ) { - // requires v8 - // chrome --js-flags="--allow-natives-syntax --expose-gc" - // node --allow-natives-syntax --expose-gc - try { - if (typeof gc === 'function') { - leakTracking = (() => { - // avoid syntax errors when --allow-natives-syntax not present - var GetWeakSetValues = new Function('weakSet', 'return %GetWeakSetValues(weakSet, 0)'); - containers = new WeakSet(); - return { - hasContainers() { - gc(); - return GetWeakSetValues(containers).length > 0; - }, - - reset() { - var values = GetWeakSetValues(containers); - - for (var i = 0; i < values.length; i++) { - containers.delete(values[i]); - } - } - - }; - })(); - } - } catch (e) {// ignore - } - } - /** - A container used to instantiate and cache objects. - - Every `Container` must be associated with a `Registry`, which is referenced - to determine the factory and options that should be used to instantiate - objects. - - The public API for `Container` is still in flux and should not be considered - stable. - - @private - @class Container - */ - - - class Container { - constructor(registry, options = {}) { - this.registry = registry; - this.owner = options.owner || null; - this.cache = (0, _utils.dictionary)(options.cache || null); - this.factoryManagerCache = (0, _utils.dictionary)(options.factoryManagerCache || null); - this.isDestroyed = false; - this.isDestroying = false; - - if (true - /* DEBUG */ - ) { - this.validationCache = (0, _utils.dictionary)(options.validationCache || null); - - if (containers !== undefined) { - containers.add(this); - } - } - } - /** - @private - @property registry - @type Registry - @since 1.11.0 - */ - - /** - @private - @property cache - @type InheritingDict - */ - - /** - @private - @property validationCache - @type InheritingDict - */ - - /** - Given a fullName return a corresponding instance. - The default behavior is for lookup to return a singleton instance. - The singleton is scoped to the container, allowing multiple containers - to all have their own locally scoped singletons. - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('api:twitter', Twitter); - let twitter = container.lookup('api:twitter'); - twitter instanceof Twitter; // => true - // by default the container will return singletons - let twitter2 = container.lookup('api:twitter'); - twitter2 instanceof Twitter; // => true - twitter === twitter2; //=> true - ``` - If singletons are not wanted, an optional flag can be provided at lookup. - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('api:twitter', Twitter); - let twitter = container.lookup('api:twitter', { singleton: false }); - let twitter2 = container.lookup('api:twitter', { singleton: false }); - twitter === twitter2; //=> false - ``` - @private - @method lookup - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] The fullname of the request source (used for local lookup) - @return {any} - */ - - - lookup(fullName, options) { - if (this.isDestroyed) { - throw new Error(`Can not call \`.lookup\` after the owner has been destroyed`); - } - - (true && !(this.registry.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(fullName))); - return lookup(this, this.registry.normalize(fullName), options); - } - /** - A depth first traversal, destroying the container, its descendant containers and all - their managed objects. - @private - @method destroy - */ - - - destroy() { - this.isDestroying = true; - destroyDestroyables(this); - } - - finalizeDestroy() { - resetCache(this); - this.isDestroyed = true; - } - /** - Clear either the entire cache or just the cache for a particular key. - @private - @method reset - @param {String} fullName optional key to reset; if missing, resets everything - */ - - - reset(fullName) { - if (this.isDestroyed) return; - - if (fullName === undefined) { - destroyDestroyables(this); - resetCache(this); - } else { - resetMember(this, this.registry.normalize(fullName)); - } - } - /** - Returns an object that can be used to provide an owner to a - manually created instance. - @private - @method ownerInjection - @returns { Object } - */ - - - ownerInjection() { - return { - [_owner.OWNER]: this.owner - }; - } - /** - Given a fullName, return the corresponding factory. The consumer of the factory - is responsible for the destruction of any factory instances, as there is no - way for the container to ensure instances are destroyed when it itself is - destroyed. - @public - @method factoryFor - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] The fullname of the request source (used for local lookup) - @return {any} - */ - - - factoryFor(fullName, options = {}) { - if (this.isDestroyed) { - throw new Error(`Can not call \`.factoryFor\` after the owner has been destroyed`); - } - - var normalizedName = this.registry.normalize(fullName); - (true && !(this.registry.isValidFullName(normalizedName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(normalizedName))); - (true && !(false - /* EMBER_MODULE_UNIFICATION */ - || !options.namespace) && (0, _debug.assert)('EMBER_MODULE_UNIFICATION must be enabled to pass a namespace option to factoryFor', false || !options.namespace)); - - if (options.source || options.namespace) { - normalizedName = this.registry.expandLocalLookup(fullName, options); - - if (!normalizedName) { - return; - } - } - - return factoryFor(this, normalizedName, fullName); - } - - } - - _exports.Container = Container; - - if (true - /* DEBUG */ - ) { - Container._leakTracking = leakTracking; - } - /* - * Wrap a factory manager in a proxy which will not permit properties to be - * set on the manager. - */ - - - function wrapManagerInDeprecationProxy(manager) { - if (_utils.HAS_NATIVE_PROXY) { - var validator = { - set(_obj, prop) { - throw new Error(`You attempted to set "${prop}" on a factory manager created by container#factoryFor. A factory manager is a read-only construct.`); - } - - }; // Note: - // We have to proxy access to the manager here so that private property - // access doesn't cause the above errors to occur. - - var m = manager; - var proxiedManager = { - class: m.class, - - create(props) { - return m.create(props); - } - - }; - var proxy = new Proxy(proxiedManager, validator); - FACTORY_FOR.set(proxy, manager); - } - - return manager; - } - - function isSingleton(container, fullName) { - return container.registry.getOption(fullName, 'singleton') !== false; - } - - function isInstantiatable(container, fullName) { - return container.registry.getOption(fullName, 'instantiate') !== false; - } - - function lookup(container, fullName, options = {}) { - (true && !(false - /* EMBER_MODULE_UNIFICATION */ - || !options.namespace) && (0, _debug.assert)('EMBER_MODULE_UNIFICATION must be enabled to pass a namespace option to lookup', false || !options.namespace)); - var normalizedName = fullName; - - if (options.source || options.namespace) { - normalizedName = container.registry.expandLocalLookup(fullName, options); - - if (!normalizedName) { - return; - } - } - - if (options.singleton !== false) { - var cached = container.cache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - } - - return instantiateFactory(container, normalizedName, fullName, options); - } - - function factoryFor(container, normalizedName, fullName) { - var cached = container.factoryManagerCache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - - var factory = container.registry.resolve(normalizedName); - - if (factory === undefined) { - return; - } - - if (true - /* DEBUG */ - && factory && typeof factory._onLookup === 'function') { - factory._onLookup(fullName); - } - - var manager = new FactoryManager(container, factory, fullName, normalizedName); - - if (true - /* DEBUG */ - ) { - manager = wrapManagerInDeprecationProxy(manager); - } - - container.factoryManagerCache[normalizedName] = manager; - return manager; - } - - function isSingletonClass(container, fullName, { - instantiate, - singleton - }) { - return singleton !== false && !instantiate && isSingleton(container, fullName) && !isInstantiatable(container, fullName); - } - - function isSingletonInstance(container, fullName, { - instantiate, - singleton - }) { - return singleton !== false && instantiate !== false && isSingleton(container, fullName) && isInstantiatable(container, fullName); - } - - function isFactoryClass(container, fullname, { - instantiate, - singleton - }) { - return instantiate === false && (singleton === false || !isSingleton(container, fullname)) && !isInstantiatable(container, fullname); - } - - function isFactoryInstance(container, fullName, { - instantiate, - singleton - }) { - return instantiate !== false && (singleton !== false || isSingleton(container, fullName)) && isInstantiatable(container, fullName); - } - - function instantiateFactory(container, normalizedName, fullName, options) { - var factoryManager = factoryFor(container, normalizedName, fullName); - - if (factoryManager === undefined) { - return; - } // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {} - // By default majority of objects fall into this case - - - if (isSingletonInstance(container, fullName, options)) { - var instance = container.cache[normalizedName] = factoryManager.create(); // if this lookup happened _during_ destruction (emits a deprecation, but - // is still possible) ensure that it gets destroyed - - if (container.isDestroying) { - if (typeof instance.destroy === 'function') { - instance.destroy(); - } - } - - return instance; - } // SomeClass { singleton: false, instantiate: true } - - - if (isFactoryInstance(container, fullName, options)) { - return factoryManager.create(); - } // SomeClass { singleton: true, instantiate: false } | { instantiate: false } | { singleton: false, instantiation: false } - - - if (isSingletonClass(container, fullName, options) || isFactoryClass(container, fullName, options)) { - return factoryManager.class; - } - - throw new Error('Could not create factory'); - } - - function processInjections(container, injections, result) { - if (true - /* DEBUG */ - ) { - container.registry.validateInjections(injections); - } - - var hash = result.injections; - - if (hash === undefined) { - hash = result.injections = {}; - } - - for (var i = 0; i < injections.length; i++) { - var { - property, - specifier, - source - } = injections[i]; - - if (source) { - hash[property] = lookup(container, specifier, { - source - }); - } else { - hash[property] = lookup(container, specifier); - } - - if (!result.isDynamic) { - result.isDynamic = !isSingleton(container, specifier); - } - } - } - - function buildInjections(container, typeInjections, injections) { - var result = { - injections: undefined, - isDynamic: false - }; - - if (typeInjections !== undefined) { - processInjections(container, typeInjections, result); - } - - if (injections !== undefined) { - processInjections(container, injections, result); - } - - return result; - } - - function injectionsFor(container, fullName) { - var registry = container.registry; - var [type] = fullName.split(':'); - var typeInjections = registry.getTypeInjections(type); - var injections = registry.getInjections(fullName); - return buildInjections(container, typeInjections, injections); - } - - function destroyDestroyables(container) { - var cache = container.cache; - var keys = Object.keys(cache); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = cache[key]; - - if (value.destroy) { - value.destroy(); - } - } - } - - function resetCache(container) { - container.cache = (0, _utils.dictionary)(null); - container.factoryManagerCache = (0, _utils.dictionary)(null); - } - - function resetMember(container, fullName) { - var member = container.cache[fullName]; - delete container.factoryManagerCache[fullName]; - - if (member) { - delete container.cache[fullName]; - - if (member.destroy) { - member.destroy(); - } - } - } - - var FACTORY_FOR = new WeakMap(); - _exports.FACTORY_FOR = FACTORY_FOR; - - class FactoryManager { - constructor(container, factory, fullName, normalizedName) { - this.container = container; - this.owner = container.owner; - this.class = factory; - this.fullName = fullName; - this.normalizedName = normalizedName; - this.madeToString = undefined; - this.injections = undefined; - FACTORY_FOR.set(this, this); - } - - toString() { - if (this.madeToString === undefined) { - this.madeToString = this.container.registry.makeToString(this.class, this.fullName); - } - - return this.madeToString; - } - - create(options) { - var { - container - } = this; - - if (container.isDestroyed) { - throw new Error(`Can not create new instances after the owner has been destroyed (you attempted to create ${this.fullName})`); - } - - var injectionsCache = this.injections; - - if (injectionsCache === undefined) { - var { - injections, - isDynamic - } = injectionsFor(this.container, this.normalizedName); - injectionsCache = injections; - - if (!isDynamic) { - this.injections = injections; - } - } - - var props = injectionsCache; - - if (options !== undefined) { - props = (0, _polyfills.assign)({}, injectionsCache, options); - } - - if (true - /* DEBUG */ - ) { - var lazyInjections; - var validationCache = this.container.validationCache; // Ensure that all lazy injections are valid at instantiation time - - if (!validationCache[this.fullName] && this.class && typeof this.class._lazyInjections === 'function') { - lazyInjections = this.class._lazyInjections(); - lazyInjections = this.container.registry.normalizeInjectionsHash(lazyInjections); - this.container.registry.validateInjections(lazyInjections); - } - - validationCache[this.fullName] = true; - } - - if (!this.class.create) { - throw new Error(`Failed to create an instance of '${this.normalizedName}'. Most likely an improperly defined class or an invalid module export.`); - } // required to allow access to things like - // the customized toString, _debugContainerKey, - // owner, etc. without a double extend and without - // modifying the objects properties - - - if (typeof this.class._initFactory === 'function') { - this.class._initFactory(this); - } else { - // in the non-EmberObject case we need to still setOwner - // this is required for supporting glimmer environment and - // template instantiation which rely heavily on - // `options[OWNER]` being passed into `create` - // TODO: clean this up, and remove in future versions - if (options === undefined || props === undefined) { - // avoid mutating `props` here since they are the cached injections - props = (0, _polyfills.assign)({}, props); - } - - (0, _owner.setOwner)(props, this.owner); - } - - var instance = this.class.create(props); - FACTORY_FOR.set(instance, this); - return instance; - } - - } - - var VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/; - /** - A registry used to store factory and option information keyed - by type. - - A `Registry` stores the factory and option information needed by a - `Container` to instantiate and cache objects. - - The API for `Registry` is still in flux and should not be considered stable. - - @private - @class Registry - @since 1.11.0 - */ - - class Registry { - constructor(options = {}) { - this.fallback = options.fallback || null; - this.resolver = options.resolver || null; - this.registrations = (0, _utils.dictionary)(options.registrations || null); - this._typeInjections = (0, _utils.dictionary)(null); - this._injections = (0, _utils.dictionary)(null); - this._localLookupCache = Object.create(null); - this._normalizeCache = (0, _utils.dictionary)(null); - this._resolveCache = (0, _utils.dictionary)(null); - this._failSet = new Set(); - this._options = (0, _utils.dictionary)(null); - this._typeOptions = (0, _utils.dictionary)(null); - } - /** - A backup registry for resolving registrations when no matches can be found. - @private - @property fallback - @type Registry - */ - - /** - An object that has a `resolve` method that resolves a name. - @private - @property resolver - @type Resolver - */ - - /** - @private - @property registrations - @type InheritingDict - */ - - /** - @private - @property _typeInjections - @type InheritingDict - */ - - /** - @private - @property _injections - @type InheritingDict - */ - - /** - @private - @property _normalizeCache - @type InheritingDict - */ - - /** - @private - @property _resolveCache - @type InheritingDict - */ - - /** - @private - @property _options - @type InheritingDict - */ - - /** - @private - @property _typeOptions - @type InheritingDict - */ - - /** - Creates a container based on this registry. - @private - @method container - @param {Object} options - @return {Container} created container - */ - - - container(options) { - return new Container(this, options); - } - /** - Registers a factory for later injection. - Example: - ```javascript - let registry = new Registry(); - registry.register('model:user', Person, {singleton: false }); - registry.register('fruit:favorite', Orange); - registry.register('communication:main', Email, {singleton: false}); - ``` - @private - @method register - @param {String} fullName - @param {Function} factory - @param {Object} options - */ - - - register(fullName, factory, options = {}) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - (true && !(factory !== undefined) && (0, _debug.assert)(`Attempting to register an unknown factory: '${fullName}'`, factory !== undefined)); - var normalizedName = this.normalize(fullName); - (true && !(!this._resolveCache[normalizedName]) && (0, _debug.assert)(`Cannot re-register: '${fullName}', as it has already been resolved.`, !this._resolveCache[normalizedName])); - - this._failSet.delete(normalizedName); - - this.registrations[normalizedName] = factory; - this._options[normalizedName] = options; - } - /** - Unregister a fullName - ```javascript - let registry = new Registry(); - registry.register('model:user', User); - registry.resolve('model:user').create() instanceof User //=> true - registry.unregister('model:user') - registry.resolve('model:user') === undefined //=> true - ``` - @private - @method unregister - @param {String} fullName - */ - - - unregister(fullName) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var normalizedName = this.normalize(fullName); - this._localLookupCache = Object.create(null); - delete this.registrations[normalizedName]; - delete this._resolveCache[normalizedName]; - delete this._options[normalizedName]; - - this._failSet.delete(normalizedName); - } - /** - Given a fullName return the corresponding factory. - By default `resolve` will retrieve the factory from - the registry. - ```javascript - let registry = new Registry(); - registry.register('api:twitter', Twitter); - registry.resolve('api:twitter') // => Twitter - ``` - Optionally the registry can be provided with a custom resolver. - If provided, `resolve` will first provide the custom resolver - the opportunity to resolve the fullName, otherwise it will fallback - to the registry. - ```javascript - let registry = new Registry(); - registry.resolver = function(fullName) { - // lookup via the module system of choice - }; - // the twitter factory is added to the module system - registry.resolve('api:twitter') // => Twitter - ``` - @private - @method resolve - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {Function} fullName's factory - */ - - - resolve(fullName, options) { - var factory = resolve(this, this.normalize(fullName), options); - - if (factory === undefined && this.fallback !== null) { - factory = this.fallback.resolve(...arguments); - } - - return factory; - } - /** - A hook that can be used to describe how the resolver will - attempt to find the factory. - For example, the default Ember `.describe` returns the full - class name (including namespace) where Ember's resolver expects - to find the `fullName`. - @private - @method describe - @param {String} fullName - @return {string} described fullName - */ - - - describe(fullName) { - if (this.resolver !== null && this.resolver.lookupDescription) { - return this.resolver.lookupDescription(fullName); - } else if (this.fallback !== null) { - return this.fallback.describe(fullName); - } else { - return fullName; - } - } - /** - A hook to enable custom fullName normalization behavior - @private - @method normalizeFullName - @param {String} fullName - @return {string} normalized fullName - */ - - - normalizeFullName(fullName) { - if (this.resolver !== null && this.resolver.normalize) { - return this.resolver.normalize(fullName); - } else if (this.fallback !== null) { - return this.fallback.normalizeFullName(fullName); - } else { - return fullName; - } - } - /** - Normalize a fullName based on the application's conventions - @private - @method normalize - @param {String} fullName - @return {string} normalized fullName - */ - - - normalize(fullName) { - return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this.normalizeFullName(fullName)); - } - /** - @method makeToString - @private - @param {any} factory - @param {string} fullName - @return {function} toString function - */ - - - makeToString(factory, fullName) { - if (this.resolver !== null && this.resolver.makeToString) { - return this.resolver.makeToString(factory, fullName); - } else if (this.fallback !== null) { - return this.fallback.makeToString(factory, fullName); - } else { - return factory.toString(); - } - } - /** - Given a fullName check if the container is aware of its factory - or singleton instance. - @private - @method has - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {Boolean} - */ - - - has(fullName, options) { - if (!this.isValidFullName(fullName)) { - return false; - } - - var source = options && options.source && this.normalize(options.source); - var namespace = options && options.namespace || undefined; - return has(this, this.normalize(fullName), source, namespace); - } - /** - Allow registering options for all factories of a type. - ```javascript - let registry = new Registry(); - let container = registry.container(); - // if all of type `connection` must not be singletons - registry.optionsForType('connection', { singleton: false }); - registry.register('connection:twitter', TwitterConnection); - registry.register('connection:facebook', FacebookConnection); - let twitter = container.lookup('connection:twitter'); - let twitter2 = container.lookup('connection:twitter'); - twitter === twitter2; // => false - let facebook = container.lookup('connection:facebook'); - let facebook2 = container.lookup('connection:facebook'); - facebook === facebook2; // => false - ``` - @private - @method optionsForType - @param {String} type - @param {Object} options - */ - - - optionsForType(type, options) { - this._typeOptions[type] = options; - } - - getOptionsForType(type) { - var optionsForType = this._typeOptions[type]; - - if (optionsForType === undefined && this.fallback !== null) { - optionsForType = this.fallback.getOptionsForType(type); - } - - return optionsForType; - } - /** - @private - @method options - @param {String} fullName - @param {Object} options - */ - - - options(fullName, options) { - var normalizedName = this.normalize(fullName); - this._options[normalizedName] = options; - } - - getOptions(fullName) { - var normalizedName = this.normalize(fullName); - var options = this._options[normalizedName]; - - if (options === undefined && this.fallback !== null) { - options = this.fallback.getOptions(fullName); - } - - return options; - } - - getOption(fullName, optionName) { - var options = this._options[fullName]; - - if (options !== undefined && options[optionName] !== undefined) { - return options[optionName]; - } - - var type = fullName.split(':')[0]; - options = this._typeOptions[type]; - - if (options && options[optionName] !== undefined) { - return options[optionName]; - } else if (this.fallback !== null) { - return this.fallback.getOption(fullName, optionName); - } - - return undefined; - } - /** - Used only via `injection`. - Provides a specialized form of injection, specifically enabling - all objects of one type to be injected with a reference to another - object. - For example, provided each object of type `controller` needed a `router`. - one would do the following: - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('router:main', Router); - registry.register('controller:user', UserController); - registry.register('controller:post', PostController); - registry.typeInjection('controller', 'router', 'router:main'); - let user = container.lookup('controller:user'); - let post = container.lookup('controller:post'); - user.router instanceof Router; //=> true - post.router instanceof Router; //=> true - // both controllers share the same router - user.router === post.router; //=> true - ``` - @private - @method typeInjection - @param {String} type - @param {String} property - @param {String} fullName - */ - - - typeInjection(type, property, fullName) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var fullNameType = fullName.split(':')[0]; - (true && !(fullNameType !== type) && (0, _debug.assert)(`Cannot inject a '${fullName}' on other ${type}(s).`, fullNameType !== type)); - var injections = this._typeInjections[type] || (this._typeInjections[type] = []); - injections.push({ - property, - specifier: fullName - }); - } - /** - Defines injection rules. - These rules are used to inject dependencies onto objects when they - are instantiated. - Two forms of injections are possible: - * Injecting one fullName on another fullName - * Injecting one fullName on a type - Example: - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('source:main', Source); - registry.register('model:user', User); - registry.register('model:post', Post); - // injecting one fullName on another fullName - // eg. each user model gets a post model - registry.injection('model:user', 'post', 'model:post'); - // injecting one fullName on another type - registry.injection('model', 'source', 'source:main'); - let user = container.lookup('model:user'); - let post = container.lookup('model:post'); - user.source instanceof Source; //=> true - post.source instanceof Source; //=> true - user.post instanceof Post; //=> true - // and both models share the same source - user.source === post.source; //=> true - ``` - @private - @method injection - @param {String} factoryName - @param {String} property - @param {String} injectionName - */ - - - injection(fullName, property, injectionName) { - (true && !(this.isValidFullName(injectionName)) && (0, _debug.assert)(`Invalid injectionName, expected: 'type:name' got: ${injectionName}`, this.isValidFullName(injectionName))); - var normalizedInjectionName = this.normalize(injectionName); - - if (fullName.indexOf(':') === -1) { - return this.typeInjection(fullName, property, normalizedInjectionName); - } - - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var normalizedName = this.normalize(fullName); - var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []); - injections.push({ - property, - specifier: normalizedInjectionName - }); - } - /** - @private - @method knownForType - @param {String} type the type to iterate over - */ - - - knownForType(type) { - var localKnown = (0, _utils.dictionary)(null); - var registeredNames = Object.keys(this.registrations); - - for (var index = 0; index < registeredNames.length; index++) { - var fullName = registeredNames[index]; - var itemType = fullName.split(':')[0]; - - if (itemType === type) { - localKnown[fullName] = true; - } - } - - var fallbackKnown, resolverKnown; - - if (this.fallback !== null) { - fallbackKnown = this.fallback.knownForType(type); - } - - if (this.resolver !== null && this.resolver.knownForType) { - resolverKnown = this.resolver.knownForType(type); - } - - return (0, _polyfills.assign)({}, fallbackKnown, localKnown, resolverKnown); - } - - isValidFullName(fullName) { - return VALID_FULL_NAME_REGEXP.test(fullName); - } - - getInjections(fullName) { - var injections = this._injections[fullName]; - - if (this.fallback !== null) { - var fallbackInjections = this.fallback.getInjections(fullName); - - if (fallbackInjections !== undefined) { - injections = injections === undefined ? fallbackInjections : injections.concat(fallbackInjections); - } - } - - return injections; - } - - getTypeInjections(type) { - var injections = this._typeInjections[type]; - - if (this.fallback !== null) { - var fallbackInjections = this.fallback.getTypeInjections(type); - - if (fallbackInjections !== undefined) { - injections = injections === undefined ? fallbackInjections : injections.concat(fallbackInjections); - } - } - - return injections; - } - /** - Given a fullName and a source fullName returns the fully resolved - fullName. Used to allow for local lookup. - ```javascript - let registry = new Registry(); - // the twitter factory is added to the module system - registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title - ``` - @private - @method expandLocalLookup - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {String} fullName - */ - - - expandLocalLookup(fullName, options) { - if (this.resolver !== null && this.resolver.expandLocalLookup) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - (true && !(!options.source || this.isValidFullName(options.source)) && (0, _debug.assert)('options.source must be a proper full name', !options.source || this.isValidFullName(options.source))); - var normalizedFullName = this.normalize(fullName); - var normalizedSource = this.normalize(options.source); - return expandLocalLookup(this, normalizedFullName, normalizedSource, options.namespace); - } else if (this.fallback !== null) { - return this.fallback.expandLocalLookup(fullName, options); - } else { - return null; - } - } - - } - - _exports.Registry = Registry; - - if (true - /* DEBUG */ - ) { - var proto = Registry.prototype; - - proto.normalizeInjectionsHash = function (hash) { - var injections = []; - - for (var key in hash) { - if (hash.hasOwnProperty(key)) { - var { - specifier, - source, - namespace - } = hash[key]; - (true && !(this.isValidFullName(specifier)) && (0, _debug.assert)(`Expected a proper full name, given '${specifier}'`, this.isValidFullName(specifier))); - injections.push({ - property: key, - specifier, - source, - namespace - }); - } - } - - return injections; - }; - - proto.validateInjections = function (injections) { - if (!injections) { - return; - } - - for (var i = 0; i < injections.length; i++) { - var { - specifier, - source, - namespace - } = injections[i]; - (true && !(this.has(specifier, { - source, - namespace - })) && (0, _debug.assert)(`Attempting to inject an unknown injection: '${specifier}'`, this.has(specifier, { - source, - namespace - }))); - } - }; - } - - function expandLocalLookup(registry, normalizedName, normalizedSource, namespace) { - var cache = registry._localLookupCache; - var normalizedNameCache = cache[normalizedName]; - - if (!normalizedNameCache) { - normalizedNameCache = cache[normalizedName] = Object.create(null); - } - - var cacheKey = namespace || normalizedSource; - var cached = normalizedNameCache[cacheKey]; - - if (cached !== undefined) { - return cached; - } - - var expanded = registry.resolver.expandLocalLookup(normalizedName, normalizedSource, namespace); - return normalizedNameCache[cacheKey] = expanded; - } - - function resolve(registry, _normalizedName, options) { - var normalizedName = _normalizedName; // when `source` is provided expand normalizedName - // and source into the full normalizedName - - if (options !== undefined && (options.source || options.namespace)) { - normalizedName = registry.expandLocalLookup(_normalizedName, options); - - if (!normalizedName) { - return; - } - } - - var cached = registry._resolveCache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - - if (registry._failSet.has(normalizedName)) { - return; - } - - var resolved; - - if (registry.resolver) { - resolved = registry.resolver.resolve(normalizedName); - } - - if (resolved === undefined) { - resolved = registry.registrations[normalizedName]; - } - - if (resolved === undefined) { - registry._failSet.add(normalizedName); - } else { - registry._resolveCache[normalizedName] = resolved; - } - - return resolved; - } - - function has(registry, fullName, source, namespace) { - return registry.resolve(fullName, { - source, - namespace - }) !== undefined; - } - - var privateNames = (0, _utils.dictionary)(null); - var privateSuffix = `${Math.random()}${Date.now()}`.replace('.', ''); - - function privatize([fullName]) { - var name = privateNames[fullName]; - - if (name) { - return name; - } - - var [type, rawName] = fullName.split(':'); - return privateNames[fullName] = (0, _utils.intern)(`${type}:${rawName}-${privateSuffix}`); - } - /* - Public API for the container is still in flux. - The public API, specified on the application namespace should be considered the stable API. - // @module container - @private - */ - -}); -define("@ember/-internals/environment/index", ["exports", "@ember/debug", "@ember/deprecated-features"], function (_exports, _debug, _deprecatedFeatures) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.getLookup = getLookup; - _exports.setLookup = setLookup; - _exports.getENV = getENV; - _exports.ENV = _exports.context = _exports.global = void 0; - - // from lodash to catch fake globals - function checkGlobal(value) { - return value && value.Object === Object ? value : undefined; - } // element ids can ruin global miss checks - - - function checkElementIdShadowing(value) { - return value && value.nodeType === undefined ? value : undefined; - } // export real global - - - var global$1 = checkGlobal(checkElementIdShadowing(typeof global === 'object' && global)) || checkGlobal(typeof self === 'object' && self) || checkGlobal(typeof window === 'object' && window) || typeof mainContext !== 'undefined' && mainContext || // set before strict mode in Ember loader/wrapper - new Function('return this')(); // eval outside of strict mode - - _exports.global = global$1; - - var context = function (global, Ember) { - return Ember === undefined ? { - imports: global, - exports: global, - lookup: global - } : { - // import jQuery - imports: Ember.imports || global, - // export Ember - exports: Ember.exports || global, - // search for Namespaces - lookup: Ember.lookup || global - }; - }(global$1, global$1.Ember); - - _exports.context = context; - - function getLookup() { - return context.lookup; - } - - function setLookup(value) { - context.lookup = value; - } - /** - The hash of environment variables used to control various configuration - settings. To specify your own or override default settings, add the - desired properties to a global hash named `EmberENV` (or `ENV` for - backwards compatibility with earlier versions of Ember). The `EmberENV` - hash must be created before loading Ember. - - @class EmberENV - @type Object - @public - */ - - - var ENV = { - ENABLE_OPTIONAL_FEATURES: false, - - /** - Determines whether Ember should add to `Array`, `Function`, and `String` - native object prototypes, a few extra methods in order to provide a more - friendly API. - We generally recommend leaving this option set to true however, if you need - to turn it off, you can add the configuration property - `EXTEND_PROTOTYPES` to `EmberENV` and set it to `false`. - Note, when disabled (the default configuration for Ember Addons), you will - instead have to access all methods and functions from the Ember - namespace. - @property EXTEND_PROTOTYPES - @type Boolean - @default true - @for EmberENV - @public - */ - EXTEND_PROTOTYPES: { - Array: true, - Function: true, - String: true - }, - - /** - The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log - a full stack trace during deprecation warnings. - @property LOG_STACKTRACE_ON_DEPRECATION - @type Boolean - @default true - @for EmberENV - @public - */ - LOG_STACKTRACE_ON_DEPRECATION: true, - - /** - The `LOG_VERSION` property, when true, tells Ember to log versions of all - dependent libraries in use. - @property LOG_VERSION - @type Boolean - @default true - @for EmberENV - @public - */ - LOG_VERSION: true, - RAISE_ON_DEPRECATION: false, - STRUCTURED_PROFILE: false, - - /** - Whether to insert a `
        ` wrapper around the - application template. See RFC #280. - This is not intended to be set directly, as the implementation may change in - the future. Use `@ember/optional-features` instead. - @property _APPLICATION_TEMPLATE_WRAPPER - @for EmberENV - @type Boolean - @default true - @private - */ - _APPLICATION_TEMPLATE_WRAPPER: true, - - /** - Whether to use Glimmer Component semantics (as opposed to the classic "Curly" - components semantics) for template-only components. See RFC #278. - This is not intended to be set directly, as the implementation may change in - the future. Use `@ember/optional-features` instead. - @property _TEMPLATE_ONLY_GLIMMER_COMPONENTS - @for EmberENV - @type Boolean - @default false - @private - */ - _TEMPLATE_ONLY_GLIMMER_COMPONENTS: false, - - /** - Whether to perform extra bookkeeping needed to make the `captureRenderTree` - API work. - This has to be set before the ember JavaScript code is evaluated. This is - usually done by setting `window.EmberENV = { _DEBUG_RENDER_TREE: true };` - or `window.ENV = { _DEBUG_RENDER_TREE: true };` before the "vendor" - ` - - - - - - - - - - - - - - - - diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/package.json b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/package.json deleted file mode 100644 index b65b58054..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/package.json +++ /dev/null @@ -1 +0,0 @@ -{"dependencies":{},"fastboot":{"appName":"fastboot-app","config":{"fastboot-app":{"APP":{"autoboot":false,"name":"fastboot-app","version":"0.0.0+fcd8aedb"},"EmberENV":{"EXTEND_PROTOTYPES":{"Date":false},"FEATURES":{},"_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true},"environment":"development","exportApplicationGlobal":true,"locationType":"auto","modulePrefix":"fastboot-app","rootURL":"/"}},"manifest":{"appFiles":["assets/fastboot-app.js","assets/fastboot-app-fastboot.js"],"htmlFile":"index.html","vendorFiles":["assets/vendor.js","assets/auto-import-fastboot.js"]},"moduleWhitelist":[],"schemaVersion":3}} \ No newline at end of file diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/testem.js b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/testem.js deleted file mode 100644 index cb666df67..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/testem.js +++ /dev/null @@ -1,19 +0,0 @@ -/* - * This is dummy file that exists for the sole purpose - * of allowing tests to run directly in the browser as - * well as by Testem. - * - * Testem is configured to run tests directly against - * the test build of index.html, which requires a - * snippet to load the testem.js file: - * - * This has to go before the qunit framework and app - * tests are loaded. - * - * Testem internally supplies this file. However, if you - * run the tests directly in the browser (localhost:8000/tests), - * this file does not exist. - * - * Hence the purpose of this fake file. This file is served - * directly from the express server to satisify the script load. - */ diff --git a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/tests/index.html b/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/tests/index.html deleted file mode 100644 index 1f4a02d91..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/app-with-metadata/tests/index.html +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - FastbootApp Tests - - - - - - - - - - - - - - - - - - -
        -
        - -
        -
        -
        - - - - - - - - - - - diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/auto-import-fastboot.js b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/auto-import-fastboot.js deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers-fastboot.js b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers-fastboot.js deleted file mode 100644 index 80c48e922..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers-fastboot.js +++ /dev/null @@ -1,83 +0,0 @@ -define('~fastboot/app-factory', ['multivalue-headers/app', 'multivalue-headers/config/environment'], function(App, config) { - App = App['default']; - config = config['default']; - - return { - 'default': function() { - return App.create(config.APP); - } - }; -}); - -define("multivalue-headers/initializers/ajax", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - const { - get - } = Ember; - - var nodeAjax = function (options) { - let httpRegex = /^https?:\/\//; - let protocolRelativeRegex = /^\/\//; - let protocol = get(this, 'fastboot.request.protocol'); - - if (protocolRelativeRegex.test(options.url)) { - options.url = protocol + options.url; - } else if (!httpRegex.test(options.url)) { - try { - options.url = protocol + '//' + get(this, 'fastboot.request.host') + options.url; - } catch (fbError) { - throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message); - } - } - - if (najax) { - najax(options); - } else { - throw new Error('najax does not seem to be defined in your app. Did you override it via `addOrOverrideSandboxGlobals` in the fastboot server?'); - } - }; - - var _default = { - name: 'ajax-service', - initialize: function (application) { - application.register('ajax:node', nodeAjax, { - instantiate: false - }); - application.inject('adapter', '_ajaxRequest', 'ajax:node'); - application.inject('adapter', 'fastboot', 'service:fastboot'); - } - }; - _exports.default = _default; -}); -define("multivalue-headers/initializers/error-handler", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - /** - * Initializer to attach an `onError` hook to your app running in fastboot. It catches any run loop - * exceptions and other errors and prevents the node process from crashing. - * - */ - var _default = { - name: 'error-handler', - initialize: function () { - if (!Ember.onerror) { - // if no onerror handler is defined, define one for fastboot environments - Ember.onerror = function (err) { - const errorMessage = `There was an error running your app in fastboot. More info about the error: \n ${err.stack || err}`; - console.error(errorMessage); - }; - } - } - }; - _exports.default = _default; -});//# sourceMappingURL=multivalue-headers-fastboot.map diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers-fastboot.map b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers-fastboot.map deleted file mode 100644 index 6f5ac4ab8..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers-fastboot.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["app-factory.js","multivalue-headers/initializers/ajax.js","multivalue-headers/initializers/error-handler.js"],"sourcesContent":["define('~fastboot/app-factory', ['multivalue-headers/app', 'multivalue-headers/config/environment'], function(App, config) {\n App = App['default'];\n config = config['default'];\n\n return {\n 'default': function() {\n return App.create(config.APP);\n }\n };\n});\n","define(\"multivalue-headers/initializers/ajax\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n const {\n get\n } = Ember;\n\n var nodeAjax = function (options) {\n let httpRegex = /^https?:\\/\\//;\n let protocolRelativeRegex = /^\\/\\//;\n let protocol = get(this, 'fastboot.request.protocol');\n\n if (protocolRelativeRegex.test(options.url)) {\n options.url = protocol + options.url;\n } else if (!httpRegex.test(options.url)) {\n try {\n options.url = protocol + '//' + get(this, 'fastboot.request.host') + options.url;\n } catch (fbError) {\n throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message);\n }\n }\n\n if (najax) {\n najax(options);\n } else {\n throw new Error('najax does not seem to be defined in your app. Did you override it via `addOrOverrideSandboxGlobals` in the fastboot server?');\n }\n };\n\n var _default = {\n name: 'ajax-service',\n initialize: function (application) {\n application.register('ajax:node', nodeAjax, {\n instantiate: false\n });\n application.inject('adapter', '_ajaxRequest', 'ajax:node');\n application.inject('adapter', 'fastboot', 'service:fastboot');\n }\n };\n _exports.default = _default;\n});","define(\"multivalue-headers/initializers/error-handler\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n /**\n * Initializer to attach an `onError` hook to your app running in fastboot. It catches any run loop\n * exceptions and other errors and prevents the node process from crashing.\n *\n */\n var _default = {\n name: 'error-handler',\n initialize: function () {\n if (!Ember.onerror) {\n // if no onerror handler is defined, define one for fastboot environments\n Ember.onerror = function (err) {\n const errorMessage = `There was an error running your app in fastboot. More info about the error: \\n ${err.stack || err}`;\n console.error(errorMessage);\n };\n }\n }\n };\n _exports.default = _default;\n});"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"multivalue-headers-fastboot.js"} \ No newline at end of file diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers.css b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers.js b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers.js deleted file mode 100644 index d1d23e886..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers.js +++ /dev/null @@ -1,329 +0,0 @@ -'use strict'; - - - -;define("multivalue-headers/app", ["exports", "ember-resolver", "ember-load-initializers", "multivalue-headers/config/environment"], function (_exports, _emberResolver, _emberLoadInitializers, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - class App extends Ember.Application { - constructor(...args) { - super(...args); - - _defineProperty(this, "modulePrefix", _environment.default.modulePrefix); - - _defineProperty(this, "podModulePrefix", _environment.default.podModulePrefix); - - _defineProperty(this, "Resolver", _emberResolver.default); - } - - } - - _exports.default = App; - (0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix); -}); -;define("multivalue-headers/component-managers/glimmer", ["exports", "@glimmer/component/-private/ember-component-manager"], function (_exports, _emberComponentManager) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _emberComponentManager.default; - } - }); -}); -;define("multivalue-headers/helpers/app-version", ["exports", "multivalue-headers/config/environment", "ember-cli-app-version/utils/regexp"], function (_exports, _environment, _regexp) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.appVersion = appVersion; - _exports.default = void 0; - - function appVersion(_, hash = {}) { - const version = _environment.default.APP.version; // e.g. 1.0.0-alpha.1+4jds75hf - // Allow use of 'hideSha' and 'hideVersion' For backwards compatibility - - let versionOnly = hash.versionOnly || hash.hideSha; - let shaOnly = hash.shaOnly || hash.hideVersion; - let match = null; - - if (versionOnly) { - if (hash.showExtended) { - match = version.match(_regexp.versionExtendedRegExp); // 1.0.0-alpha.1 - } // Fallback to just version - - - if (!match) { - match = version.match(_regexp.versionRegExp); // 1.0.0 - } - } - - if (shaOnly) { - match = version.match(_regexp.shaRegExp); // 4jds75hf - } - - return match ? match[0] : version; - } - - var _default = Ember.Helper.helper(appVersion); - - _exports.default = _default; -}); -;define("multivalue-headers/initializers/app-version", ["exports", "ember-cli-app-version/initializer-factory", "multivalue-headers/config/environment"], function (_exports, _initializerFactory, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - let name, version; - - if (_environment.default.APP) { - name = _environment.default.APP.name; - version = _environment.default.APP.version; - } - - var _default = { - name: 'App Version', - initialize: (0, _initializerFactory.default)(name, version) - }; - _exports.default = _default; -}); -;define("multivalue-headers/initializers/container-debug-adapter", ["exports", "ember-resolver/resolvers/classic/container-debug-adapter"], function (_exports, _containerDebugAdapter) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - var _default = { - name: 'container-debug-adapter', - - initialize() { - let app = arguments[1] || arguments[0]; - app.register('container-debug-adapter:main', _containerDebugAdapter.default); - app.inject('container-debug-adapter:main', 'namespace', 'application:main'); - } - - }; - _exports.default = _default; -}); -;define("multivalue-headers/initializers/export-application-global", ["exports", "multivalue-headers/config/environment"], function (_exports, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.initialize = initialize; - _exports.default = void 0; - - function initialize() { - var application = arguments[1] || arguments[0]; - - if (_environment.default.exportApplicationGlobal !== false) { - var theGlobal; - - if (typeof window !== 'undefined') { - theGlobal = window; - } else if (typeof global !== 'undefined') { - theGlobal = global; - } else if (typeof self !== 'undefined') { - theGlobal = self; - } else { - // no reasonable global, just bail - return; - } - - var value = _environment.default.exportApplicationGlobal; - var globalName; - - if (typeof value === 'string') { - globalName = value; - } else { - globalName = Ember.String.classify(_environment.default.modulePrefix); - } - - if (!theGlobal[globalName]) { - theGlobal[globalName] = application; - application.reopen({ - willDestroy: function () { - this._super.apply(this, arguments); - - delete theGlobal[globalName]; - } - }); - } - } - } - - var _default = { - name: 'export-application-global', - initialize: initialize - }; - _exports.default = _default; -}); -;define("multivalue-headers/instance-initializers/clear-double-boot", ["exports", "ember-cli-fastboot/instance-initializers/clear-double-boot"], function (_exports, _clearDoubleBoot) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _clearDoubleBoot.default; - } - }); -}); -;define("multivalue-headers/locations/none", ["exports", "ember-cli-fastboot/locations/none"], function (_exports, _none) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _none.default; - } - }); -}); -;define("multivalue-headers/router", ["exports", "multivalue-headers/config/environment"], function (_exports, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - class Router extends Ember.Router { - constructor(...args) { - super(...args); - - _defineProperty(this, "location", _environment.default.locationType); - - _defineProperty(this, "rootURL", _environment.default.rootURL); - } - - } - - _exports.default = Router; - Router.map(function () {}); -}); -;define("multivalue-headers/routes/application", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - var _dec, _class, _descriptor, _temp; - - function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); } - - function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; } - - function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); } - - let ApplicationRoute = (_dec = Ember.inject.service, (_class = (_temp = class ApplicationRoute extends Ember.Route { - constructor(...args) { - super(...args); - - _initializerDefineProperty(this, "fastboot", _descriptor, this); - } - - afterModel() { - if (this.fastboot.isFastBoot) { - this.fastboot.response.headers.append("X-FastBoot", "a"); - this.fastboot.response.headers.append("X-FastBoot", "b"); - this.fastboot.response.headers.append("X-FastBoot", "c"); - } - } - - }, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, "fastboot", [_dec], { - configurable: true, - enumerable: true, - writable: true, - initializer: null - })), _class)); - _exports.default = ApplicationRoute; -}); -;define("multivalue-headers/services/fastboot", ["exports", "ember-cli-fastboot/services/fastboot"], function (_exports, _fastboot) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _fastboot.default; - } - }); -}); -;define("multivalue-headers/templates/application", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - var _default = Ember.HTMLBars.template({ - "id": "XZxk6ife", - "block": "{\"symbols\":[],\"statements\":[[1,[30,[36,1],[[30,[36,0],null,null]],null]]],\"hasEval\":false,\"upvars\":[\"-outlet\",\"component\"]}", - "meta": { - "moduleName": "multivalue-headers/templates/application.hbs" - } - }); - - _exports.default = _default; -}); -; - -;define('multivalue-headers/config/environment', [], function() { - if (typeof FastBoot !== 'undefined') { -return FastBoot.config('multivalue-headers'); -} else { -var prefix = 'multivalue-headers';try { - var metaName = prefix + '/config/environment'; - var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content'); - var config = JSON.parse(decodeURIComponent(rawConfig)); - - var exports = { 'default': config }; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; -} -catch(err) { - throw new Error('Could not read config from meta tag with name "' + metaName + '".'); -} - -} -}); - -; -if (typeof FastBoot === 'undefined') { - if (!runningTests) { - require('multivalue-headers/app')['default'].create({"name":"multivalue-headers","version":"0.0.0+5110a671"}); - } -} - -//# sourceMappingURL=multivalue-headers.map diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers.map b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers.map deleted file mode 100644 index e954a817d..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/multivalue-headers.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["vendor/ember-cli/app-prefix.js","multivalue-headers/app.js","multivalue-headers/component-managers/glimmer.js","multivalue-headers/helpers/app-version.js","multivalue-headers/initializers/app-version.js","multivalue-headers/initializers/container-debug-adapter.js","multivalue-headers/initializers/export-application-global.js","multivalue-headers/instance-initializers/clear-double-boot.js","multivalue-headers/locations/none.js","multivalue-headers/router.js","multivalue-headers/routes/application.js","multivalue-headers/services/fastboot.js","multivalue-headers/templates/application.js","vendor/ember-cli/app-suffix.js","vendor/ember-cli/app-config.js","vendor/ember-cli/app-boot.js"],"sourcesContent":["'use strict';\n\n\n","define(\"multivalue-headers/app\", [\"exports\", \"ember-resolver\", \"ember-load-initializers\", \"multivalue-headers/config/environment\"], function (_exports, _emberResolver, _emberLoadInitializers, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n class App extends Ember.Application {\n constructor(...args) {\n super(...args);\n\n _defineProperty(this, \"modulePrefix\", _environment.default.modulePrefix);\n\n _defineProperty(this, \"podModulePrefix\", _environment.default.podModulePrefix);\n\n _defineProperty(this, \"Resolver\", _emberResolver.default);\n }\n\n }\n\n _exports.default = App;\n (0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix);\n});","define(\"multivalue-headers/component-managers/glimmer\", [\"exports\", \"@glimmer/component/-private/ember-component-manager\"], function (_exports, _emberComponentManager) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _emberComponentManager.default;\n }\n });\n});","define(\"multivalue-headers/helpers/app-version\", [\"exports\", \"multivalue-headers/config/environment\", \"ember-cli-app-version/utils/regexp\"], function (_exports, _environment, _regexp) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.appVersion = appVersion;\n _exports.default = void 0;\n\n function appVersion(_, hash = {}) {\n const version = _environment.default.APP.version; // e.g. 1.0.0-alpha.1+4jds75hf\n // Allow use of 'hideSha' and 'hideVersion' For backwards compatibility\n\n let versionOnly = hash.versionOnly || hash.hideSha;\n let shaOnly = hash.shaOnly || hash.hideVersion;\n let match = null;\n\n if (versionOnly) {\n if (hash.showExtended) {\n match = version.match(_regexp.versionExtendedRegExp); // 1.0.0-alpha.1\n } // Fallback to just version\n\n\n if (!match) {\n match = version.match(_regexp.versionRegExp); // 1.0.0\n }\n }\n\n if (shaOnly) {\n match = version.match(_regexp.shaRegExp); // 4jds75hf\n }\n\n return match ? match[0] : version;\n }\n\n var _default = Ember.Helper.helper(appVersion);\n\n _exports.default = _default;\n});","define(\"multivalue-headers/initializers/app-version\", [\"exports\", \"ember-cli-app-version/initializer-factory\", \"multivalue-headers/config/environment\"], function (_exports, _initializerFactory, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n let name, version;\n\n if (_environment.default.APP) {\n name = _environment.default.APP.name;\n version = _environment.default.APP.version;\n }\n\n var _default = {\n name: 'App Version',\n initialize: (0, _initializerFactory.default)(name, version)\n };\n _exports.default = _default;\n});","define(\"multivalue-headers/initializers/container-debug-adapter\", [\"exports\", \"ember-resolver/resolvers/classic/container-debug-adapter\"], function (_exports, _containerDebugAdapter) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n var _default = {\n name: 'container-debug-adapter',\n\n initialize() {\n let app = arguments[1] || arguments[0];\n app.register('container-debug-adapter:main', _containerDebugAdapter.default);\n app.inject('container-debug-adapter:main', 'namespace', 'application:main');\n }\n\n };\n _exports.default = _default;\n});","define(\"multivalue-headers/initializers/export-application-global\", [\"exports\", \"multivalue-headers/config/environment\"], function (_exports, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.initialize = initialize;\n _exports.default = void 0;\n\n function initialize() {\n var application = arguments[1] || arguments[0];\n\n if (_environment.default.exportApplicationGlobal !== false) {\n var theGlobal;\n\n if (typeof window !== 'undefined') {\n theGlobal = window;\n } else if (typeof global !== 'undefined') {\n theGlobal = global;\n } else if (typeof self !== 'undefined') {\n theGlobal = self;\n } else {\n // no reasonable global, just bail\n return;\n }\n\n var value = _environment.default.exportApplicationGlobal;\n var globalName;\n\n if (typeof value === 'string') {\n globalName = value;\n } else {\n globalName = Ember.String.classify(_environment.default.modulePrefix);\n }\n\n if (!theGlobal[globalName]) {\n theGlobal[globalName] = application;\n application.reopen({\n willDestroy: function () {\n this._super.apply(this, arguments);\n\n delete theGlobal[globalName];\n }\n });\n }\n }\n }\n\n var _default = {\n name: 'export-application-global',\n initialize: initialize\n };\n _exports.default = _default;\n});","define(\"multivalue-headers/instance-initializers/clear-double-boot\", [\"exports\", \"ember-cli-fastboot/instance-initializers/clear-double-boot\"], function (_exports, _clearDoubleBoot) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _clearDoubleBoot.default;\n }\n });\n});","define(\"multivalue-headers/locations/none\", [\"exports\", \"ember-cli-fastboot/locations/none\"], function (_exports, _none) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _none.default;\n }\n });\n});","define(\"multivalue-headers/router\", [\"exports\", \"multivalue-headers/config/environment\"], function (_exports, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n class Router extends Ember.Router {\n constructor(...args) {\n super(...args);\n\n _defineProperty(this, \"location\", _environment.default.locationType);\n\n _defineProperty(this, \"rootURL\", _environment.default.rootURL);\n }\n\n }\n\n _exports.default = Router;\n Router.map(function () {});\n});","define(\"multivalue-headers/routes/application\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n var _dec, _class, _descriptor, _temp;\n\n function _initializerDefineProperty(target, property, descriptor, context) { if (!descriptor) return; Object.defineProperty(target, property, { enumerable: descriptor.enumerable, configurable: descriptor.configurable, writable: descriptor.writable, value: descriptor.initializer ? descriptor.initializer.call(context) : void 0 }); }\n\n function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\n function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\n function _initializerWarningHelper(descriptor, context) { throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and runs after the decorators transform.'); }\n\n let ApplicationRoute = (_dec = Ember.inject.service, (_class = (_temp = class ApplicationRoute extends Ember.Route {\n constructor(...args) {\n super(...args);\n\n _initializerDefineProperty(this, \"fastboot\", _descriptor, this);\n }\n\n afterModel() {\n if (this.fastboot.isFastBoot) {\n this.fastboot.response.headers.append(\"X-FastBoot\", \"a\");\n this.fastboot.response.headers.append(\"X-FastBoot\", \"b\");\n this.fastboot.response.headers.append(\"X-FastBoot\", \"c\");\n }\n }\n\n }, _temp), (_descriptor = _applyDecoratedDescriptor(_class.prototype, \"fastboot\", [_dec], {\n configurable: true,\n enumerable: true,\n writable: true,\n initializer: null\n })), _class));\n _exports.default = ApplicationRoute;\n});","define(\"multivalue-headers/services/fastboot\", [\"exports\", \"ember-cli-fastboot/services/fastboot\"], function (_exports, _fastboot) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _fastboot.default;\n }\n });\n});","define(\"multivalue-headers/templates/application\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n var _default = Ember.HTMLBars.template({\n \"id\": \"XZxk6ife\",\n \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[1,[30,[36,1],[[30,[36,0],null,null]],null]]],\\\"hasEval\\\":false,\\\"upvars\\\":[\\\"-outlet\\\",\\\"component\\\"]}\",\n \"meta\": {\n \"moduleName\": \"multivalue-headers/templates/application.hbs\"\n }\n });\n\n _exports.default = _default;\n});","\n","define('multivalue-headers/config/environment', [], function() {\n if (typeof FastBoot !== 'undefined') {\nreturn FastBoot.config('multivalue-headers');\n} else {\nvar prefix = 'multivalue-headers';try {\n var metaName = prefix + '/config/environment';\n var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n var config = JSON.parse(decodeURIComponent(rawConfig));\n\n var exports = { 'default': config };\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n}\ncatch(err) {\n throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n}\n});\n","\nif (typeof FastBoot === 'undefined') {\n if (!runningTests) {\n require('multivalue-headers/app')['default'].create({\"name\":\"multivalue-headers\",\"version\":\"0.0.0+5110a671\"});\n }\n}\n\n"],"names":[],"mappings":"AAAA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACrCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACvCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"multivalue-headers.js"} \ No newline at end of file diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/vendor.css b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/vendor.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/vendor.js b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/vendor.js deleted file mode 100644 index 586301e50..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/assets/vendor.js +++ /dev/null @@ -1,68378 +0,0 @@ -window.EmberENV = (function(EmberENV, extra) { - for (var key in extra) { - EmberENV[key] = extra[key]; - } - - return EmberENV; -})(window.EmberENV || {}, {"FEATURES":{},"EXTEND_PROTOTYPES":{"Date":false},"_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true}); - -var runningTests = false; - - - -;var loader, define, requireModule, require, requirejs; - -(function (global) { - 'use strict'; - - function dict() { - var obj = Object.create(null); - obj['__'] = undefined; - delete obj['__']; - return obj; - } - - // Save off the original values of these globals, so we can restore them if someone asks us to - var oldGlobals = { - loader: loader, - define: define, - requireModule: requireModule, - require: require, - requirejs: requirejs - }; - - requirejs = require = requireModule = function (id) { - var pending = []; - var mod = findModule(id, '(require)', pending); - - for (var i = pending.length - 1; i >= 0; i--) { - pending[i].exports(); - } - - return mod.module.exports; - }; - - loader = { - noConflict: function (aliases) { - var oldName, newName; - - for (oldName in aliases) { - if (aliases.hasOwnProperty(oldName)) { - if (oldGlobals.hasOwnProperty(oldName)) { - newName = aliases[oldName]; - - global[newName] = global[oldName]; - global[oldName] = oldGlobals[oldName]; - } - } - } - }, - // Option to enable or disable the generation of default exports - makeDefaultExport: true - }; - - var registry = dict(); - var seen = dict(); - - var uuid = 0; - - function unsupportedModule(length) { - throw new Error('an unsupported module was defined, expected `define(id, deps, module)` instead got: `' + length + '` arguments to define`'); - } - - var defaultDeps = ['require', 'exports', 'module']; - - function Module(id, deps, callback, alias) { - this.uuid = uuid++; - this.id = id; - this.deps = !deps.length && callback.length ? defaultDeps : deps; - this.module = { exports: {} }; - this.callback = callback; - this.hasExportsAsDep = false; - this.isAlias = alias; - this.reified = new Array(deps.length); - - /* - Each module normally passes through these states, in order: - new : initial state - pending : this module is scheduled to be executed - reifying : this module's dependencies are being executed - reified : this module's dependencies finished executing successfully - errored : this module's dependencies failed to execute - finalized : this module executed successfully - */ - this.state = 'new'; - } - - Module.prototype.makeDefaultExport = function () { - var exports = this.module.exports; - if (exports !== null && (typeof exports === 'object' || typeof exports === 'function') && exports['default'] === undefined && Object.isExtensible(exports)) { - exports['default'] = exports; - } - }; - - Module.prototype.exports = function () { - // if finalized, there is no work to do. If reifying, there is a - // circular dependency so we must return our (partial) exports. - if (this.state === 'finalized' || this.state === 'reifying') { - return this.module.exports; - } - - - if (loader.wrapModules) { - this.callback = loader.wrapModules(this.id, this.callback); - } - - this.reify(); - - var result = this.callback.apply(this, this.reified); - this.reified.length = 0; - this.state = 'finalized'; - - if (!(this.hasExportsAsDep && result === undefined)) { - this.module.exports = result; - } - if (loader.makeDefaultExport) { - this.makeDefaultExport(); - } - return this.module.exports; - }; - - Module.prototype.unsee = function () { - this.state = 'new'; - this.module = { exports: {} }; - }; - - Module.prototype.reify = function () { - if (this.state === 'reified') { - return; - } - this.state = 'reifying'; - try { - this.reified = this._reify(); - this.state = 'reified'; - } finally { - if (this.state === 'reifying') { - this.state = 'errored'; - } - } - }; - - Module.prototype._reify = function () { - var reified = this.reified.slice(); - for (var i = 0; i < reified.length; i++) { - var mod = reified[i]; - reified[i] = mod.exports ? mod.exports : mod.module.exports(); - } - return reified; - }; - - Module.prototype.findDeps = function (pending) { - if (this.state !== 'new') { - return; - } - - this.state = 'pending'; - - var deps = this.deps; - - for (var i = 0; i < deps.length; i++) { - var dep = deps[i]; - var entry = this.reified[i] = { exports: undefined, module: undefined }; - if (dep === 'exports') { - this.hasExportsAsDep = true; - entry.exports = this.module.exports; - } else if (dep === 'require') { - entry.exports = this.makeRequire(); - } else if (dep === 'module') { - entry.exports = this.module; - } else { - entry.module = findModule(resolve(dep, this.id), this.id, pending); - } - } - }; - - Module.prototype.makeRequire = function () { - var id = this.id; - var r = function (dep) { - return require(resolve(dep, id)); - }; - r['default'] = r; - r.moduleId = id; - r.has = function (dep) { - return has(resolve(dep, id)); - }; - return r; - }; - - define = function (id, deps, callback) { - var module = registry[id]; - - // If a module for this id has already been defined and is in any state - // other than `new` (meaning it has been or is currently being required), - // then we return early to avoid redefinition. - if (module && module.state !== 'new') { - return; - } - - if (arguments.length < 2) { - unsupportedModule(arguments.length); - } - - if (!Array.isArray(deps)) { - callback = deps; - deps = []; - } - - if (callback instanceof Alias) { - registry[id] = new Module(callback.id, deps, callback, true); - } else { - registry[id] = new Module(id, deps, callback, false); - } - }; - - define.exports = function (name, defaultExport) { - var module = registry[name]; - - // If a module for this name has already been defined and is in any state - // other than `new` (meaning it has been or is currently being required), - // then we return early to avoid redefinition. - if (module && module.state !== 'new') { - return; - } - - module = new Module(name, [], noop, null); - module.module.exports = defaultExport; - module.state = 'finalized'; - registry[name] = module; - - return module; - }; - - function noop() {} - // we don't support all of AMD - // define.amd = {}; - - function Alias(id) { - this.id = id; - } - - define.alias = function (id, target) { - if (arguments.length === 2) { - return define(target, new Alias(id)); - } - - return new Alias(id); - }; - - function missingModule(id, referrer) { - throw new Error('Could not find module `' + id + '` imported from `' + referrer + '`'); - } - - function findModule(id, referrer, pending) { - var mod = registry[id] || registry[id + '/index']; - - while (mod && mod.isAlias) { - mod = registry[mod.id] || registry[mod.id + '/index']; - } - - if (!mod) { - missingModule(id, referrer); - } - - if (pending && mod.state !== 'pending' && mod.state !== 'finalized') { - mod.findDeps(pending); - pending.push(mod); - } - return mod; - } - - function resolve(child, id) { - if (child.charAt(0) !== '.') { - return child; - } - - - var parts = child.split('/'); - var nameParts = id.split('/'); - var parentBase = nameParts.slice(0, -1); - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i]; - - if (part === '..') { - if (parentBase.length === 0) { - throw new Error('Cannot access parent module of root'); - } - parentBase.pop(); - } else if (part === '.') { - continue; - } else { - parentBase.push(part); - } - } - - return parentBase.join('/'); - } - - function has(id) { - return !!(registry[id] || registry[id + '/index']); - } - - requirejs.entries = requirejs._eak_seen = registry; - requirejs.has = has; - requirejs.unsee = function (id) { - findModule(id, '(unsee)', false).unsee(); - }; - - requirejs.clear = function () { - requirejs.entries = requirejs._eak_seen = registry = dict(); - seen = dict(); - }; - - // This code primes the JS engine for good performance by warming the - // JIT compiler for these functions. - define('foo', function () {}); - define('foo/bar', [], function () {}); - define('foo/asdf', ['module', 'exports', 'require'], function (module, exports, require) { - if (require.has('foo/bar')) { - require('foo/bar'); - } - }); - define('foo/baz', [], define.alias('foo')); - define('foo/quz', define.alias('foo')); - define.alias('foo', 'foo/qux'); - define('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function () {}); - define('foo/main', ['foo/bar'], function () {}); - define.exports('foo/exports', {}); - - require('foo/exports'); - require('foo/main'); - require.unsee('foo/bar'); - - requirejs.clear(); - - if (typeof exports === 'object' && typeof module === 'object' && module.exports) { - module.exports = { require: require, define: define }; - } -})(this); -;(function() { -/*! - * @overview Ember - JavaScript Application Framework - * @copyright Copyright 2011-2020 Tilde Inc. and contributors - * Portions Copyright 2006-2011 Strobe Inc. - * Portions Copyright 2008-2011 Apple Inc. All rights reserved. - * @license Licensed under MIT license - * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 3.19.0 - */ -/*globals process */ -var define, require, Ember; // Used in @ember/-internals/environment/lib/global.js - - -mainContext = this; // eslint-disable-line no-undef - -(function () { - var registry; - var seen; - - function missingModule(name, referrerName) { - if (referrerName) { - throw new Error('Could not find module ' + name + ' required by: ' + referrerName); - } else { - throw new Error('Could not find module ' + name); - } - } - - function internalRequire(_name, referrerName) { - var name = _name; - var mod = registry[name]; - - if (!mod) { - name = name + '/index'; - mod = registry[name]; - } - - var exports = seen[name]; - - if (exports !== undefined) { - return exports; - } - - exports = seen[name] = {}; - - if (!mod) { - missingModule(_name, referrerName); - } - - var deps = mod.deps; - var callback = mod.callback; - var reified = new Array(deps.length); - - for (var i = 0; i < deps.length; i++) { - if (deps[i] === 'exports') { - reified[i] = exports; - } else if (deps[i] === 'require') { - reified[i] = require; - } else { - reified[i] = internalRequire(deps[i], name); - } - } - - callback.apply(this, reified); - return exports; - } - - var isNode = typeof window === 'undefined' && typeof process !== 'undefined' && {}.toString.call(process) === '[object process]'; - - if (!isNode) { - Ember = this.Ember = this.Ember || {}; - } - - if (typeof Ember === 'undefined') { - Ember = {}; - } - - if (typeof Ember.__loader === 'undefined') { - registry = Object.create(null); - seen = Object.create(null); - - define = function (name, deps, callback) { - var value = {}; - - if (!callback) { - value.deps = []; - value.callback = deps; - } else { - value.deps = deps; - value.callback = callback; - } - - registry[name] = value; - }; - - require = function (name) { - return internalRequire(name, null); - }; // setup `require` module - - - require['default'] = require; - - require.has = function registryHas(moduleName) { - return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']); - }; - - require._eak_seen = registry; - Ember.__loader = { - define: define, - require: require, - registry: registry - }; - } else { - define = Ember.__loader.define; - require = Ember.__loader.require; - } -})(); -define("@ember/-internals/browser-environment/index", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.hasDOM = _exports.isFirefox = _exports.isChrome = _exports.userAgent = _exports.history = _exports.location = _exports.window = void 0; - // check if window exists and actually is the global - var hasDom = typeof self === 'object' && self !== null && self.Object === Object && typeof Window !== 'undefined' && self.constructor === Window && typeof document === 'object' && document !== null && self.document === document && typeof location === 'object' && location !== null && self.location === location && typeof history === 'object' && history !== null && self.history === history && typeof navigator === 'object' && navigator !== null && self.navigator === navigator && typeof navigator.userAgent === 'string'; - _exports.hasDOM = hasDom; - var window = hasDom ? self : null; - _exports.window = window; - var location$1 = hasDom ? self.location : null; - _exports.location = location$1; - var history$1 = hasDom ? self.history : null; - _exports.history = history$1; - var userAgent = hasDom ? self.navigator.userAgent : 'Lynx (textmode)'; - _exports.userAgent = userAgent; - var isChrome = hasDom ? Boolean(window.chrome) && !window.opera : false; - _exports.isChrome = isChrome; - var isFirefox = hasDom ? typeof InstallTrigger !== 'undefined' : false; - _exports.isFirefox = isFirefox; -}); -define("@ember/-internals/console/index", ["exports", "@ember/debug", "@ember/deprecated-features"], function (_exports, _debug, _deprecatedFeatures) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - // Deliver message that the function is deprecated - var DEPRECATION_MESSAGE = 'Use of Ember.Logger is deprecated. Please use `console` for logging.'; - var DEPRECATION_ID = 'ember-console.deprecate-logger'; - var DEPRECATION_URL = 'https://emberjs.com/deprecations/v3.x#toc_use-console-rather-than-ember-logger'; - /** - @module ember - */ - - /** - Inside Ember-Metal, simply uses the methods from `imports.console`. - Override this to provide more robust logging functionality. - - @class Logger - @deprecated Use 'console' instead - - @namespace Ember - @public - */ - - var DEPRECATED_LOGGER; - - if (_deprecatedFeatures.LOGGER) { - DEPRECATED_LOGGER = { - /** - Logs the arguments to the console. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.log('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method log - @for Ember.Logger - @param {*} arguments - @public - */ - log() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.log(...arguments); // eslint-disable-line no-console - }, - - /** - Prints the arguments to the console with a warning icon. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - Ember.Logger.warn('Something happened!'); - // "Something happened!" will be printed to the console with a warning icon. - ``` - @method warn - @for Ember.Logger - @param {*} arguments - @public - */ - warn() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.warn(...arguments); // eslint-disable-line no-console - }, - - /** - Prints the arguments to the console with an error icon, red text and a stack trace. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - Ember.Logger.error('Danger! Danger!'); - // "Danger! Danger!" will be printed to the console in red text. - ``` - @method error - @for Ember.Logger - @param {*} arguments - @public - */ - error() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.error(...arguments); // eslint-disable-line no-console - }, - - /** - Logs the arguments to the console. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.info('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method info - @for Ember.Logger - @param {*} arguments - @public - */ - info() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.info(...arguments); // eslint-disable-line no-console - }, - - /** - Logs the arguments to the console in blue text. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.debug('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method debug - @for Ember.Logger - @param {*} arguments - @public - */ - debug() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - /* eslint-disable no-console */ - - if (console.debug) { - return console.debug(...arguments); - } - - return console.info(...arguments); - /* eslint-enable no-console */ - }, - - /** - If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace. - ```javascript - Ember.Logger.assert(true); // undefined - Ember.Logger.assert(true === false); // Throws an Assertion failed error. - Ember.Logger.assert(true === false, 'Something invalid'); // Throws an Assertion failed error with message. - ``` - @method assert - @for Ember.Logger - @param {Boolean} bool Value to test - @param {String} message Assertion message on failed - @public - */ - assert() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.assert(...arguments); // eslint-disable-line no-console - } - - }; - } - - var _default = DEPRECATED_LOGGER; - _exports.default = _default; -}); -define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@ember/polyfills"], function (_exports, _owner, _utils, _debug, _polyfills) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.privatize = privatize; - _exports.FACTORY_FOR = _exports.Container = _exports.Registry = void 0; - var leakTracking; - var containers; - - if (true - /* DEBUG */ - ) { - // requires v8 - // chrome --js-flags="--allow-natives-syntax --expose-gc" - // node --allow-natives-syntax --expose-gc - try { - if (typeof gc === 'function') { - leakTracking = (() => { - // avoid syntax errors when --allow-natives-syntax not present - var GetWeakSetValues = new Function('weakSet', 'return %GetWeakSetValues(weakSet, 0)'); - containers = new WeakSet(); - return { - hasContainers() { - gc(); - return GetWeakSetValues(containers).length > 0; - }, - - reset() { - var values = GetWeakSetValues(containers); - - for (var i = 0; i < values.length; i++) { - containers.delete(values[i]); - } - } - - }; - })(); - } - } catch (e) {// ignore - } - } - /** - A container used to instantiate and cache objects. - - Every `Container` must be associated with a `Registry`, which is referenced - to determine the factory and options that should be used to instantiate - objects. - - The public API for `Container` is still in flux and should not be considered - stable. - - @private - @class Container - */ - - - class Container { - constructor(registry, options = {}) { - this.registry = registry; - this.owner = options.owner || null; - this.cache = (0, _utils.dictionary)(options.cache || null); - this.factoryManagerCache = (0, _utils.dictionary)(options.factoryManagerCache || null); - this.isDestroyed = false; - this.isDestroying = false; - - if (true - /* DEBUG */ - ) { - this.validationCache = (0, _utils.dictionary)(options.validationCache || null); - - if (containers !== undefined) { - containers.add(this); - } - } - } - /** - @private - @property registry - @type Registry - @since 1.11.0 - */ - - /** - @private - @property cache - @type InheritingDict - */ - - /** - @private - @property validationCache - @type InheritingDict - */ - - /** - Given a fullName return a corresponding instance. - The default behavior is for lookup to return a singleton instance. - The singleton is scoped to the container, allowing multiple containers - to all have their own locally scoped singletons. - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('api:twitter', Twitter); - let twitter = container.lookup('api:twitter'); - twitter instanceof Twitter; // => true - // by default the container will return singletons - let twitter2 = container.lookup('api:twitter'); - twitter2 instanceof Twitter; // => true - twitter === twitter2; //=> true - ``` - If singletons are not wanted, an optional flag can be provided at lookup. - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('api:twitter', Twitter); - let twitter = container.lookup('api:twitter', { singleton: false }); - let twitter2 = container.lookup('api:twitter', { singleton: false }); - twitter === twitter2; //=> false - ``` - @private - @method lookup - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] The fullname of the request source (used for local lookup) - @return {any} - */ - - - lookup(fullName, options) { - if (this.isDestroyed) { - throw new Error(`Can not call \`.lookup\` after the owner has been destroyed`); - } - - (true && !(this.registry.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(fullName))); - return lookup(this, this.registry.normalize(fullName), options); - } - /** - A depth first traversal, destroying the container, its descendant containers and all - their managed objects. - @private - @method destroy - */ - - - destroy() { - this.isDestroying = true; - destroyDestroyables(this); - } - - finalizeDestroy() { - resetCache(this); - this.isDestroyed = true; - } - /** - Clear either the entire cache or just the cache for a particular key. - @private - @method reset - @param {String} fullName optional key to reset; if missing, resets everything - */ - - - reset(fullName) { - if (this.isDestroyed) return; - - if (fullName === undefined) { - destroyDestroyables(this); - resetCache(this); - } else { - resetMember(this, this.registry.normalize(fullName)); - } - } - /** - Returns an object that can be used to provide an owner to a - manually created instance. - @private - @method ownerInjection - @returns { Object } - */ - - - ownerInjection() { - return { - [_owner.OWNER]: this.owner - }; - } - /** - Given a fullName, return the corresponding factory. The consumer of the factory - is responsible for the destruction of any factory instances, as there is no - way for the container to ensure instances are destroyed when it itself is - destroyed. - @public - @method factoryFor - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] The fullname of the request source (used for local lookup) - @return {any} - */ - - - factoryFor(fullName, options = {}) { - if (this.isDestroyed) { - throw new Error(`Can not call \`.factoryFor\` after the owner has been destroyed`); - } - - var normalizedName = this.registry.normalize(fullName); - (true && !(this.registry.isValidFullName(normalizedName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(normalizedName))); - (true && !(false - /* EMBER_MODULE_UNIFICATION */ - || !options.namespace) && (0, _debug.assert)('EMBER_MODULE_UNIFICATION must be enabled to pass a namespace option to factoryFor', false || !options.namespace)); - - if (options.source || options.namespace) { - normalizedName = this.registry.expandLocalLookup(fullName, options); - - if (!normalizedName) { - return; - } - } - - return factoryFor(this, normalizedName, fullName); - } - - } - - _exports.Container = Container; - - if (true - /* DEBUG */ - ) { - Container._leakTracking = leakTracking; - } - /* - * Wrap a factory manager in a proxy which will not permit properties to be - * set on the manager. - */ - - - function wrapManagerInDeprecationProxy(manager) { - if (_utils.HAS_NATIVE_PROXY) { - var validator = { - set(_obj, prop) { - throw new Error(`You attempted to set "${prop}" on a factory manager created by container#factoryFor. A factory manager is a read-only construct.`); - } - - }; // Note: - // We have to proxy access to the manager here so that private property - // access doesn't cause the above errors to occur. - - var m = manager; - var proxiedManager = { - class: m.class, - - create(props) { - return m.create(props); - } - - }; - var proxy = new Proxy(proxiedManager, validator); - FACTORY_FOR.set(proxy, manager); - } - - return manager; - } - - function isSingleton(container, fullName) { - return container.registry.getOption(fullName, 'singleton') !== false; - } - - function isInstantiatable(container, fullName) { - return container.registry.getOption(fullName, 'instantiate') !== false; - } - - function lookup(container, fullName, options = {}) { - (true && !(false - /* EMBER_MODULE_UNIFICATION */ - || !options.namespace) && (0, _debug.assert)('EMBER_MODULE_UNIFICATION must be enabled to pass a namespace option to lookup', false || !options.namespace)); - var normalizedName = fullName; - - if (options.source || options.namespace) { - normalizedName = container.registry.expandLocalLookup(fullName, options); - - if (!normalizedName) { - return; - } - } - - if (options.singleton !== false) { - var cached = container.cache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - } - - return instantiateFactory(container, normalizedName, fullName, options); - } - - function factoryFor(container, normalizedName, fullName) { - var cached = container.factoryManagerCache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - - var factory = container.registry.resolve(normalizedName); - - if (factory === undefined) { - return; - } - - if (true - /* DEBUG */ - && factory && typeof factory._onLookup === 'function') { - factory._onLookup(fullName); - } - - var manager = new FactoryManager(container, factory, fullName, normalizedName); - - if (true - /* DEBUG */ - ) { - manager = wrapManagerInDeprecationProxy(manager); - } - - container.factoryManagerCache[normalizedName] = manager; - return manager; - } - - function isSingletonClass(container, fullName, { - instantiate, - singleton - }) { - return singleton !== false && !instantiate && isSingleton(container, fullName) && !isInstantiatable(container, fullName); - } - - function isSingletonInstance(container, fullName, { - instantiate, - singleton - }) { - return singleton !== false && instantiate !== false && isSingleton(container, fullName) && isInstantiatable(container, fullName); - } - - function isFactoryClass(container, fullname, { - instantiate, - singleton - }) { - return instantiate === false && (singleton === false || !isSingleton(container, fullname)) && !isInstantiatable(container, fullname); - } - - function isFactoryInstance(container, fullName, { - instantiate, - singleton - }) { - return instantiate !== false && (singleton !== false || isSingleton(container, fullName)) && isInstantiatable(container, fullName); - } - - function instantiateFactory(container, normalizedName, fullName, options) { - var factoryManager = factoryFor(container, normalizedName, fullName); - - if (factoryManager === undefined) { - return; - } // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {} - // By default majority of objects fall into this case - - - if (isSingletonInstance(container, fullName, options)) { - var instance = container.cache[normalizedName] = factoryManager.create(); // if this lookup happened _during_ destruction (emits a deprecation, but - // is still possible) ensure that it gets destroyed - - if (container.isDestroying) { - if (typeof instance.destroy === 'function') { - instance.destroy(); - } - } - - return instance; - } // SomeClass { singleton: false, instantiate: true } - - - if (isFactoryInstance(container, fullName, options)) { - return factoryManager.create(); - } // SomeClass { singleton: true, instantiate: false } | { instantiate: false } | { singleton: false, instantiation: false } - - - if (isSingletonClass(container, fullName, options) || isFactoryClass(container, fullName, options)) { - return factoryManager.class; - } - - throw new Error('Could not create factory'); - } - - function processInjections(container, injections, result) { - if (true - /* DEBUG */ - ) { - container.registry.validateInjections(injections); - } - - var hash = result.injections; - - if (hash === undefined) { - hash = result.injections = {}; - } - - for (var i = 0; i < injections.length; i++) { - var { - property, - specifier, - source - } = injections[i]; - - if (source) { - hash[property] = lookup(container, specifier, { - source - }); - } else { - hash[property] = lookup(container, specifier); - } - - if (!result.isDynamic) { - result.isDynamic = !isSingleton(container, specifier); - } - } - } - - function buildInjections(container, typeInjections, injections) { - var result = { - injections: undefined, - isDynamic: false - }; - - if (typeInjections !== undefined) { - processInjections(container, typeInjections, result); - } - - if (injections !== undefined) { - processInjections(container, injections, result); - } - - return result; - } - - function injectionsFor(container, fullName) { - var registry = container.registry; - var [type] = fullName.split(':'); - var typeInjections = registry.getTypeInjections(type); - var injections = registry.getInjections(fullName); - return buildInjections(container, typeInjections, injections); - } - - function destroyDestroyables(container) { - var cache = container.cache; - var keys = Object.keys(cache); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = cache[key]; - - if (value.destroy) { - value.destroy(); - } - } - } - - function resetCache(container) { - container.cache = (0, _utils.dictionary)(null); - container.factoryManagerCache = (0, _utils.dictionary)(null); - } - - function resetMember(container, fullName) { - var member = container.cache[fullName]; - delete container.factoryManagerCache[fullName]; - - if (member) { - delete container.cache[fullName]; - - if (member.destroy) { - member.destroy(); - } - } - } - - var FACTORY_FOR = new WeakMap(); - _exports.FACTORY_FOR = FACTORY_FOR; - - class FactoryManager { - constructor(container, factory, fullName, normalizedName) { - this.container = container; - this.owner = container.owner; - this.class = factory; - this.fullName = fullName; - this.normalizedName = normalizedName; - this.madeToString = undefined; - this.injections = undefined; - FACTORY_FOR.set(this, this); - } - - toString() { - if (this.madeToString === undefined) { - this.madeToString = this.container.registry.makeToString(this.class, this.fullName); - } - - return this.madeToString; - } - - create(options) { - var { - container - } = this; - - if (container.isDestroyed) { - throw new Error(`Can not create new instances after the owner has been destroyed (you attempted to create ${this.fullName})`); - } - - var injectionsCache = this.injections; - - if (injectionsCache === undefined) { - var { - injections, - isDynamic - } = injectionsFor(this.container, this.normalizedName); - injectionsCache = injections; - - if (!isDynamic) { - this.injections = injections; - } - } - - var props = injectionsCache; - - if (options !== undefined) { - props = (0, _polyfills.assign)({}, injectionsCache, options); - } - - if (true - /* DEBUG */ - ) { - var lazyInjections; - var validationCache = this.container.validationCache; // Ensure that all lazy injections are valid at instantiation time - - if (!validationCache[this.fullName] && this.class && typeof this.class._lazyInjections === 'function') { - lazyInjections = this.class._lazyInjections(); - lazyInjections = this.container.registry.normalizeInjectionsHash(lazyInjections); - this.container.registry.validateInjections(lazyInjections); - } - - validationCache[this.fullName] = true; - } - - if (!this.class.create) { - throw new Error(`Failed to create an instance of '${this.normalizedName}'. Most likely an improperly defined class or an invalid module export.`); - } // required to allow access to things like - // the customized toString, _debugContainerKey, - // owner, etc. without a double extend and without - // modifying the objects properties - - - if (typeof this.class._initFactory === 'function') { - this.class._initFactory(this); - } else { - // in the non-EmberObject case we need to still setOwner - // this is required for supporting glimmer environment and - // template instantiation which rely heavily on - // `options[OWNER]` being passed into `create` - // TODO: clean this up, and remove in future versions - if (options === undefined || props === undefined) { - // avoid mutating `props` here since they are the cached injections - props = (0, _polyfills.assign)({}, props); - } - - (0, _owner.setOwner)(props, this.owner); - } - - var instance = this.class.create(props); - FACTORY_FOR.set(instance, this); - return instance; - } - - } - - var VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/; - /** - A registry used to store factory and option information keyed - by type. - - A `Registry` stores the factory and option information needed by a - `Container` to instantiate and cache objects. - - The API for `Registry` is still in flux and should not be considered stable. - - @private - @class Registry - @since 1.11.0 - */ - - class Registry { - constructor(options = {}) { - this.fallback = options.fallback || null; - this.resolver = options.resolver || null; - this.registrations = (0, _utils.dictionary)(options.registrations || null); - this._typeInjections = (0, _utils.dictionary)(null); - this._injections = (0, _utils.dictionary)(null); - this._localLookupCache = Object.create(null); - this._normalizeCache = (0, _utils.dictionary)(null); - this._resolveCache = (0, _utils.dictionary)(null); - this._failSet = new Set(); - this._options = (0, _utils.dictionary)(null); - this._typeOptions = (0, _utils.dictionary)(null); - } - /** - A backup registry for resolving registrations when no matches can be found. - @private - @property fallback - @type Registry - */ - - /** - An object that has a `resolve` method that resolves a name. - @private - @property resolver - @type Resolver - */ - - /** - @private - @property registrations - @type InheritingDict - */ - - /** - @private - @property _typeInjections - @type InheritingDict - */ - - /** - @private - @property _injections - @type InheritingDict - */ - - /** - @private - @property _normalizeCache - @type InheritingDict - */ - - /** - @private - @property _resolveCache - @type InheritingDict - */ - - /** - @private - @property _options - @type InheritingDict - */ - - /** - @private - @property _typeOptions - @type InheritingDict - */ - - /** - Creates a container based on this registry. - @private - @method container - @param {Object} options - @return {Container} created container - */ - - - container(options) { - return new Container(this, options); - } - /** - Registers a factory for later injection. - Example: - ```javascript - let registry = new Registry(); - registry.register('model:user', Person, {singleton: false }); - registry.register('fruit:favorite', Orange); - registry.register('communication:main', Email, {singleton: false}); - ``` - @private - @method register - @param {String} fullName - @param {Function} factory - @param {Object} options - */ - - - register(fullName, factory, options = {}) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - (true && !(factory !== undefined) && (0, _debug.assert)(`Attempting to register an unknown factory: '${fullName}'`, factory !== undefined)); - var normalizedName = this.normalize(fullName); - (true && !(!this._resolveCache[normalizedName]) && (0, _debug.assert)(`Cannot re-register: '${fullName}', as it has already been resolved.`, !this._resolveCache[normalizedName])); - - this._failSet.delete(normalizedName); - - this.registrations[normalizedName] = factory; - this._options[normalizedName] = options; - } - /** - Unregister a fullName - ```javascript - let registry = new Registry(); - registry.register('model:user', User); - registry.resolve('model:user').create() instanceof User //=> true - registry.unregister('model:user') - registry.resolve('model:user') === undefined //=> true - ``` - @private - @method unregister - @param {String} fullName - */ - - - unregister(fullName) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var normalizedName = this.normalize(fullName); - this._localLookupCache = Object.create(null); - delete this.registrations[normalizedName]; - delete this._resolveCache[normalizedName]; - delete this._options[normalizedName]; - - this._failSet.delete(normalizedName); - } - /** - Given a fullName return the corresponding factory. - By default `resolve` will retrieve the factory from - the registry. - ```javascript - let registry = new Registry(); - registry.register('api:twitter', Twitter); - registry.resolve('api:twitter') // => Twitter - ``` - Optionally the registry can be provided with a custom resolver. - If provided, `resolve` will first provide the custom resolver - the opportunity to resolve the fullName, otherwise it will fallback - to the registry. - ```javascript - let registry = new Registry(); - registry.resolver = function(fullName) { - // lookup via the module system of choice - }; - // the twitter factory is added to the module system - registry.resolve('api:twitter') // => Twitter - ``` - @private - @method resolve - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {Function} fullName's factory - */ - - - resolve(fullName, options) { - var factory = resolve(this, this.normalize(fullName), options); - - if (factory === undefined && this.fallback !== null) { - factory = this.fallback.resolve(...arguments); - } - - return factory; - } - /** - A hook that can be used to describe how the resolver will - attempt to find the factory. - For example, the default Ember `.describe` returns the full - class name (including namespace) where Ember's resolver expects - to find the `fullName`. - @private - @method describe - @param {String} fullName - @return {string} described fullName - */ - - - describe(fullName) { - if (this.resolver !== null && this.resolver.lookupDescription) { - return this.resolver.lookupDescription(fullName); - } else if (this.fallback !== null) { - return this.fallback.describe(fullName); - } else { - return fullName; - } - } - /** - A hook to enable custom fullName normalization behavior - @private - @method normalizeFullName - @param {String} fullName - @return {string} normalized fullName - */ - - - normalizeFullName(fullName) { - if (this.resolver !== null && this.resolver.normalize) { - return this.resolver.normalize(fullName); - } else if (this.fallback !== null) { - return this.fallback.normalizeFullName(fullName); - } else { - return fullName; - } - } - /** - Normalize a fullName based on the application's conventions - @private - @method normalize - @param {String} fullName - @return {string} normalized fullName - */ - - - normalize(fullName) { - return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this.normalizeFullName(fullName)); - } - /** - @method makeToString - @private - @param {any} factory - @param {string} fullName - @return {function} toString function - */ - - - makeToString(factory, fullName) { - if (this.resolver !== null && this.resolver.makeToString) { - return this.resolver.makeToString(factory, fullName); - } else if (this.fallback !== null) { - return this.fallback.makeToString(factory, fullName); - } else { - return factory.toString(); - } - } - /** - Given a fullName check if the container is aware of its factory - or singleton instance. - @private - @method has - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {Boolean} - */ - - - has(fullName, options) { - if (!this.isValidFullName(fullName)) { - return false; - } - - var source = options && options.source && this.normalize(options.source); - var namespace = options && options.namespace || undefined; - return has(this, this.normalize(fullName), source, namespace); - } - /** - Allow registering options for all factories of a type. - ```javascript - let registry = new Registry(); - let container = registry.container(); - // if all of type `connection` must not be singletons - registry.optionsForType('connection', { singleton: false }); - registry.register('connection:twitter', TwitterConnection); - registry.register('connection:facebook', FacebookConnection); - let twitter = container.lookup('connection:twitter'); - let twitter2 = container.lookup('connection:twitter'); - twitter === twitter2; // => false - let facebook = container.lookup('connection:facebook'); - let facebook2 = container.lookup('connection:facebook'); - facebook === facebook2; // => false - ``` - @private - @method optionsForType - @param {String} type - @param {Object} options - */ - - - optionsForType(type, options) { - this._typeOptions[type] = options; - } - - getOptionsForType(type) { - var optionsForType = this._typeOptions[type]; - - if (optionsForType === undefined && this.fallback !== null) { - optionsForType = this.fallback.getOptionsForType(type); - } - - return optionsForType; - } - /** - @private - @method options - @param {String} fullName - @param {Object} options - */ - - - options(fullName, options) { - var normalizedName = this.normalize(fullName); - this._options[normalizedName] = options; - } - - getOptions(fullName) { - var normalizedName = this.normalize(fullName); - var options = this._options[normalizedName]; - - if (options === undefined && this.fallback !== null) { - options = this.fallback.getOptions(fullName); - } - - return options; - } - - getOption(fullName, optionName) { - var options = this._options[fullName]; - - if (options !== undefined && options[optionName] !== undefined) { - return options[optionName]; - } - - var type = fullName.split(':')[0]; - options = this._typeOptions[type]; - - if (options && options[optionName] !== undefined) { - return options[optionName]; - } else if (this.fallback !== null) { - return this.fallback.getOption(fullName, optionName); - } - - return undefined; - } - /** - Used only via `injection`. - Provides a specialized form of injection, specifically enabling - all objects of one type to be injected with a reference to another - object. - For example, provided each object of type `controller` needed a `router`. - one would do the following: - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('router:main', Router); - registry.register('controller:user', UserController); - registry.register('controller:post', PostController); - registry.typeInjection('controller', 'router', 'router:main'); - let user = container.lookup('controller:user'); - let post = container.lookup('controller:post'); - user.router instanceof Router; //=> true - post.router instanceof Router; //=> true - // both controllers share the same router - user.router === post.router; //=> true - ``` - @private - @method typeInjection - @param {String} type - @param {String} property - @param {String} fullName - */ - - - typeInjection(type, property, fullName) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var fullNameType = fullName.split(':')[0]; - (true && !(fullNameType !== type) && (0, _debug.assert)(`Cannot inject a '${fullName}' on other ${type}(s).`, fullNameType !== type)); - var injections = this._typeInjections[type] || (this._typeInjections[type] = []); - injections.push({ - property, - specifier: fullName - }); - } - /** - Defines injection rules. - These rules are used to inject dependencies onto objects when they - are instantiated. - Two forms of injections are possible: - * Injecting one fullName on another fullName - * Injecting one fullName on a type - Example: - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('source:main', Source); - registry.register('model:user', User); - registry.register('model:post', Post); - // injecting one fullName on another fullName - // eg. each user model gets a post model - registry.injection('model:user', 'post', 'model:post'); - // injecting one fullName on another type - registry.injection('model', 'source', 'source:main'); - let user = container.lookup('model:user'); - let post = container.lookup('model:post'); - user.source instanceof Source; //=> true - post.source instanceof Source; //=> true - user.post instanceof Post; //=> true - // and both models share the same source - user.source === post.source; //=> true - ``` - @private - @method injection - @param {String} factoryName - @param {String} property - @param {String} injectionName - */ - - - injection(fullName, property, injectionName) { - (true && !(this.isValidFullName(injectionName)) && (0, _debug.assert)(`Invalid injectionName, expected: 'type:name' got: ${injectionName}`, this.isValidFullName(injectionName))); - var normalizedInjectionName = this.normalize(injectionName); - - if (fullName.indexOf(':') === -1) { - return this.typeInjection(fullName, property, normalizedInjectionName); - } - - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var normalizedName = this.normalize(fullName); - var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []); - injections.push({ - property, - specifier: normalizedInjectionName - }); - } - /** - @private - @method knownForType - @param {String} type the type to iterate over - */ - - - knownForType(type) { - var localKnown = (0, _utils.dictionary)(null); - var registeredNames = Object.keys(this.registrations); - - for (var index = 0; index < registeredNames.length; index++) { - var fullName = registeredNames[index]; - var itemType = fullName.split(':')[0]; - - if (itemType === type) { - localKnown[fullName] = true; - } - } - - var fallbackKnown, resolverKnown; - - if (this.fallback !== null) { - fallbackKnown = this.fallback.knownForType(type); - } - - if (this.resolver !== null && this.resolver.knownForType) { - resolverKnown = this.resolver.knownForType(type); - } - - return (0, _polyfills.assign)({}, fallbackKnown, localKnown, resolverKnown); - } - - isValidFullName(fullName) { - return VALID_FULL_NAME_REGEXP.test(fullName); - } - - getInjections(fullName) { - var injections = this._injections[fullName]; - - if (this.fallback !== null) { - var fallbackInjections = this.fallback.getInjections(fullName); - - if (fallbackInjections !== undefined) { - injections = injections === undefined ? fallbackInjections : injections.concat(fallbackInjections); - } - } - - return injections; - } - - getTypeInjections(type) { - var injections = this._typeInjections[type]; - - if (this.fallback !== null) { - var fallbackInjections = this.fallback.getTypeInjections(type); - - if (fallbackInjections !== undefined) { - injections = injections === undefined ? fallbackInjections : injections.concat(fallbackInjections); - } - } - - return injections; - } - /** - Given a fullName and a source fullName returns the fully resolved - fullName. Used to allow for local lookup. - ```javascript - let registry = new Registry(); - // the twitter factory is added to the module system - registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title - ``` - @private - @method expandLocalLookup - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {String} fullName - */ - - - expandLocalLookup(fullName, options) { - if (this.resolver !== null && this.resolver.expandLocalLookup) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - (true && !(!options.source || this.isValidFullName(options.source)) && (0, _debug.assert)('options.source must be a proper full name', !options.source || this.isValidFullName(options.source))); - var normalizedFullName = this.normalize(fullName); - var normalizedSource = this.normalize(options.source); - return expandLocalLookup(this, normalizedFullName, normalizedSource, options.namespace); - } else if (this.fallback !== null) { - return this.fallback.expandLocalLookup(fullName, options); - } else { - return null; - } - } - - } - - _exports.Registry = Registry; - - if (true - /* DEBUG */ - ) { - var proto = Registry.prototype; - - proto.normalizeInjectionsHash = function (hash) { - var injections = []; - - for (var key in hash) { - if (hash.hasOwnProperty(key)) { - var { - specifier, - source, - namespace - } = hash[key]; - (true && !(this.isValidFullName(specifier)) && (0, _debug.assert)(`Expected a proper full name, given '${specifier}'`, this.isValidFullName(specifier))); - injections.push({ - property: key, - specifier, - source, - namespace - }); - } - } - - return injections; - }; - - proto.validateInjections = function (injections) { - if (!injections) { - return; - } - - for (var i = 0; i < injections.length; i++) { - var { - specifier, - source, - namespace - } = injections[i]; - (true && !(this.has(specifier, { - source, - namespace - })) && (0, _debug.assert)(`Attempting to inject an unknown injection: '${specifier}'`, this.has(specifier, { - source, - namespace - }))); - } - }; - } - - function expandLocalLookup(registry, normalizedName, normalizedSource, namespace) { - var cache = registry._localLookupCache; - var normalizedNameCache = cache[normalizedName]; - - if (!normalizedNameCache) { - normalizedNameCache = cache[normalizedName] = Object.create(null); - } - - var cacheKey = namespace || normalizedSource; - var cached = normalizedNameCache[cacheKey]; - - if (cached !== undefined) { - return cached; - } - - var expanded = registry.resolver.expandLocalLookup(normalizedName, normalizedSource, namespace); - return normalizedNameCache[cacheKey] = expanded; - } - - function resolve(registry, _normalizedName, options) { - var normalizedName = _normalizedName; // when `source` is provided expand normalizedName - // and source into the full normalizedName - - if (options !== undefined && (options.source || options.namespace)) { - normalizedName = registry.expandLocalLookup(_normalizedName, options); - - if (!normalizedName) { - return; - } - } - - var cached = registry._resolveCache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - - if (registry._failSet.has(normalizedName)) { - return; - } - - var resolved; - - if (registry.resolver) { - resolved = registry.resolver.resolve(normalizedName); - } - - if (resolved === undefined) { - resolved = registry.registrations[normalizedName]; - } - - if (resolved === undefined) { - registry._failSet.add(normalizedName); - } else { - registry._resolveCache[normalizedName] = resolved; - } - - return resolved; - } - - function has(registry, fullName, source, namespace) { - return registry.resolve(fullName, { - source, - namespace - }) !== undefined; - } - - var privateNames = (0, _utils.dictionary)(null); - var privateSuffix = `${Math.random()}${Date.now()}`.replace('.', ''); - - function privatize([fullName]) { - var name = privateNames[fullName]; - - if (name) { - return name; - } - - var [type, rawName] = fullName.split(':'); - return privateNames[fullName] = (0, _utils.intern)(`${type}:${rawName}-${privateSuffix}`); - } - /* - Public API for the container is still in flux. - The public API, specified on the application namespace should be considered the stable API. - // @module container - @private - */ - -}); -define("@ember/-internals/environment/index", ["exports", "@ember/deprecated-features"], function (_exports, _deprecatedFeatures) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.getLookup = getLookup; - _exports.setLookup = setLookup; - _exports.getENV = getENV; - _exports.ENV = _exports.context = _exports.global = void 0; - - // from lodash to catch fake globals - function checkGlobal(value) { - return value && value.Object === Object ? value : undefined; - } // element ids can ruin global miss checks - - - function checkElementIdShadowing(value) { - return value && value.nodeType === undefined ? value : undefined; - } // export real global - - - var global$1 = checkGlobal(checkElementIdShadowing(typeof global === 'object' && global)) || checkGlobal(typeof self === 'object' && self) || checkGlobal(typeof window === 'object' && window) || typeof mainContext !== 'undefined' && mainContext || // set before strict mode in Ember loader/wrapper - new Function('return this')(); // eval outside of strict mode - - _exports.global = global$1; - - var context = function (global, Ember) { - return Ember === undefined ? { - imports: global, - exports: global, - lookup: global - } : { - // import jQuery - imports: Ember.imports || global, - // export Ember - exports: Ember.exports || global, - // search for Namespaces - lookup: Ember.lookup || global - }; - }(global$1, global$1.Ember); - - _exports.context = context; - - function getLookup() { - return context.lookup; - } - - function setLookup(value) { - context.lookup = value; - } - /** - The hash of environment variables used to control various configuration - settings. To specify your own or override default settings, add the - desired properties to a global hash named `EmberENV` (or `ENV` for - backwards compatibility with earlier versions of Ember). The `EmberENV` - hash must be created before loading Ember. - - @class EmberENV - @type Object - @public - */ - - - var ENV = { - ENABLE_OPTIONAL_FEATURES: false, - - /** - Determines whether Ember should add to `Array`, `Function`, and `String` - native object prototypes, a few extra methods in order to provide a more - friendly API. - We generally recommend leaving this option set to true however, if you need - to turn it off, you can add the configuration property - `EXTEND_PROTOTYPES` to `EmberENV` and set it to `false`. - Note, when disabled (the default configuration for Ember Addons), you will - instead have to access all methods and functions from the Ember - namespace. - @property EXTEND_PROTOTYPES - @type Boolean - @default true - @for EmberENV - @public - */ - EXTEND_PROTOTYPES: { - Array: true, - Function: true, - String: true - }, - - /** - The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log - a full stack trace during deprecation warnings. - @property LOG_STACKTRACE_ON_DEPRECATION - @type Boolean - @default true - @for EmberENV - @public - */ - LOG_STACKTRACE_ON_DEPRECATION: true, - - /** - The `LOG_VERSION` property, when true, tells Ember to log versions of all - dependent libraries in use. - @property LOG_VERSION - @type Boolean - @default true - @for EmberENV - @public - */ - LOG_VERSION: true, - RAISE_ON_DEPRECATION: false, - STRUCTURED_PROFILE: false, - - /** - Whether to insert a `
        ` wrapper around the - application template. See RFC #280. - This is not intended to be set directly, as the implementation may change in - the future. Use `@ember/optional-features` instead. - @property _APPLICATION_TEMPLATE_WRAPPER - @for EmberENV - @type Boolean - @default true - @private - */ - _APPLICATION_TEMPLATE_WRAPPER: true, - - /** - Whether to use Glimmer Component semantics (as opposed to the classic "Curly" - components semantics) for template-only components. See RFC #278. - This is not intended to be set directly, as the implementation may change in - the future. Use `@ember/optional-features` instead. - @property _TEMPLATE_ONLY_GLIMMER_COMPONENTS - @for EmberENV - @type Boolean - @default false - @private - */ - _TEMPLATE_ONLY_GLIMMER_COMPONENTS: false, - - /** - Whether to perform extra bookkeeping needed to make the `captureRenderTree` - API work. - This has to be set before the ember JavaScript code is evaluated. This is - usually done by setting `window.EmberENV = { _DEBUG_RENDER_TREE: true };` - before the "vendor" ` - - - - - diff --git a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/package.json b/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/package.json deleted file mode 100644 index 81538a0fb..000000000 --- a/packages/fastboot-express-middleware/test/fixtures/multivalue-headers/package.json +++ /dev/null @@ -1 +0,0 @@ -{"dependencies":{},"fastboot":{"appName":"multivalue-headers","config":{"multivalue-headers":{"APP":{"autoboot":false,"name":"multivalue-headers","version":"0.0.0+5110a671"},"EmberENV":{"EXTEND_PROTOTYPES":{"Date":false},"FEATURES":{},"_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true},"environment":"development","exportApplicationGlobal":true,"locationType":"auto","modulePrefix":"multivalue-headers","rootURL":"/"}},"manifest":{"appFiles":["assets/multivalue-headers.js","assets/multivalue-headers-fastboot.js"],"htmlFile":"index.html","vendorFiles":["assets/vendor.js","assets/auto-import-fastboot.js"]},"moduleWhitelist":[],"schemaVersion":3}} \ No newline at end of file diff --git a/packages/fastboot-express-middleware/test/middleware-test.js b/packages/fastboot-express-middleware/test/middleware-test.js index eb78eb0e3..9decf3388 100644 --- a/packages/fastboot-express-middleware/test/middleware-test.js +++ b/packages/fastboot-express-middleware/test/middleware-test.js @@ -85,43 +85,6 @@ describe('FastBoot', function() { expect(html).to.match(/Goodbye from Ember/); }); - it('it appends multivalue headers', async function() { - let middleware = fastbootMiddleware(fixture('multivalue-headers')); - server = new TestHTTPServer(middleware); - await server.start(); - - let { headers } = await server.request('/', { resolveWithFullResponse: true }); - expect(headers['x-fastboot']).to.eq('a, b, c'); - }); - - it('can pass metadata info to the app', async function() { - let middleware = fastbootMiddleware({ - distPath: fixture('app-with-metadata'), - visitOptions: { - metadata: 'Fastboot Metadata', - }, - }); - server = new TestHTTPServer(middleware); - await server.start(); - - let html = await server.request('/'); - expect(html).to.match(/Fastboot Metadata/); - }); - - // FIXME: - // TODO: - // https://github.com/ember-fastboot/ember-cli-fastboot/pull/840#issuecomment-894329631 - it.skip('works without metadata passed', async function() { - let middleware = fastbootMiddleware({ - distPath: fixture('app-with-metadata'), - }); - server = new TestHTTPServer(middleware); - await server.start(); - - let html = await server.request('/'); - expect(html).to.match(/Hello Ember!/); - }); - /* eslint-disable mocha/no-setup-in-describe */ [true, false].forEach(chunkedResponse => { describe(`when chunked response is ${chunkedResponse ? 'enabled' : 'disabled'}`, function() { diff --git a/packages/fastboot/test/fastboot-test.js b/packages/fastboot/test/fastboot-test.js index 9e79a9c11..a88a83794 100644 --- a/packages/fastboot/test/fastboot-test.js +++ b/packages/fastboot/test/fastboot-test.js @@ -337,125 +337,6 @@ describe('FastBoot', function() { }); }); - it('errors can be properly attributed with buildSandboxPerVisit=true', async function() { - this.timeout(3000); - - var fastboot = new FastBoot({ - distPath: fixture('onerror-per-visit'), - }); - - let first = fastboot.visit('/slow/100/reject', { - buildSandboxPerVisit: true, - request: { url: '/slow/100/reject', headers: {} }, - }); - - let second = fastboot.visit('/slow/50/resolve', { - buildSandboxPerVisit: true, - request: { url: '/slow/50/resolve', headers: {} }, - }); - - let third = fastboot.visit('/slow/25/resolve', { - buildSandboxPerVisit: true, - request: { url: '/slow/25/resolve', headers: {} }, - }); - - await Promise.all([second, third]); - - await first.then( - () => { - throw new Error('Visit should not resolve!'); - }, - error => { - expect(error.code).to.equal('from-slow'); - expect(error.fastbootRequestPath).to.equal('/slow/100/reject'); - } - ); - }); - - it('it eagerly builds sandbox when queue is empty', async function() { - this.timeout(3000); - - var fastboot = new FastBoot({ - distPath: fixture('onerror-per-visit'), - maxSandboxQueueSize: 2, - }); - - let first = fastboot.visit('/slow/50/resolve', { - buildSandboxPerVisit: true, - request: { url: '/slow/50/resolve', headers: {} }, - }); - - let second = fastboot.visit('/slow/50/resolve', { - buildSandboxPerVisit: true, - request: { url: '/slow/50/resolve', headers: {} }, - }); - - let third = fastboot.visit('/slow/25/resolve', { - buildSandboxPerVisit: true, - request: { url: '/slow/25/resolve', headers: {} }, - }); - - let result = await first; - let analytics = result.analytics; - expect(analytics).to.be.deep.equals({ - usedPrebuiltSandbox: true, - }); - - result = await second; - analytics = result.analytics; - expect(analytics).to.be.deep.equals({ - usedPrebuiltSandbox: true, - }); - - result = await third; - analytics = result.analytics; - expect(analytics).to.be.deep.equals({ - usedPrebuiltSandbox: false, - }); - }); - - it('it leverages sandbox from queue when present', async function() { - this.timeout(3000); - - var fastboot = new FastBoot({ - distPath: fixture('onerror-per-visit'), - maxSandboxQueueSize: 3, - }); - - let first = fastboot.visit('/slow/50/resolve', { - buildSandboxPerVisit: true, - request: { url: '/slow/50/resolve', headers: {} }, - }); - - let second = fastboot.visit('/slow/50/resolve', { - buildSandboxPerVisit: true, - request: { url: '/slow/50/resolve', headers: {} }, - }); - - let third = fastboot.visit('/slow/25/resolve', { - buildSandboxPerVisit: true, - request: { url: '/slow/25/resolve', headers: {} }, - }); - - let result = await first; - let analytics = result.analytics; - expect(analytics).to.be.deep.equals({ - usedPrebuiltSandbox: true, - }); - - result = await second; - analytics = result.analytics; - expect(analytics).to.be.deep.equals({ - usedPrebuiltSandbox: true, - }); - - result = await third; - analytics = result.analytics; - expect(analytics).to.be.deep.equals({ - usedPrebuiltSandbox: true, - }); - }); - it('htmlEntrypoint works', function() { var fastboot = new FastBoot({ distPath: fixture('html-entrypoint'), diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit-fastboot.js b/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit-fastboot.js deleted file mode 100644 index 8f292223b..000000000 --- a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit-fastboot.js +++ /dev/null @@ -1,83 +0,0 @@ -define('~fastboot/app-factory', ['onerror-per-visit/app', 'onerror-per-visit/config/environment'], function(App, config) { - App = App['default']; - config = config['default']; - - return { - 'default': function() { - return App.create(config.APP); - } - }; -}); - -define("onerror-per-visit/initializers/ajax", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - const { - get - } = Ember; - - var nodeAjax = function (options) { - let httpRegex = /^https?:\/\//; - let protocolRelativeRegex = /^\/\//; - let protocol = get(this, 'fastboot.request.protocol'); - - if (protocolRelativeRegex.test(options.url)) { - options.url = protocol + options.url; - } else if (!httpRegex.test(options.url)) { - try { - options.url = protocol + '//' + get(this, 'fastboot.request.host') + options.url; - } catch (fbError) { - throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message); - } - } - - if (najax) { - najax(options); - } else { - throw new Error('najax does not seem to be defined in your app. Did you override it via `addOrOverrideSandboxGlobals` in the fastboot server?'); - } - }; - - var _default = { - name: 'ajax-service', - initialize: function (application) { - application.register('ajax:node', nodeAjax, { - instantiate: false - }); - application.inject('adapter', '_ajaxRequest', 'ajax:node'); - application.inject('adapter', 'fastboot', 'service:fastboot'); - } - }; - _exports.default = _default; -}); -define("onerror-per-visit/initializers/error-handler", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - /** - * Initializer to attach an `onError` hook to your app running in fastboot. It catches any run loop - * exceptions and other errors and prevents the node process from crashing. - * - */ - var _default = { - name: 'error-handler', - initialize: function () { - if (!Ember.onerror) { - // if no onerror handler is defined, define one for fastboot environments - Ember.onerror = function (err) { - const errorMessage = "There was an error running your app in fastboot. More info about the error: \n ".concat(err.stack || err); - console.error(errorMessage); - }; - } - } - }; - _exports.default = _default; -});//# sourceMappingURL=onerror-per-visit-fastboot.map diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit-fastboot.map b/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit-fastboot.map deleted file mode 100644 index 3db0604fb..000000000 --- a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit-fastboot.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["app-factory.js","onerror-per-visit/initializers/ajax.js","onerror-per-visit/initializers/error-handler.js"],"sourcesContent":["define('~fastboot/app-factory', ['onerror-per-visit/app', 'onerror-per-visit/config/environment'], function(App, config) {\n App = App['default'];\n config = config['default'];\n\n return {\n 'default': function() {\n return App.create(config.APP);\n }\n };\n});\n","define(\"onerror-per-visit/initializers/ajax\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n const {\n get\n } = Ember;\n\n var nodeAjax = function (options) {\n let httpRegex = /^https?:\\/\\//;\n let protocolRelativeRegex = /^\\/\\//;\n let protocol = get(this, 'fastboot.request.protocol');\n\n if (protocolRelativeRegex.test(options.url)) {\n options.url = protocol + options.url;\n } else if (!httpRegex.test(options.url)) {\n try {\n options.url = protocol + '//' + get(this, 'fastboot.request.host') + options.url;\n } catch (fbError) {\n throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message);\n }\n }\n\n if (najax) {\n najax(options);\n } else {\n throw new Error('najax does not seem to be defined in your app. Did you override it via `addOrOverrideSandboxGlobals` in the fastboot server?');\n }\n };\n\n var _default = {\n name: 'ajax-service',\n initialize: function (application) {\n application.register('ajax:node', nodeAjax, {\n instantiate: false\n });\n application.inject('adapter', '_ajaxRequest', 'ajax:node');\n application.inject('adapter', 'fastboot', 'service:fastboot');\n }\n };\n _exports.default = _default;\n});","define(\"onerror-per-visit/initializers/error-handler\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n /**\n * Initializer to attach an `onError` hook to your app running in fastboot. It catches any run loop\n * exceptions and other errors and prevents the node process from crashing.\n *\n */\n var _default = {\n name: 'error-handler',\n initialize: function () {\n if (!Ember.onerror) {\n // if no onerror handler is defined, define one for fastboot environments\n Ember.onerror = function (err) {\n const errorMessage = \"There was an error running your app in fastboot. More info about the error: \\n \".concat(err.stack || err);\n console.error(errorMessage);\n };\n }\n }\n };\n _exports.default = _default;\n});"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACTA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC3CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"onerror-per-visit-fastboot.js"} \ No newline at end of file diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit.css b/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit.js b/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit.js deleted file mode 100644 index 483115ae3..000000000 --- a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit.js +++ /dev/null @@ -1,260 +0,0 @@ -'use strict'; - - - -;define("onerror-per-visit/app", ["exports", "onerror-per-visit/resolver", "ember-load-initializers", "onerror-per-visit/config/environment"], function (_exports, _resolver, _emberLoadInitializers, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - const App = Ember.Application.extend({ - modulePrefix: _environment.default.modulePrefix, - podModulePrefix: _environment.default.podModulePrefix, - Resolver: _resolver.default - }); - (0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix); - var _default = App; - _exports.default = _default; -}); -;define("onerror-per-visit/initializers/container-debug-adapter", ["exports", "ember-resolver/resolvers/classic/container-debug-adapter"], function (_exports, _containerDebugAdapter) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - var _default = { - name: 'container-debug-adapter', - - initialize() { - let app = arguments[1] || arguments[0]; - app.register('container-debug-adapter:main', _containerDebugAdapter.default); - app.inject('container-debug-adapter:main', 'namespace', 'application:main'); - } - - }; - _exports.default = _default; -}); -;define("onerror-per-visit/instance-initializers/clear-double-boot", ["exports", "ember-cli-fastboot/instance-initializers/clear-double-boot"], function (_exports, _clearDoubleBoot) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _clearDoubleBoot.default; - } - }); -}); -;define("onerror-per-visit/instance-initializers/setup-onerror", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.initialize = initialize; - _exports.default = void 0; - - function initialize(owner) { - let isFastBoot = typeof 'FastBoot' !== 'undefined'; - let fastbootRequestPath; - - if (isFastBoot) { - let fastbootService = owner.lookup('service:fastboot'); - debugger - fastbootRequestPath = fastbootService.request.path; - } // normally only done in prod builds, but this makes the demo easier - - - console.log('setting up error handler ' + fastbootRequestPath); - - Ember.onerror = function (error) { - if (isFastBoot) { - error.fastbootRequestPath = fastbootRequestPath; - throw error; - } - }; - } - - var _default = { - initialize - }; - _exports.default = _default; -}); -;define("onerror-per-visit/locations/none", ["exports", "ember-cli-fastboot/locations/none"], function (_exports, _none) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _none.default; - } - }); -}); -;define("onerror-per-visit/resolver", ["exports", "ember-resolver"], function (_exports, _emberResolver) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - var _default = _emberResolver.default; - _exports.default = _default; -}); -;define("onerror-per-visit/router", ["exports", "onerror-per-visit/config/environment"], function (_exports, _environment) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - const Router = Ember.Router.extend({ - location: _environment.default.locationType, - rootURL: _environment.default.rootURL - }); - Router.map(function () { - this.route('slow', { - path: '/slow/:timeout/:type' - }); - }); - var _default = Router; - _exports.default = _default; -}); -;define("onerror-per-visit/routes/application", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - var _class; - - function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; } - - let ApplicationRoute = (_class = class ApplicationRoute extends Ember.Route { - error(error) { - Ember.onerror(error); - } - - }, (_applyDecoratedDescriptor(_class.prototype, "error", [Ember._action], Object.getOwnPropertyDescriptor(_class.prototype, "error"), _class.prototype)), _class); - _exports.default = ApplicationRoute; -}); -;define("onerror-per-visit/routes/slow", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - class SlowRoute extends Ember.Route { - model({ - timeout, - type - }) { - return new Promise((resolve, reject) => { - setTimeout(() => { - if (type === 'reject') { - let error = new Error("slow route rejected after ".concat(timeout)); - error.code = 'from-slow'; - reject(error); - } else { - resolve("slow route rejected after ".concat(timeout)); - } - }, timeout); - }); - } - - } - - _exports.default = SlowRoute; -}); -;define("onerror-per-visit/services/fastboot", ["exports", "ember-cli-fastboot/services/fastboot"], function (_exports, _fastboot) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - Object.defineProperty(_exports, "default", { - enumerable: true, - get: function () { - return _fastboot.default; - } - }); -}); -;define("onerror-per-visit/templates/application", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - var _default = Ember.HTMLBars.template({ - "id": "Xv2sNAnW", - "block": "{\"symbols\":[],\"statements\":[[7,\"h2\",true],[10,\"id\",\"title\"],[8],[0,\"Welcome to Ember\"],[9],[0,\"\\n\\n\"],[1,[22,\"outlet\"],false]],\"hasEval\":false}", - "meta": { - "moduleName": "onerror-per-visit/templates/application.hbs" - } - }); - - _exports.default = _default; -}); -;define("onerror-per-visit/templates/slow", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - - var _default = Ember.HTMLBars.template({ - "id": "CjSxToP7", - "block": "{\"symbols\":[],\"statements\":[[0,\"Success!\"]],\"hasEval\":false}", - "meta": { - "moduleName": "onerror-per-visit/templates/slow.hbs" - } - }); - - _exports.default = _default; -}); -; - -;define('onerror-per-visit/config/environment', [], function() { - if (typeof FastBoot !== 'undefined') { -return FastBoot.config('onerror-per-visit'); -} else { -var prefix = 'onerror-per-visit';try { - var metaName = prefix + '/config/environment'; - var rawConfig = document.querySelector('meta[name="' + metaName + '"]').getAttribute('content'); - var config = JSON.parse(decodeURIComponent(rawConfig)); - - var exports = { 'default': config }; - - Object.defineProperty(exports, '__esModule', { value: true }); - - return exports; -} -catch(err) { - throw new Error('Could not read config from meta tag with name "' + metaName + '".'); -} - -} -}); - -; -if (typeof FastBoot === 'undefined') { - if (!runningTests) { - require('onerror-per-visit/app')['default'].create({}); - } -} - -//# sourceMappingURL=onerror-per-visit.map diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit.map b/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit.map deleted file mode 100644 index d8217f796..000000000 --- a/packages/fastboot/test/fixtures/onerror-per-visit/assets/onerror-per-visit.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["vendor/ember-cli/app-prefix.js","onerror-per-visit/app.js","onerror-per-visit/initializers/container-debug-adapter.js","onerror-per-visit/instance-initializers/clear-double-boot.js","onerror-per-visit/instance-initializers/setup-onerror.js","onerror-per-visit/locations/none.js","onerror-per-visit/resolver.js","onerror-per-visit/router.js","onerror-per-visit/routes/application.js","onerror-per-visit/routes/slow.js","onerror-per-visit/services/fastboot.js","onerror-per-visit/templates/application.js","onerror-per-visit/templates/slow.js","vendor/ember-cli/app-suffix.js","vendor/ember-cli/app-config.js","vendor/ember-cli/app-boot.js"],"sourcesContent":["'use strict';\n\n\n","define(\"onerror-per-visit/app\", [\"exports\", \"onerror-per-visit/resolver\", \"ember-load-initializers\", \"onerror-per-visit/config/environment\"], function (_exports, _resolver, _emberLoadInitializers, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n const App = Ember.Application.extend({\n modulePrefix: _environment.default.modulePrefix,\n podModulePrefix: _environment.default.podModulePrefix,\n Resolver: _resolver.default\n });\n (0, _emberLoadInitializers.default)(App, _environment.default.modulePrefix);\n var _default = App;\n _exports.default = _default;\n});","define(\"onerror-per-visit/initializers/container-debug-adapter\", [\"exports\", \"ember-resolver/resolvers/classic/container-debug-adapter\"], function (_exports, _containerDebugAdapter) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n var _default = {\n name: 'container-debug-adapter',\n\n initialize() {\n let app = arguments[1] || arguments[0];\n app.register('container-debug-adapter:main', _containerDebugAdapter.default);\n app.inject('container-debug-adapter:main', 'namespace', 'application:main');\n }\n\n };\n _exports.default = _default;\n});","define(\"onerror-per-visit/instance-initializers/clear-double-boot\", [\"exports\", \"ember-cli-fastboot/instance-initializers/clear-double-boot\"], function (_exports, _clearDoubleBoot) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _clearDoubleBoot.default;\n }\n });\n});","define(\"onerror-per-visit/instance-initializers/setup-onerror\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.initialize = initialize;\n _exports.default = void 0;\n\n function initialize(owner) {\n let isFastBoot = typeof 'FastBoot' === 'undefined';\n let fastbootRequestPath;\n\n if (isFastBoot) {\n let fastbootService = owner.lookup('service:fastboot');\n fastbootRequestPath = fastbootService.request.path;\n } // normally only done in prod builds, but this makes the demo easier\n\n\n Ember.onerror = function (error) {\n if (isFastBoot) {\n error.fastbootRequestPath = fastbootRequestPath;\n throw error;\n }\n };\n }\n\n var _default = {\n initialize\n };\n _exports.default = _default;\n});","define(\"onerror-per-visit/locations/none\", [\"exports\", \"ember-cli-fastboot/locations/none\"], function (_exports, _none) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _none.default;\n }\n });\n});","define(\"onerror-per-visit/resolver\", [\"exports\", \"ember-resolver\"], function (_exports, _emberResolver) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n var _default = _emberResolver.default;\n _exports.default = _default;\n});","define(\"onerror-per-visit/router\", [\"exports\", \"onerror-per-visit/config/environment\"], function (_exports, _environment) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n const Router = Ember.Router.extend({\n location: _environment.default.locationType,\n rootURL: _environment.default.rootURL\n });\n Router.map(function () {\n this.route('slow', {\n path: '/slow/:timeout/:type'\n });\n });\n var _default = Router;\n _exports.default = _default;\n});","define(\"onerror-per-visit/routes/application\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n var _class;\n\n function _applyDecoratedDescriptor(target, property, decorators, descriptor, context) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ('value' in desc || desc.initializer) { desc.writable = true; } desc = decorators.slice().reverse().reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; }\n\n let ApplicationRoute = (_class = class ApplicationRoute extends Ember.Route {\n error(error) {\n Ember.onerror(error);\n }\n\n }, (_applyDecoratedDescriptor(_class.prototype, \"error\", [Ember._action], Object.getOwnPropertyDescriptor(_class.prototype, \"error\"), _class.prototype)), _class);\n _exports.default = ApplicationRoute;\n});","define(\"onerror-per-visit/routes/slow\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n class SlowRoute extends Ember.Route {\n model({\n timeout,\n type\n }) {\n return new Promise((resolve, reject) => {\n setTimeout(() => {\n if (type === 'reject') {\n let error = new Error(\"slow route rejected after \".concat(timeout));\n error.code = 'from-slow';\n reject(error);\n } else {\n resolve(\"slow route rejected after \".concat(timeout));\n }\n }, timeout);\n });\n }\n\n }\n\n _exports.default = SlowRoute;\n});","define(\"onerror-per-visit/services/fastboot\", [\"exports\", \"ember-cli-fastboot/services/fastboot\"], function (_exports, _fastboot) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n Object.defineProperty(_exports, \"default\", {\n enumerable: true,\n get: function () {\n return _fastboot.default;\n }\n });\n});","define(\"onerror-per-visit/templates/application\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n var _default = Ember.HTMLBars.template({\n \"id\": \"Xv2sNAnW\",\n \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[7,\\\"h2\\\",true],[10,\\\"id\\\",\\\"title\\\"],[8],[0,\\\"Welcome to Ember\\\"],[9],[0,\\\"\\\\n\\\\n\\\"],[1,[22,\\\"outlet\\\"],false]],\\\"hasEval\\\":false}\",\n \"meta\": {\n \"moduleName\": \"onerror-per-visit/templates/application.hbs\"\n }\n });\n\n _exports.default = _default;\n});","define(\"onerror-per-visit/templates/slow\", [\"exports\"], function (_exports) {\n \"use strict\";\n\n Object.defineProperty(_exports, \"__esModule\", {\n value: true\n });\n _exports.default = void 0;\n\n var _default = Ember.HTMLBars.template({\n \"id\": \"CjSxToP7\",\n \"block\": \"{\\\"symbols\\\":[],\\\"statements\\\":[[0,\\\"Success!\\\"]],\\\"hasEval\\\":false}\",\n \"meta\": {\n \"moduleName\": \"onerror-per-visit/templates/slow.hbs\"\n }\n });\n\n _exports.default = _default;\n});","\n","define('onerror-per-visit/config/environment', [], function() {\n if (typeof FastBoot !== 'undefined') {\nreturn FastBoot.config('onerror-per-visit');\n} else {\nvar prefix = 'onerror-per-visit';try {\n var metaName = prefix + '/config/environment';\n var rawConfig = document.querySelector('meta[name=\"' + metaName + '\"]').getAttribute('content');\n var config = JSON.parse(decodeURIComponent(rawConfig));\n\n var exports = { 'default': config };\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n return exports;\n}\ncatch(err) {\n throw new Error('Could not read config from meta tag with name \"' + metaName + '\".');\n}\n\n}\n});\n","\nif (typeof FastBoot === 'undefined') {\n if (!runningTests) {\n require('onerror-per-visit/app')['default'].create({});\n }\n}\n\n"],"names":[],"mappings":"AAAA;AACA;AACA;;ACFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACdA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AClBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AC5BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AChBA;;ACAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;ACpBA;AACA;AACA;AACA;AACA;AACA;AACA;","file":"onerror-per-visit.js"} \ No newline at end of file diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/assets/vendor.css b/packages/fastboot/test/fixtures/onerror-per-visit/assets/vendor.css deleted file mode 100644 index e69de29bb..000000000 diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/assets/vendor.js b/packages/fastboot/test/fixtures/onerror-per-visit/assets/vendor.js deleted file mode 100644 index 3c0afa1fc..000000000 --- a/packages/fastboot/test/fixtures/onerror-per-visit/assets/vendor.js +++ /dev/null @@ -1,66038 +0,0 @@ -window.EmberENV = {"FEATURES":{},"EXTEND_PROTOTYPES":{"Date":false},"_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true}; -var runningTests = false; - - - -;var loader, define, requireModule, require, requirejs; - -(function (global) { - 'use strict'; - - function dict() { - var obj = Object.create(null); - obj['__'] = undefined; - delete obj['__']; - return obj; - } - - // Save off the original values of these globals, so we can restore them if someone asks us to - var oldGlobals = { - loader: loader, - define: define, - requireModule: requireModule, - require: require, - requirejs: requirejs - }; - - requirejs = require = requireModule = function (id) { - var pending = []; - var mod = findModule(id, '(require)', pending); - - for (var i = pending.length - 1; i >= 0; i--) { - pending[i].exports(); - } - - return mod.module.exports; - }; - - loader = { - noConflict: function (aliases) { - var oldName, newName; - - for (oldName in aliases) { - if (aliases.hasOwnProperty(oldName)) { - if (oldGlobals.hasOwnProperty(oldName)) { - newName = aliases[oldName]; - - global[newName] = global[oldName]; - global[oldName] = oldGlobals[oldName]; - } - } - } - }, - // Option to enable or disable the generation of default exports - makeDefaultExport: true - }; - - var registry = dict(); - var seen = dict(); - - var uuid = 0; - - function unsupportedModule(length) { - throw new Error('an unsupported module was defined, expected `define(id, deps, module)` instead got: `' + length + '` arguments to define`'); - } - - var defaultDeps = ['require', 'exports', 'module']; - - function Module(id, deps, callback, alias) { - this.uuid = uuid++; - this.id = id; - this.deps = !deps.length && callback.length ? defaultDeps : deps; - this.module = { exports: {} }; - this.callback = callback; - this.hasExportsAsDep = false; - this.isAlias = alias; - this.reified = new Array(deps.length); - - /* - Each module normally passes through these states, in order: - new : initial state - pending : this module is scheduled to be executed - reifying : this module's dependencies are being executed - reified : this module's dependencies finished executing successfully - errored : this module's dependencies failed to execute - finalized : this module executed successfully - */ - this.state = 'new'; - } - - Module.prototype.makeDefaultExport = function () { - var exports = this.module.exports; - if (exports !== null && (typeof exports === 'object' || typeof exports === 'function') && exports['default'] === undefined && Object.isExtensible(exports)) { - exports['default'] = exports; - } - }; - - Module.prototype.exports = function () { - // if finalized, there is no work to do. If reifying, there is a - // circular dependency so we must return our (partial) exports. - if (this.state === 'finalized' || this.state === 'reifying') { - return this.module.exports; - } - - - if (loader.wrapModules) { - this.callback = loader.wrapModules(this.id, this.callback); - } - - this.reify(); - - var result = this.callback.apply(this, this.reified); - this.reified.length = 0; - this.state = 'finalized'; - - if (!(this.hasExportsAsDep && result === undefined)) { - this.module.exports = result; - } - if (loader.makeDefaultExport) { - this.makeDefaultExport(); - } - return this.module.exports; - }; - - Module.prototype.unsee = function () { - this.state = 'new'; - this.module = { exports: {} }; - }; - - Module.prototype.reify = function () { - if (this.state === 'reified') { - return; - } - this.state = 'reifying'; - try { - this.reified = this._reify(); - this.state = 'reified'; - } finally { - if (this.state === 'reifying') { - this.state = 'errored'; - } - } - }; - - Module.prototype._reify = function () { - var reified = this.reified.slice(); - for (var i = 0; i < reified.length; i++) { - var mod = reified[i]; - reified[i] = mod.exports ? mod.exports : mod.module.exports(); - } - return reified; - }; - - Module.prototype.findDeps = function (pending) { - if (this.state !== 'new') { - return; - } - - this.state = 'pending'; - - var deps = this.deps; - - for (var i = 0; i < deps.length; i++) { - var dep = deps[i]; - var entry = this.reified[i] = { exports: undefined, module: undefined }; - if (dep === 'exports') { - this.hasExportsAsDep = true; - entry.exports = this.module.exports; - } else if (dep === 'require') { - entry.exports = this.makeRequire(); - } else if (dep === 'module') { - entry.exports = this.module; - } else { - entry.module = findModule(resolve(dep, this.id), this.id, pending); - } - } - }; - - Module.prototype.makeRequire = function () { - var id = this.id; - var r = function (dep) { - return require(resolve(dep, id)); - }; - r['default'] = r; - r.moduleId = id; - r.has = function (dep) { - return has(resolve(dep, id)); - }; - return r; - }; - - define = function (id, deps, callback) { - var module = registry[id]; - - // If a module for this id has already been defined and is in any state - // other than `new` (meaning it has been or is currently being required), - // then we return early to avoid redefinition. - if (module && module.state !== 'new') { - return; - } - - if (arguments.length < 2) { - unsupportedModule(arguments.length); - } - - if (!Array.isArray(deps)) { - callback = deps; - deps = []; - } - - if (callback instanceof Alias) { - registry[id] = new Module(callback.id, deps, callback, true); - } else { - registry[id] = new Module(id, deps, callback, false); - } - }; - - define.exports = function (name, defaultExport) { - var module = registry[name]; - - // If a module for this name has already been defined and is in any state - // other than `new` (meaning it has been or is currently being required), - // then we return early to avoid redefinition. - if (module && module.state !== 'new') { - return; - } - - module = new Module(name, [], noop, null); - module.module.exports = defaultExport; - module.state = 'finalized'; - registry[name] = module; - - return module; - }; - - function noop() {} - // we don't support all of AMD - // define.amd = {}; - - function Alias(id) { - this.id = id; - } - - define.alias = function (id, target) { - if (arguments.length === 2) { - return define(target, new Alias(id)); - } - - return new Alias(id); - }; - - function missingModule(id, referrer) { - throw new Error('Could not find module `' + id + '` imported from `' + referrer + '`'); - } - - function findModule(id, referrer, pending) { - var mod = registry[id] || registry[id + '/index']; - - while (mod && mod.isAlias) { - mod = registry[mod.id] || registry[mod.id + '/index']; - } - - if (!mod) { - missingModule(id, referrer); - } - - if (pending && mod.state !== 'pending' && mod.state !== 'finalized') { - mod.findDeps(pending); - pending.push(mod); - } - return mod; - } - - function resolve(child, id) { - if (child.charAt(0) !== '.') { - return child; - } - - - var parts = child.split('/'); - var nameParts = id.split('/'); - var parentBase = nameParts.slice(0, -1); - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i]; - - if (part === '..') { - if (parentBase.length === 0) { - throw new Error('Cannot access parent module of root'); - } - parentBase.pop(); - } else if (part === '.') { - continue; - } else { - parentBase.push(part); - } - } - - return parentBase.join('/'); - } - - function has(id) { - return !!(registry[id] || registry[id + '/index']); - } - - requirejs.entries = requirejs._eak_seen = registry; - requirejs.has = has; - requirejs.unsee = function (id) { - findModule(id, '(unsee)', false).unsee(); - }; - - requirejs.clear = function () { - requirejs.entries = requirejs._eak_seen = registry = dict(); - seen = dict(); - }; - - // This code primes the JS engine for good performance by warming the - // JIT compiler for these functions. - define('foo', function () {}); - define('foo/bar', [], function () {}); - define('foo/asdf', ['module', 'exports', 'require'], function (module, exports, require) { - if (require.has('foo/bar')) { - require('foo/bar'); - } - }); - define('foo/baz', [], define.alias('foo')); - define('foo/quz', define.alias('foo')); - define.alias('foo', 'foo/qux'); - define('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function () {}); - define('foo/main', ['foo/bar'], function () {}); - define.exports('foo/exports', {}); - - require('foo/exports'); - require('foo/main'); - require.unsee('foo/bar'); - - requirejs.clear(); - - if (typeof exports === 'object' && typeof module === 'object' && module.exports) { - module.exports = { require: require, define: define }; - } -})(this); -;(function() { -/*! - * @overview Ember - JavaScript Application Framework - * @copyright Copyright 2011-2019 Tilde Inc. and contributors - * Portions Copyright 2006-2011 Strobe Inc. - * Portions Copyright 2008-2011 Apple Inc. All rights reserved. - * @license Licensed under MIT license - * See https://raw.github.com/emberjs/ember.js/master/LICENSE - * @version 3.14.1 - */ - -/*globals process */ -let define, require, Ember; - -// Used in @ember/-internals/environment/lib/global.js -mainContext = this; // eslint-disable-line no-undef - -(function() { - let registry; - let seen; - - function missingModule(name, referrerName) { - if (referrerName) { - throw new Error('Could not find module ' + name + ' required by: ' + referrerName); - } else { - throw new Error('Could not find module ' + name); - } - } - - function internalRequire(_name, referrerName) { - let name = _name; - let mod = registry[name]; - - if (!mod) { - name = name + '/index'; - mod = registry[name]; - } - - let exports = seen[name]; - - if (exports !== undefined) { - return exports; - } - - exports = seen[name] = {}; - - if (!mod) { - missingModule(_name, referrerName); - } - - let deps = mod.deps; - let callback = mod.callback; - let reified = new Array(deps.length); - - for (let i = 0; i < deps.length; i++) { - if (deps[i] === 'exports') { - reified[i] = exports; - } else if (deps[i] === 'require') { - reified[i] = require; - } else { - reified[i] = internalRequire(deps[i], name); - } - } - - callback.apply(this, reified); - - return exports; - } - - let isNode = - typeof window === 'undefined' && - typeof process !== 'undefined' && - {}.toString.call(process) === '[object process]'; - - if (!isNode) { - Ember = this.Ember = this.Ember || {}; - } - - if (typeof Ember === 'undefined') { - Ember = {}; - } - - if (typeof Ember.__loader === 'undefined') { - registry = Object.create(null); - seen = Object.create(null); - - define = function(name, deps, callback) { - let value = {}; - - if (!callback) { - value.deps = []; - value.callback = deps; - } else { - value.deps = deps; - value.callback = callback; - } - - registry[name] = value; - }; - - require = function(name) { - return internalRequire(name, null); - }; - - // setup `require` module - require['default'] = require; - - require.has = function registryHas(moduleName) { - return Boolean(registry[moduleName]) || Boolean(registry[moduleName + '/index']); - }; - - require._eak_seen = registry; - - Ember.__loader = { - define: define, - require: require, - registry: registry, - }; - } else { - define = Ember.__loader.define; - require = Ember.__loader.require; - } -})(); - -define("@ember/-internals/browser-environment/index", ["exports"], function (_exports) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.hasDOM = _exports.isFirefox = _exports.isChrome = _exports.userAgent = _exports.history = _exports.location = _exports.window = void 0; - // check if window exists and actually is the global - var hasDom = typeof self === 'object' && self !== null && self.Object === Object && typeof Window !== 'undefined' && self.constructor === Window && typeof document === 'object' && document !== null && self.document === document && typeof location === 'object' && location !== null && self.location === location && typeof history === 'object' && history !== null && self.history === history && typeof navigator === 'object' && navigator !== null && self.navigator === navigator && typeof navigator.userAgent === 'string'; - _exports.hasDOM = hasDom; - var window = hasDom ? self : null; - _exports.window = window; - var location$1 = hasDom ? self.location : null; - _exports.location = location$1; - var history$1 = hasDom ? self.history : null; - _exports.history = history$1; - var userAgent = hasDom ? self.navigator.userAgent : 'Lynx (textmode)'; - _exports.userAgent = userAgent; - var isChrome = hasDom ? Boolean(window.chrome) && !window.opera : false; - _exports.isChrome = isChrome; - var isFirefox = hasDom ? typeof InstallTrigger !== 'undefined' : false; - _exports.isFirefox = isFirefox; -}); -define("@ember/-internals/console/index", ["exports", "@ember/debug", "@ember/deprecated-features"], function (_exports, _debug, _deprecatedFeatures) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.default = void 0; - // Deliver message that the function is deprecated - var DEPRECATION_MESSAGE = 'Use of Ember.Logger is deprecated. Please use `console` for logging.'; - var DEPRECATION_ID = 'ember-console.deprecate-logger'; - var DEPRECATION_URL = 'https://emberjs.com/deprecations/v3.x#toc_use-console-rather-than-ember-logger'; - /** - @module ember - */ - - /** - Inside Ember-Metal, simply uses the methods from `imports.console`. - Override this to provide more robust logging functionality. - - @class Logger - @deprecated Use 'console' instead - - @namespace Ember - @public - */ - - var DEPRECATED_LOGGER; - - if (_deprecatedFeatures.LOGGER) { - DEPRECATED_LOGGER = { - /** - Logs the arguments to the console. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.log('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method log - @for Ember.Logger - @param {*} arguments - @public - */ - log() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.log(...arguments); // eslint-disable-line no-console - }, - - /** - Prints the arguments to the console with a warning icon. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - Ember.Logger.warn('Something happened!'); - // "Something happened!" will be printed to the console with a warning icon. - ``` - @method warn - @for Ember.Logger - @param {*} arguments - @public - */ - warn() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.warn(...arguments); // eslint-disable-line no-console - }, - - /** - Prints the arguments to the console with an error icon, red text and a stack trace. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - Ember.Logger.error('Danger! Danger!'); - // "Danger! Danger!" will be printed to the console in red text. - ``` - @method error - @for Ember.Logger - @param {*} arguments - @public - */ - error() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.error(...arguments); // eslint-disable-line no-console - }, - - /** - Logs the arguments to the console. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.info('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method info - @for Ember.Logger - @param {*} arguments - @public - */ - info() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.info(...arguments); // eslint-disable-line no-console - }, - - /** - Logs the arguments to the console in blue text. - You can pass as many arguments as you want and they will be joined together with a space. - ```javascript - var foo = 1; - Ember.Logger.debug('log value of foo:', foo); - // "log value of foo: 1" will be printed to the console - ``` - @method debug - @for Ember.Logger - @param {*} arguments - @public - */ - debug() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - /* eslint-disable no-console */ - - if (console.debug) { - return console.debug(...arguments); - } - - return console.info(...arguments); - /* eslint-enable no-console */ - }, - - /** - If the value passed into `Ember.Logger.assert` is not truthy it will throw an error with a stack trace. - ```javascript - Ember.Logger.assert(true); // undefined - Ember.Logger.assert(true === false); // Throws an Assertion failed error. - Ember.Logger.assert(true === false, 'Something invalid'); // Throws an Assertion failed error with message. - ``` - @method assert - @for Ember.Logger - @param {Boolean} bool Value to test - @param {String} message Assertion message on failed - @public - */ - assert() { - (true && !(false) && (0, _debug.deprecate)(DEPRECATION_MESSAGE, false, { - id: DEPRECATION_ID, - until: '4.0.0', - url: DEPRECATION_URL - })); - return console.assert(...arguments); // eslint-disable-line no-console - } - - }; - } - - var _default = DEPRECATED_LOGGER; - _exports.default = _default; -}); -define("@ember/-internals/container/index", ["exports", "@ember/-internals/owner", "@ember/-internals/utils", "@ember/debug", "@ember/polyfills"], function (_exports, _owner, _utils, _debug, _polyfills) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.privatize = privatize; - _exports.FACTORY_FOR = _exports.Container = _exports.Registry = void 0; - var leakTracking; - var containers; - - if (true - /* DEBUG */ - ) { - // requires v8 - // chrome --js-flags="--allow-natives-syntax --expose-gc" - // node --allow-natives-syntax --expose-gc - try { - if (typeof gc === 'function') { - leakTracking = (() => { - // avoid syntax errors when --allow-natives-syntax not present - var GetWeakSetValues = new Function('weakSet', 'return %GetWeakSetValues(weakSet, 0)'); - containers = new WeakSet(); - return { - hasContainers() { - gc(); - return GetWeakSetValues(containers).length > 0; - }, - - reset() { - var values = GetWeakSetValues(containers); - - for (var i = 0; i < values.length; i++) { - containers.delete(values[i]); - } - } - - }; - })(); - } - } catch (e) {// ignore - } - } - /** - A container used to instantiate and cache objects. - - Every `Container` must be associated with a `Registry`, which is referenced - to determine the factory and options that should be used to instantiate - objects. - - The public API for `Container` is still in flux and should not be considered - stable. - - @private - @class Container - */ - - - class Container { - constructor(registry, options = {}) { - this.registry = registry; - this.owner = options.owner || null; - this.cache = (0, _utils.dictionary)(options.cache || null); - this.factoryManagerCache = (0, _utils.dictionary)(options.factoryManagerCache || null); - this.isDestroyed = false; - this.isDestroying = false; - - if (true - /* DEBUG */ - ) { - this.validationCache = (0, _utils.dictionary)(options.validationCache || null); - - if (containers !== undefined) { - containers.add(this); - } - } - } - /** - @private - @property registry - @type Registry - @since 1.11.0 - */ - - /** - @private - @property cache - @type InheritingDict - */ - - /** - @private - @property validationCache - @type InheritingDict - */ - - /** - Given a fullName return a corresponding instance. - The default behavior is for lookup to return a singleton instance. - The singleton is scoped to the container, allowing multiple containers - to all have their own locally scoped singletons. - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('api:twitter', Twitter); - let twitter = container.lookup('api:twitter'); - twitter instanceof Twitter; // => true - // by default the container will return singletons - let twitter2 = container.lookup('api:twitter'); - twitter2 instanceof Twitter; // => true - twitter === twitter2; //=> true - ``` - If singletons are not wanted, an optional flag can be provided at lookup. - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('api:twitter', Twitter); - let twitter = container.lookup('api:twitter', { singleton: false }); - let twitter2 = container.lookup('api:twitter', { singleton: false }); - twitter === twitter2; //=> false - ``` - @private - @method lookup - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] The fullname of the request source (used for local lookup) - @return {any} - */ - - - lookup(fullName, options) { - (true && !(!this.isDestroyed) && (0, _debug.assert)('expected container not to be destroyed', !this.isDestroyed)); - (true && !(this.registry.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(fullName))); - return lookup(this, this.registry.normalize(fullName), options); - } - /** - A depth first traversal, destroying the container, its descendant containers and all - their managed objects. - @private - @method destroy - */ - - - destroy() { - destroyDestroyables(this); - this.isDestroying = true; - } - - finalizeDestroy() { - resetCache(this); - this.isDestroyed = true; - } - /** - Clear either the entire cache or just the cache for a particular key. - @private - @method reset - @param {String} fullName optional key to reset; if missing, resets everything - */ - - - reset(fullName) { - if (this.isDestroyed) return; - - if (fullName === undefined) { - destroyDestroyables(this); - resetCache(this); - } else { - resetMember(this, this.registry.normalize(fullName)); - } - } - /** - Returns an object that can be used to provide an owner to a - manually created instance. - @private - @method ownerInjection - @returns { Object } - */ - - - ownerInjection() { - return { - [_owner.OWNER]: this.owner - }; - } - /** - Given a fullName, return the corresponding factory. The consumer of the factory - is responsible for the destruction of any factory instances, as there is no - way for the container to ensure instances are destroyed when it itself is - destroyed. - @public - @method factoryFor - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] The fullname of the request source (used for local lookup) - @return {any} - */ - - - factoryFor(fullName, options = {}) { - (true && !(!this.isDestroyed) && (0, _debug.assert)('expected container not to be destroyed', !this.isDestroyed)); - var normalizedName = this.registry.normalize(fullName); - (true && !(this.registry.isValidFullName(normalizedName)) && (0, _debug.assert)('fullName must be a proper full name', this.registry.isValidFullName(normalizedName))); - (true && !(false - /* EMBER_MODULE_UNIFICATION */ - || !options.namespace) && (0, _debug.assert)('EMBER_MODULE_UNIFICATION must be enabled to pass a namespace option to factoryFor', false || !options.namespace)); - - if (options.source || options.namespace) { - normalizedName = this.registry.expandLocalLookup(fullName, options); - - if (!normalizedName) { - return; - } - } - - return factoryFor(this, normalizedName, fullName); - } - - } - - _exports.Container = Container; - - if (true - /* DEBUG */ - ) { - Container._leakTracking = leakTracking; - } - /* - * Wrap a factory manager in a proxy which will not permit properties to be - * set on the manager. - */ - - - function wrapManagerInDeprecationProxy(manager) { - if (_utils.HAS_NATIVE_PROXY) { - var validator = { - set(_obj, prop) { - throw new Error("You attempted to set \"" + prop + "\" on a factory manager created by container#factoryFor. A factory manager is a read-only construct."); - } - - }; // Note: - // We have to proxy access to the manager here so that private property - // access doesn't cause the above errors to occur. - - var m = manager; - var proxiedManager = { - class: m.class, - - create(props) { - return m.create(props); - } - - }; - var proxy = new Proxy(proxiedManager, validator); - FACTORY_FOR.set(proxy, manager); - } - - return manager; - } - - function isSingleton(container, fullName) { - return container.registry.getOption(fullName, 'singleton') !== false; - } - - function isInstantiatable(container, fullName) { - return container.registry.getOption(fullName, 'instantiate') !== false; - } - - function lookup(container, fullName, options = {}) { - (true && !(false - /* EMBER_MODULE_UNIFICATION */ - || !options.namespace) && (0, _debug.assert)('EMBER_MODULE_UNIFICATION must be enabled to pass a namespace option to lookup', false || !options.namespace)); - var normalizedName = fullName; - - if (options.source || options.namespace) { - normalizedName = container.registry.expandLocalLookup(fullName, options); - - if (!normalizedName) { - return; - } - } - - if (options.singleton !== false) { - var cached = container.cache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - } - - return instantiateFactory(container, normalizedName, fullName, options); - } - - function factoryFor(container, normalizedName, fullName) { - var cached = container.factoryManagerCache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - - var factory = container.registry.resolve(normalizedName); - - if (factory === undefined) { - return; - } - - if (true - /* DEBUG */ - && factory && typeof factory._onLookup === 'function') { - factory._onLookup(fullName); - } - - var manager = new FactoryManager(container, factory, fullName, normalizedName); - - if (true - /* DEBUG */ - ) { - manager = wrapManagerInDeprecationProxy(manager); - } - - container.factoryManagerCache[normalizedName] = manager; - return manager; - } - - function isSingletonClass(container, fullName, { - instantiate, - singleton - }) { - return singleton !== false && !instantiate && isSingleton(container, fullName) && !isInstantiatable(container, fullName); - } - - function isSingletonInstance(container, fullName, { - instantiate, - singleton - }) { - return singleton !== false && instantiate !== false && isSingleton(container, fullName) && isInstantiatable(container, fullName); - } - - function isFactoryClass(container, fullname, { - instantiate, - singleton - }) { - return instantiate === false && (singleton === false || !isSingleton(container, fullname)) && !isInstantiatable(container, fullname); - } - - function isFactoryInstance(container, fullName, { - instantiate, - singleton - }) { - return instantiate !== false && (singleton !== false || isSingleton(container, fullName)) && isInstantiatable(container, fullName); - } - - function instantiateFactory(container, normalizedName, fullName, options) { - var factoryManager = factoryFor(container, normalizedName, fullName); - - if (factoryManager === undefined) { - return; - } // SomeClass { singleton: true, instantiate: true } | { singleton: true } | { instantiate: true } | {} - // By default majority of objects fall into this case - - - if (isSingletonInstance(container, fullName, options)) { - return container.cache[normalizedName] = factoryManager.create(); - } // SomeClass { singleton: false, instantiate: true } - - - if (isFactoryInstance(container, fullName, options)) { - return factoryManager.create(); - } // SomeClass { singleton: true, instantiate: false } | { instantiate: false } | { singleton: false, instantiation: false } - - - if (isSingletonClass(container, fullName, options) || isFactoryClass(container, fullName, options)) { - return factoryManager.class; - } - - throw new Error('Could not create factory'); - } - - function processInjections(container, injections, result) { - if (true - /* DEBUG */ - ) { - container.registry.validateInjections(injections); - } - - var hash = result.injections; - - if (hash === undefined) { - hash = result.injections = {}; - } - - for (var i = 0; i < injections.length; i++) { - var { - property, - specifier, - source - } = injections[i]; - - if (source) { - hash[property] = lookup(container, specifier, { - source - }); - } else { - hash[property] = lookup(container, specifier); - } - - if (!result.isDynamic) { - result.isDynamic = !isSingleton(container, specifier); - } - } - } - - function buildInjections(container, typeInjections, injections) { - var result = { - injections: undefined, - isDynamic: false - }; - - if (typeInjections !== undefined) { - processInjections(container, typeInjections, result); - } - - if (injections !== undefined) { - processInjections(container, injections, result); - } - - return result; - } - - function injectionsFor(container, fullName) { - var registry = container.registry; - var [type] = fullName.split(':'); - var typeInjections = registry.getTypeInjections(type); - var injections = registry.getInjections(fullName); - return buildInjections(container, typeInjections, injections); - } - - function destroyDestroyables(container) { - var cache = container.cache; - var keys = Object.keys(cache); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var value = cache[key]; - - if (value.destroy) { - value.destroy(); - } - } - } - - function resetCache(container) { - container.cache = (0, _utils.dictionary)(null); - container.factoryManagerCache = (0, _utils.dictionary)(null); - } - - function resetMember(container, fullName) { - var member = container.cache[fullName]; - delete container.factoryManagerCache[fullName]; - - if (member) { - delete container.cache[fullName]; - - if (member.destroy) { - member.destroy(); - } - } - } - - var FACTORY_FOR = new WeakMap(); - _exports.FACTORY_FOR = FACTORY_FOR; - - class FactoryManager { - constructor(container, factory, fullName, normalizedName) { - this.container = container; - this.owner = container.owner; - this.class = factory; - this.fullName = fullName; - this.normalizedName = normalizedName; - this.madeToString = undefined; - this.injections = undefined; - FACTORY_FOR.set(this, this); - } - - toString() { - if (this.madeToString === undefined) { - this.madeToString = this.container.registry.makeToString(this.class, this.fullName); - } - - return this.madeToString; - } - - create(options) { - var injectionsCache = this.injections; - - if (injectionsCache === undefined) { - var { - injections, - isDynamic - } = injectionsFor(this.container, this.normalizedName); - injectionsCache = injections; - - if (!isDynamic) { - this.injections = injections; - } - } - - var props = injectionsCache; - - if (options !== undefined) { - props = (0, _polyfills.assign)({}, injectionsCache, options); - } - - if (true - /* DEBUG */ - ) { - var lazyInjections; - var validationCache = this.container.validationCache; // Ensure that all lazy injections are valid at instantiation time - - if (!validationCache[this.fullName] && this.class && typeof this.class._lazyInjections === 'function') { - lazyInjections = this.class._lazyInjections(); - lazyInjections = this.container.registry.normalizeInjectionsHash(lazyInjections); - this.container.registry.validateInjections(lazyInjections); - } - - validationCache[this.fullName] = true; - } - - if (!this.class.create) { - throw new Error("Failed to create an instance of '" + this.normalizedName + "'. Most likely an improperly defined class or an invalid module export."); - } // required to allow access to things like - // the customized toString, _debugContainerKey, - // owner, etc. without a double extend and without - // modifying the objects properties - - - if (typeof this.class._initFactory === 'function') { - this.class._initFactory(this); - } else { - // in the non-EmberObject case we need to still setOwner - // this is required for supporting glimmer environment and - // template instantiation which rely heavily on - // `options[OWNER]` being passed into `create` - // TODO: clean this up, and remove in future versions - if (options === undefined || props === undefined) { - // avoid mutating `props` here since they are the cached injections - props = (0, _polyfills.assign)({}, props); - } - - (0, _owner.setOwner)(props, this.owner); - } - - var instance = this.class.create(props); - FACTORY_FOR.set(instance, this); - return instance; - } - - } - - var VALID_FULL_NAME_REGEXP = /^[^:]+:[^:]+$/; - /** - A registry used to store factory and option information keyed - by type. - - A `Registry` stores the factory and option information needed by a - `Container` to instantiate and cache objects. - - The API for `Registry` is still in flux and should not be considered stable. - - @private - @class Registry - @since 1.11.0 - */ - - class Registry { - constructor(options = {}) { - this.fallback = options.fallback || null; - this.resolver = options.resolver || null; - this.registrations = (0, _utils.dictionary)(options.registrations || null); - this._typeInjections = (0, _utils.dictionary)(null); - this._injections = (0, _utils.dictionary)(null); - this._localLookupCache = Object.create(null); - this._normalizeCache = (0, _utils.dictionary)(null); - this._resolveCache = (0, _utils.dictionary)(null); - this._failSet = new Set(); - this._options = (0, _utils.dictionary)(null); - this._typeOptions = (0, _utils.dictionary)(null); - } - /** - A backup registry for resolving registrations when no matches can be found. - @private - @property fallback - @type Registry - */ - - /** - An object that has a `resolve` method that resolves a name. - @private - @property resolver - @type Resolver - */ - - /** - @private - @property registrations - @type InheritingDict - */ - - /** - @private - @property _typeInjections - @type InheritingDict - */ - - /** - @private - @property _injections - @type InheritingDict - */ - - /** - @private - @property _normalizeCache - @type InheritingDict - */ - - /** - @private - @property _resolveCache - @type InheritingDict - */ - - /** - @private - @property _options - @type InheritingDict - */ - - /** - @private - @property _typeOptions - @type InheritingDict - */ - - /** - Creates a container based on this registry. - @private - @method container - @param {Object} options - @return {Container} created container - */ - - - container(options) { - return new Container(this, options); - } - /** - Registers a factory for later injection. - Example: - ```javascript - let registry = new Registry(); - registry.register('model:user', Person, {singleton: false }); - registry.register('fruit:favorite', Orange); - registry.register('communication:main', Email, {singleton: false}); - ``` - @private - @method register - @param {String} fullName - @param {Function} factory - @param {Object} options - */ - - - register(fullName, factory, options = {}) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - (true && !(factory !== undefined) && (0, _debug.assert)("Attempting to register an unknown factory: '" + fullName + "'", factory !== undefined)); - var normalizedName = this.normalize(fullName); - (true && !(!this._resolveCache[normalizedName]) && (0, _debug.assert)("Cannot re-register: '" + fullName + "', as it has already been resolved.", !this._resolveCache[normalizedName])); - - this._failSet.delete(normalizedName); - - this.registrations[normalizedName] = factory; - this._options[normalizedName] = options; - } - /** - Unregister a fullName - ```javascript - let registry = new Registry(); - registry.register('model:user', User); - registry.resolve('model:user').create() instanceof User //=> true - registry.unregister('model:user') - registry.resolve('model:user') === undefined //=> true - ``` - @private - @method unregister - @param {String} fullName - */ - - - unregister(fullName) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var normalizedName = this.normalize(fullName); - this._localLookupCache = Object.create(null); - delete this.registrations[normalizedName]; - delete this._resolveCache[normalizedName]; - delete this._options[normalizedName]; - - this._failSet.delete(normalizedName); - } - /** - Given a fullName return the corresponding factory. - By default `resolve` will retrieve the factory from - the registry. - ```javascript - let registry = new Registry(); - registry.register('api:twitter', Twitter); - registry.resolve('api:twitter') // => Twitter - ``` - Optionally the registry can be provided with a custom resolver. - If provided, `resolve` will first provide the custom resolver - the opportunity to resolve the fullName, otherwise it will fallback - to the registry. - ```javascript - let registry = new Registry(); - registry.resolver = function(fullName) { - // lookup via the module system of choice - }; - // the twitter factory is added to the module system - registry.resolve('api:twitter') // => Twitter - ``` - @private - @method resolve - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {Function} fullName's factory - */ - - - resolve(fullName, options) { - var factory = resolve(this, this.normalize(fullName), options); - - if (factory === undefined && this.fallback !== null) { - factory = this.fallback.resolve(...arguments); - } - - return factory; - } - /** - A hook that can be used to describe how the resolver will - attempt to find the factory. - For example, the default Ember `.describe` returns the full - class name (including namespace) where Ember's resolver expects - to find the `fullName`. - @private - @method describe - @param {String} fullName - @return {string} described fullName - */ - - - describe(fullName) { - if (this.resolver !== null && this.resolver.lookupDescription) { - return this.resolver.lookupDescription(fullName); - } else if (this.fallback !== null) { - return this.fallback.describe(fullName); - } else { - return fullName; - } - } - /** - A hook to enable custom fullName normalization behavior - @private - @method normalizeFullName - @param {String} fullName - @return {string} normalized fullName - */ - - - normalizeFullName(fullName) { - if (this.resolver !== null && this.resolver.normalize) { - return this.resolver.normalize(fullName); - } else if (this.fallback !== null) { - return this.fallback.normalizeFullName(fullName); - } else { - return fullName; - } - } - /** - Normalize a fullName based on the application's conventions - @private - @method normalize - @param {String} fullName - @return {string} normalized fullName - */ - - - normalize(fullName) { - return this._normalizeCache[fullName] || (this._normalizeCache[fullName] = this.normalizeFullName(fullName)); - } - /** - @method makeToString - @private - @param {any} factory - @param {string} fullName - @return {function} toString function - */ - - - makeToString(factory, fullName) { - if (this.resolver !== null && this.resolver.makeToString) { - return this.resolver.makeToString(factory, fullName); - } else if (this.fallback !== null) { - return this.fallback.makeToString(factory, fullName); - } else { - return factory.toString(); - } - } - /** - Given a fullName check if the container is aware of its factory - or singleton instance. - @private - @method has - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {Boolean} - */ - - - has(fullName, options) { - if (!this.isValidFullName(fullName)) { - return false; - } - - var source = options && options.source && this.normalize(options.source); - var namespace = options && options.namespace || undefined; - return has(this, this.normalize(fullName), source, namespace); - } - /** - Allow registering options for all factories of a type. - ```javascript - let registry = new Registry(); - let container = registry.container(); - // if all of type `connection` must not be singletons - registry.optionsForType('connection', { singleton: false }); - registry.register('connection:twitter', TwitterConnection); - registry.register('connection:facebook', FacebookConnection); - let twitter = container.lookup('connection:twitter'); - let twitter2 = container.lookup('connection:twitter'); - twitter === twitter2; // => false - let facebook = container.lookup('connection:facebook'); - let facebook2 = container.lookup('connection:facebook'); - facebook === facebook2; // => false - ``` - @private - @method optionsForType - @param {String} type - @param {Object} options - */ - - - optionsForType(type, options) { - this._typeOptions[type] = options; - } - - getOptionsForType(type) { - var optionsForType = this._typeOptions[type]; - - if (optionsForType === undefined && this.fallback !== null) { - optionsForType = this.fallback.getOptionsForType(type); - } - - return optionsForType; - } - /** - @private - @method options - @param {String} fullName - @param {Object} options - */ - - - options(fullName, options) { - var normalizedName = this.normalize(fullName); - this._options[normalizedName] = options; - } - - getOptions(fullName) { - var normalizedName = this.normalize(fullName); - var options = this._options[normalizedName]; - - if (options === undefined && this.fallback !== null) { - options = this.fallback.getOptions(fullName); - } - - return options; - } - - getOption(fullName, optionName) { - var options = this._options[fullName]; - - if (options !== undefined && options[optionName] !== undefined) { - return options[optionName]; - } - - var type = fullName.split(':')[0]; - options = this._typeOptions[type]; - - if (options && options[optionName] !== undefined) { - return options[optionName]; - } else if (this.fallback !== null) { - return this.fallback.getOption(fullName, optionName); - } - - return undefined; - } - /** - Used only via `injection`. - Provides a specialized form of injection, specifically enabling - all objects of one type to be injected with a reference to another - object. - For example, provided each object of type `controller` needed a `router`. - one would do the following: - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('router:main', Router); - registry.register('controller:user', UserController); - registry.register('controller:post', PostController); - registry.typeInjection('controller', 'router', 'router:main'); - let user = container.lookup('controller:user'); - let post = container.lookup('controller:post'); - user.router instanceof Router; //=> true - post.router instanceof Router; //=> true - // both controllers share the same router - user.router === post.router; //=> true - ``` - @private - @method typeInjection - @param {String} type - @param {String} property - @param {String} fullName - */ - - - typeInjection(type, property, fullName) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var fullNameType = fullName.split(':')[0]; - (true && !(fullNameType !== type) && (0, _debug.assert)("Cannot inject a '" + fullName + "' on other " + type + "(s).", fullNameType !== type)); - var injections = this._typeInjections[type] || (this._typeInjections[type] = []); - injections.push({ - property, - specifier: fullName - }); - } - /** - Defines injection rules. - These rules are used to inject dependencies onto objects when they - are instantiated. - Two forms of injections are possible: - * Injecting one fullName on another fullName - * Injecting one fullName on a type - Example: - ```javascript - let registry = new Registry(); - let container = registry.container(); - registry.register('source:main', Source); - registry.register('model:user', User); - registry.register('model:post', Post); - // injecting one fullName on another fullName - // eg. each user model gets a post model - registry.injection('model:user', 'post', 'model:post'); - // injecting one fullName on another type - registry.injection('model', 'source', 'source:main'); - let user = container.lookup('model:user'); - let post = container.lookup('model:post'); - user.source instanceof Source; //=> true - post.source instanceof Source; //=> true - user.post instanceof Post; //=> true - // and both models share the same source - user.source === post.source; //=> true - ``` - @private - @method injection - @param {String} factoryName - @param {String} property - @param {String} injectionName - */ - - - injection(fullName, property, injectionName) { - (true && !(this.isValidFullName(injectionName)) && (0, _debug.assert)("Invalid injectionName, expected: 'type:name' got: " + injectionName, this.isValidFullName(injectionName))); - var normalizedInjectionName = this.normalize(injectionName); - - if (fullName.indexOf(':') === -1) { - return this.typeInjection(fullName, property, normalizedInjectionName); - } - - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - var normalizedName = this.normalize(fullName); - var injections = this._injections[normalizedName] || (this._injections[normalizedName] = []); - injections.push({ - property, - specifier: normalizedInjectionName - }); - } - /** - @private - @method knownForType - @param {String} type the type to iterate over - */ - - - knownForType(type) { - var localKnown = (0, _utils.dictionary)(null); - var registeredNames = Object.keys(this.registrations); - - for (var index = 0; index < registeredNames.length; index++) { - var fullName = registeredNames[index]; - var itemType = fullName.split(':')[0]; - - if (itemType === type) { - localKnown[fullName] = true; - } - } - - var fallbackKnown, resolverKnown; - - if (this.fallback !== null) { - fallbackKnown = this.fallback.knownForType(type); - } - - if (this.resolver !== null && this.resolver.knownForType) { - resolverKnown = this.resolver.knownForType(type); - } - - return (0, _polyfills.assign)({}, fallbackKnown, localKnown, resolverKnown); - } - - isValidFullName(fullName) { - return VALID_FULL_NAME_REGEXP.test(fullName); - } - - getInjections(fullName) { - var injections = this._injections[fullName]; - - if (this.fallback !== null) { - var fallbackInjections = this.fallback.getInjections(fullName); - - if (fallbackInjections !== undefined) { - injections = injections === undefined ? fallbackInjections : injections.concat(fallbackInjections); - } - } - - return injections; - } - - getTypeInjections(type) { - var injections = this._typeInjections[type]; - - if (this.fallback !== null) { - var fallbackInjections = this.fallback.getTypeInjections(type); - - if (fallbackInjections !== undefined) { - injections = injections === undefined ? fallbackInjections : injections.concat(fallbackInjections); - } - } - - return injections; - } - /** - Given a fullName and a source fullName returns the fully resolved - fullName. Used to allow for local lookup. - ```javascript - let registry = new Registry(); - // the twitter factory is added to the module system - registry.expandLocalLookup('component:post-title', { source: 'template:post' }) // => component:post/post-title - ``` - @private - @method expandLocalLookup - @param {String} fullName - @param {Object} [options] - @param {String} [options.source] the fullname of the request source (used for local lookups) - @return {String} fullName - */ - - - expandLocalLookup(fullName, options) { - if (this.resolver !== null && this.resolver.expandLocalLookup) { - (true && !(this.isValidFullName(fullName)) && (0, _debug.assert)('fullName must be a proper full name', this.isValidFullName(fullName))); - (true && !(!options.source || this.isValidFullName(options.source)) && (0, _debug.assert)('options.source must be a proper full name', !options.source || this.isValidFullName(options.source))); - var normalizedFullName = this.normalize(fullName); - var normalizedSource = this.normalize(options.source); - return expandLocalLookup(this, normalizedFullName, normalizedSource, options.namespace); - } else if (this.fallback !== null) { - return this.fallback.expandLocalLookup(fullName, options); - } else { - return null; - } - } - - } - - _exports.Registry = Registry; - - if (true - /* DEBUG */ - ) { - var proto = Registry.prototype; - - proto.normalizeInjectionsHash = function (hash) { - var injections = []; - - for (var key in hash) { - if (hash.hasOwnProperty(key)) { - var { - specifier, - source, - namespace - } = hash[key]; - (true && !(this.isValidFullName(specifier)) && (0, _debug.assert)("Expected a proper full name, given '" + specifier + "'", this.isValidFullName(specifier))); - injections.push({ - property: key, - specifier, - source, - namespace - }); - } - } - - return injections; - }; - - proto.validateInjections = function (injections) { - if (!injections) { - return; - } - - for (var i = 0; i < injections.length; i++) { - var { - specifier, - source, - namespace - } = injections[i]; - (true && !(this.has(specifier, { - source, - namespace - })) && (0, _debug.assert)("Attempting to inject an unknown injection: '" + specifier + "'", this.has(specifier, { - source, - namespace - }))); - } - }; - } - - function expandLocalLookup(registry, normalizedName, normalizedSource, namespace) { - var cache = registry._localLookupCache; - var normalizedNameCache = cache[normalizedName]; - - if (!normalizedNameCache) { - normalizedNameCache = cache[normalizedName] = Object.create(null); - } - - var cacheKey = namespace || normalizedSource; - var cached = normalizedNameCache[cacheKey]; - - if (cached !== undefined) { - return cached; - } - - var expanded = registry.resolver.expandLocalLookup(normalizedName, normalizedSource, namespace); - return normalizedNameCache[cacheKey] = expanded; - } - - function resolve(registry, _normalizedName, options) { - var normalizedName = _normalizedName; // when `source` is provided expand normalizedName - // and source into the full normalizedName - - if (options !== undefined && (options.source || options.namespace)) { - normalizedName = registry.expandLocalLookup(_normalizedName, options); - - if (!normalizedName) { - return; - } - } - - var cached = registry._resolveCache[normalizedName]; - - if (cached !== undefined) { - return cached; - } - - if (registry._failSet.has(normalizedName)) { - return; - } - - var resolved; - - if (registry.resolver) { - resolved = registry.resolver.resolve(normalizedName); - } - - if (resolved === undefined) { - resolved = registry.registrations[normalizedName]; - } - - if (resolved === undefined) { - registry._failSet.add(normalizedName); - } else { - registry._resolveCache[normalizedName] = resolved; - } - - return resolved; - } - - function has(registry, fullName, source, namespace) { - return registry.resolve(fullName, { - source, - namespace - }) !== undefined; - } - - var privateNames = (0, _utils.dictionary)(null); - var privateSuffix = ("" + Math.random() + Date.now()).replace('.', ''); - - function privatize([fullName]) { - var name = privateNames[fullName]; - - if (name) { - return name; - } - - var [type, rawName] = fullName.split(':'); - return privateNames[fullName] = (0, _utils.intern)(type + ":" + rawName + "-" + privateSuffix); - } - /* - Public API for the container is still in flux. - The public API, specified on the application namespace should be considered the stable API. - // @module container - @private - */ - -}); -define("@ember/-internals/environment/index", ["exports", "@ember/deprecated-features"], function (_exports, _deprecatedFeatures) { - "use strict"; - - Object.defineProperty(_exports, "__esModule", { - value: true - }); - _exports.getLookup = getLookup; - _exports.setLookup = setLookup; - _exports.getENV = getENV; - _exports.ENV = _exports.context = _exports.global = void 0; - - // from lodash to catch fake globals - function checkGlobal(value) { - return value && value.Object === Object ? value : undefined; - } // element ids can ruin global miss checks - - - function checkElementIdShadowing(value) { - return value && value.nodeType === undefined ? value : undefined; - } // export real global - - - var global$1 = checkGlobal(checkElementIdShadowing(typeof global === 'object' && global)) || checkGlobal(typeof self === 'object' && self) || checkGlobal(typeof window === 'object' && window) || typeof mainContext !== 'undefined' && mainContext || // set before strict mode in Ember loader/wrapper - new Function('return this')(); // eval outside of strict mode - - _exports.global = global$1; - - var context = function (global, Ember) { - return Ember === undefined ? { - imports: global, - exports: global, - lookup: global - } : { - // import jQuery - imports: Ember.imports || global, - // export Ember - exports: Ember.exports || global, - // search for Namespaces - lookup: Ember.lookup || global - }; - }(global$1, global$1.Ember); - - _exports.context = context; - - function getLookup() { - return context.lookup; - } - - function setLookup(value) { - context.lookup = value; - } - /** - The hash of environment variables used to control various configuration - settings. To specify your own or override default settings, add the - desired properties to a global hash named `EmberENV` (or `ENV` for - backwards compatibility with earlier versions of Ember). The `EmberENV` - hash must be created before loading Ember. - - @class EmberENV - @type Object - @public - */ - - - var ENV = { - ENABLE_OPTIONAL_FEATURES: false, - - /** - Determines whether Ember should add to `Array`, `Function`, and `String` - native object prototypes, a few extra methods in order to provide a more - friendly API. - We generally recommend leaving this option set to true however, if you need - to turn it off, you can add the configuration property - `EXTEND_PROTOTYPES` to `EmberENV` and set it to `false`. - Note, when disabled (the default configuration for Ember Addons), you will - instead have to access all methods and functions from the Ember - namespace. - @property EXTEND_PROTOTYPES - @type Boolean - @default true - @for EmberENV - @public - */ - EXTEND_PROTOTYPES: { - Array: true, - Function: true, - String: true - }, - - /** - The `LOG_STACKTRACE_ON_DEPRECATION` property, when true, tells Ember to log - a full stack trace during deprecation warnings. - @property LOG_STACKTRACE_ON_DEPRECATION - @type Boolean - @default true - @for EmberENV - @public - */ - LOG_STACKTRACE_ON_DEPRECATION: true, - - /** - The `LOG_VERSION` property, when true, tells Ember to log versions of all - dependent libraries in use. - @property LOG_VERSION - @type Boolean - @default true - @for EmberENV - @public - */ - LOG_VERSION: true, - RAISE_ON_DEPRECATION: false, - STRUCTURED_PROFILE: false, - - /** - Whether to insert a `
        ` wrapper around the - application template. See RFC #280. - This is not intended to be set directly, as the implementation may change in - the future. Use `@ember/optional-features` instead. - @property _APPLICATION_TEMPLATE_WRAPPER - @for EmberENV - @type Boolean - @default true - @private - */ - _APPLICATION_TEMPLATE_WRAPPER: true, - - /** - Whether to use Glimmer Component semantics (as opposed to the classic "Curly" - components semantics) for template-only components. See RFC #278. - This is not intended to be set directly, as the implementation may change in - the future. Use `@ember/optional-features` instead. - @property _TEMPLATE_ONLY_GLIMMER_COMPONENTS - @for EmberENV - @type Boolean - @default false - @private - */ - _TEMPLATE_ONLY_GLIMMER_COMPONENTS: false, - - /** - Whether to perform extra bookkeeping needed to make the `captureRenderTree` - API work. - This has to be set before the ember JavaScript code is evaluated. This is - usually done by setting `window.EmberENV = { _DEBUG_RENDER_TREE: true };` - or `window.ENV = { _DEBUG_RENDER_TREE: true };` before the "vendor" - ` - - - - - diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/package.json b/packages/fastboot/test/fixtures/onerror-per-visit/package.json deleted file mode 100644 index d6b3318c2..000000000 --- a/packages/fastboot/test/fixtures/onerror-per-visit/package.json +++ /dev/null @@ -1 +0,0 @@ -{"dependencies":{},"fastboot":{"appName":"onerror-per-visit","config":{"onerror-per-visit":{"APP":{"autoboot":false},"EmberENV":{"EXTEND_PROTOTYPES":{"Date":false},"FEATURES":{},"_APPLICATION_TEMPLATE_WRAPPER":false,"_DEFAULT_ASYNC_OBSERVERS":true,"_JQUERY_INTEGRATION":false,"_TEMPLATE_ONLY_GLIMMER_COMPONENTS":true},"environment":"development","locationType":"auto","modulePrefix":"onerror-per-visit","rootURL":"/"}},"manifest":{"appFiles":["assets/onerror-per-visit.js","assets/onerror-per-visit-fastboot.js"],"htmlFile":"index.html","vendorFiles":["assets/vendor.js"]},"moduleWhitelist":[],"schemaVersion":3}} \ No newline at end of file diff --git a/packages/fastboot/test/fixtures/onerror-per-visit/robots.txt b/packages/fastboot/test/fixtures/onerror-per-visit/robots.txt deleted file mode 100644 index f5916452e..000000000 --- a/packages/fastboot/test/fixtures/onerror-per-visit/robots.txt +++ /dev/null @@ -1,3 +0,0 @@ -# http://www.robotstxt.org -User-agent: * -Disallow: diff --git a/packages/fastboot/test/fixtures/shoebox/fastboot/fastboot-test.js b/packages/fastboot/test/fixtures/shoebox/fastboot/fastboot-test.js deleted file mode 100644 index d7a497e6e..000000000 --- a/packages/fastboot/test/fixtures/shoebox/fastboot/fastboot-test.js +++ /dev/null @@ -1,489 +0,0 @@ -"use strict"; - -/* jshint ignore:start */ - - - -/* jshint ignore:end */ - -define('fastboot-test/app', ['exports', 'ember', 'fastboot-test/resolver', 'ember-load-initializers', 'fastboot-test/config/environment'], function (exports, _ember, _fastbootTestResolver, _emberLoadInitializers, _fastbootTestConfigEnvironment) { - - var App = undefined; - - _ember['default'].MODEL_FACTORY_INJECTIONS = true; - - App = _ember['default'].Application.extend({ - modulePrefix: _fastbootTestConfigEnvironment['default'].modulePrefix, - podModulePrefix: _fastbootTestConfigEnvironment['default'].podModulePrefix, - Resolver: _fastbootTestResolver['default'] - }); - - (0, _emberLoadInitializers['default'])(App, _fastbootTestConfigEnvironment['default'].modulePrefix); - - exports['default'] = App; -}); -define('fastboot-test/components/app-version', ['exports', 'ember-cli-app-version/components/app-version', 'fastboot-test/config/environment'], function (exports, _emberCliAppVersionComponentsAppVersion, _fastbootTestConfigEnvironment) { - - var name = _fastbootTestConfigEnvironment['default'].APP.name; - var version = _fastbootTestConfigEnvironment['default'].APP.version; - - exports['default'] = _emberCliAppVersionComponentsAppVersion['default'].extend({ - version: version, - name: name - }); -}); -define('fastboot-test/controllers/array', ['exports', 'ember'], function (exports, _ember) { - exports['default'] = _ember['default'].Controller; -}); -define('fastboot-test/controllers/object', ['exports', 'ember'], function (exports, _ember) { - exports['default'] = _ember['default'].Controller; -}); -define('fastboot-test/helpers/pluralize', ['exports', 'ember-inflector/lib/helpers/pluralize'], function (exports, _emberInflectorLibHelpersPluralize) { - exports['default'] = _emberInflectorLibHelpersPluralize['default']; -}); -define('fastboot-test/helpers/singularize', ['exports', 'ember-inflector/lib/helpers/singularize'], function (exports, _emberInflectorLibHelpersSingularize) { - exports['default'] = _emberInflectorLibHelpersSingularize['default']; -}); -define('fastboot-test/initializers/app-version', ['exports', 'ember-cli-app-version/initializer-factory', 'fastboot-test/config/environment'], function (exports, _emberCliAppVersionInitializerFactory, _fastbootTestConfigEnvironment) { - exports['default'] = { - name: 'App Version', - initialize: (0, _emberCliAppVersionInitializerFactory['default'])(_fastbootTestConfigEnvironment['default'].APP.name, _fastbootTestConfigEnvironment['default'].APP.version) - }; -}); -define('fastboot-test/initializers/container-debug-adapter', ['exports', 'ember-resolver/container-debug-adapter'], function (exports, _emberResolverContainerDebugAdapter) { - exports['default'] = { - name: 'container-debug-adapter', - - initialize: function initialize() { - var app = arguments[1] || arguments[0]; - - app.register('container-debug-adapter:main', _emberResolverContainerDebugAdapter['default']); - app.inject('container-debug-adapter:main', 'namespace', 'application:main'); - } - }; -}); -define('fastboot-test/initializers/data-adapter', ['exports', 'ember'], function (exports, _ember) { - - /* - This initializer is here to keep backwards compatibility with code depending - on the `data-adapter` initializer (before Ember Data was an addon). - - Should be removed for Ember Data 3.x - */ - - exports['default'] = { - name: 'data-adapter', - before: 'store', - initialize: _ember['default'].K - }; -}); -define('fastboot-test/initializers/ember-data', ['exports', 'ember-data/setup-container', 'ember-data/-private/core'], function (exports, _emberDataSetupContainer, _emberDataPrivateCore) { - - /* - - This code initializes Ember-Data onto an Ember application. - - If an Ember.js developer defines a subclass of DS.Store on their application, - as `App.StoreService` (or via a module system that resolves to `service:store`) - this code will automatically instantiate it and make it available on the - router. - - Additionally, after an application's controllers have been injected, they will - each have the store made available to them. - - For example, imagine an Ember.js application with the following classes: - - App.StoreService = DS.Store.extend({ - adapter: 'custom' - }); - - App.PostsController = Ember.ArrayController.extend({ - // ... - }); - - When the application is initialized, `App.ApplicationStore` will automatically be - instantiated, and the instance of `App.PostsController` will have its `store` - property set to that instance. - - Note that this code will only be run if the `ember-application` package is - loaded. If Ember Data is being used in an environment other than a - typical application (e.g., node.js where only `ember-runtime` is available), - this code will be ignored. - */ - - exports['default'] = { - name: 'ember-data', - initialize: _emberDataSetupContainer['default'] - }; -}); -define('fastboot-test/initializers/export-application-global', ['exports', 'ember', 'fastboot-test/config/environment'], function (exports, _ember, _fastbootTestConfigEnvironment) { - exports.initialize = initialize; - - function initialize() { - var application = arguments[1] || arguments[0]; - if (_fastbootTestConfigEnvironment['default'].exportApplicationGlobal !== false) { - var value = _fastbootTestConfigEnvironment['default'].exportApplicationGlobal; - var globalName; - - if (typeof value === 'string') { - globalName = value; - } else { - globalName = _ember['default'].String.classify(_fastbootTestConfigEnvironment['default'].modulePrefix); - } - - if (!window[globalName]) { - window[globalName] = application; - - application.reopen({ - willDestroy: function willDestroy() { - this._super.apply(this, arguments); - delete window[globalName]; - } - }); - } - } - } - - exports['default'] = { - name: 'export-application-global', - - initialize: initialize - }; -}); -define('fastboot-test/initializers/fastboot/ajax', ['exports', 'ember'], function (exports, _ember) { - var get = _ember['default'].get; - - var nodeAjax = function nodeAjax(options) { - var httpRegex = /^https?:\/\//; - var protocolRelativeRegex = /^\/\//; - var protocol = get(this, 'fastboot.request.protocol') + ':'; - - if (protocolRelativeRegex.test(options.url)) { - options.url = protocol + options.url; - } else if (!httpRegex.test(options.url)) { - try { - options.url = protocol + '//' + get(this, 'fastboot.request.host') + options.url; - } catch (fbError) { - throw new Error('You are using Ember Data with no host defined in your adapter. This will attempt to use the host of the FastBoot request, which is not configured for the current host of this request. Please set the hostWhitelist property for in your environment.js. FastBoot Error: ' + fbError.message); - } - } - - najax(options); - }; - - exports['default'] = { - name: 'ajax-service', - - initialize: function initialize(application) { - application.register('ajax:node', nodeAjax, { instantiate: false }); - application.inject('adapter', '_ajaxRequest', 'ajax:node'); - application.inject('adapter', 'fastboot', 'service:fastboot'); - } - }; -}); -/* globals najax */ -define("fastboot-test/initializers/fastboot/dom-helper-patches", ["exports"], function (exports) { - /*globals Ember, URL*/ - exports["default"] = { - name: "dom-helper-patches", - - initialize: function initialize(App) { - // TODO: remove me - Ember.HTMLBars.DOMHelper.prototype.protocolForURL = function (url) { - var protocol = URL.parse(url).protocol; - return protocol == null ? ':' : protocol; - }; - - // TODO: remove me https://github.com/tildeio/htmlbars/pull/425 - Ember.HTMLBars.DOMHelper.prototype.parseHTML = function (html) { - return this.document.createRawHTMLSection(html); - }; - } - }; -}); -define('fastboot-test/initializers/fastboot/error-handler', ['exports', 'ember'], function (exports, _ember) { - - /** - * Initializer to attach an `onError` hook to your app running in fastboot. It catches any run loop - * exceptions and other errors and prevents the node process from crashing. - * - */ - exports['default'] = { - name: 'error-handler', - - initialize: function initialize(application) { - if (!_ember['default'].onerror) { - // if no onerror handler is defined, define one for fastboot environments - _ember['default'].onerror = function (err) { - var errorMessage = 'There was an error running your app in fastboot. More info about the error: \n ' + (err.stack || err); - _ember['default'].Logger.error(errorMessage); - }; - } - } - }; -}); -define('fastboot-test/initializers/injectStore', ['exports', 'ember'], function (exports, _ember) { - - /* - This initializer is here to keep backwards compatibility with code depending - on the `injectStore` initializer (before Ember Data was an addon). - - Should be removed for Ember Data 3.x - */ - - exports['default'] = { - name: 'injectStore', - before: 'store', - initialize: _ember['default'].K - }; -}); -define('fastboot-test/initializers/store', ['exports', 'ember'], function (exports, _ember) { - - /* - This initializer is here to keep backwards compatibility with code depending - on the `store` initializer (before Ember Data was an addon). - - Should be removed for Ember Data 3.x - */ - - exports['default'] = { - name: 'store', - after: 'ember-data', - initialize: _ember['default'].K - }; -}); -define('fastboot-test/initializers/transforms', ['exports', 'ember'], function (exports, _ember) { - - /* - This initializer is here to keep backwards compatibility with code depending - on the `transforms` initializer (before Ember Data was an addon). - - Should be removed for Ember Data 3.x - */ - - exports['default'] = { - name: 'transforms', - before: 'store', - initialize: _ember['default'].K - }; -}); -define("fastboot-test/instance-initializers/ember-data", ["exports", "ember-data/-private/instance-initializers/initialize-store-service"], function (exports, _emberDataPrivateInstanceInitializersInitializeStoreService) { - exports["default"] = { - name: "ember-data", - initialize: _emberDataPrivateInstanceInitializersInitializeStoreService["default"] - }; -}); -define('fastboot-test/resolver', ['exports', 'ember-resolver'], function (exports, _emberResolver) { - exports['default'] = _emberResolver['default']; -}); -define('fastboot-test/router', ['exports', 'ember', 'fastboot-test/config/environment'], function (exports, _ember, _fastbootTestConfigEnvironment) { - - var Router = _ember['default'].Router.extend({ - location: _fastbootTestConfigEnvironment['default'].locationType - }); - - Router.map(function () {}); - - exports['default'] = Router; -}); -define('fastboot-test/routes/application', ['exports', 'ember'], function (exports, _ember) { - exports['default'] = _ember['default'].Route.extend({ - fastboot: _ember['default'].inject.service(), - shoebox: _ember['default'].computed.readOnly('fastboot.shoebox'), - - model: function model() { - var fastboot = this.get('fastboot'); - var shoebox = this.get('shoebox'); - if (fastboot.get('isFastBoot')) { - shoebox.put('key1', { foo: 'bar' }); - shoebox.put('key2', { zip: 'zap' }); - shoebox.put('key3', { htmlSpecialCase: 'R&B > Jazz' }); - shoebox.put('key4', { nastyScriptCase: "" }); - shoebox.put('key5', { otherUnicodeChars: '&&>><<\u2028\u2028\u2029\u2029' }); - } - } - }); -}); -define('fastboot-test/services/ajax', ['exports', 'ember-ajax/services/ajax'], function (exports, _emberAjaxServicesAjax) { - Object.defineProperty(exports, 'default', { - enumerable: true, - get: function get() { - return _emberAjaxServicesAjax['default']; - } - }); -}); -define('fastboot-test/services/fastboot', ['exports', 'ember'], function (exports, _ember) { - var deprecate = _ember['default'].deprecate; - var computed = _ember['default'].computed; - var get = _ember['default'].get; - var deprecatingAlias = computed.deprecatingAlias; - var readOnly = computed.readOnly; - - var RequestObject = _ember['default'].Object.extend({ - init: function init() { - this._super.apply(this, arguments); - - var request = this.request; - delete this.request; - - this.cookies = request.cookies; - this.headers = request.headers; - this.queryParams = request.queryParams; - this.path = request.path; - this.protocol = request.protocol; - this._host = function () { - return request.host(); - }; - }, - - host: computed(function () { - return this._host(); - }) - }); - - var Shoebox = _ember['default'].Object.extend({ - // careful calling `this.get`, we're overriding it, use `Ember.get` instead - put: function put(key, value) { - _ember['default'].assert('shoebox.put is only invoked from the fastboot rendered application', _ember['default'].get(this, 'fastboot.isFastBoot')); - _ember['default'].assert('the provided key is a string', typeof key === 'string'); - - var fastbootInfo = _ember['default'].get(this, 'fastboot')._fastbootInfo; - if (!fastbootInfo.shoebox) { - fastbootInfo.shoebox = {}; - } - - fastbootInfo.shoebox[key] = value; - }, - get: function get(key) { - _ember['default'].assert('shoebox.get is only invoked from the browser rendered application', !_ember['default'].get(this, 'fastboot.isFastBoot')); - - var $el = _ember['default'].$('#shoebox-' + key); - if (!$el.length) { - return; - } - var valueString = $el.text(); - if (!valueString) { - return; - } - - return JSON.parse(valueString); - } - }); - - exports['default'] = _ember['default'].Service.extend({ - cookies: deprecatingAlias('request.cookies', { id: 'fastboot.cookies-to-request', until: '0.9.9' }), - headers: deprecatingAlias('request.headers', { id: 'fastboot.headers-to-request', until: '0.9.9' }), - - init: function init() { - this._super.apply(this, arguments); - - var shoebox = Shoebox.create({ fastboot: this }); - this.set('shoebox', shoebox); - }, - - host: computed(function () { - deprecate('Usage of fastboot service\'s `host` property is deprecated. Please use `request.host` instead.', false, { id: 'fastboot.host-to-request', until: '0.9.9' }); - - return this._fastbootInfo.request.host(); - }), - - response: readOnly('_fastbootInfo.response'), - - request: computed(function () { - return RequestObject.create({ request: get(this, '_fastbootInfo.request') }); - }), - - isFastBoot: computed(function () { - return typeof FastBoot !== 'undefined'; - }), - - deferRendering: function deferRendering(promise) { - _ember['default'].assert('deferRendering requires a promise or thennable object', typeof promise.then === 'function'); - this._fastbootInfo.deferRendering(promise); - } - }); -}); -/* global FastBoot */ -define("fastboot-test/templates/application", ["exports"], function (exports) { - exports["default"] = Ember.HTMLBars.template((function () { - return { - meta: { - "fragmentReason": { - "name": "missing-wrapper", - "problems": ["multiple-nodes", "wrong-type"] - }, - "revision": "Ember@2.3.2", - "loc": { - "source": null, - "start": { - "line": 1, - "column": 0 - }, - "end": { - "line": 4, - "column": 0 - } - }, - "moduleName": "fastboot-test/templates/application.hbs" - }, - isEmpty: false, - arity: 0, - cachedFragment: null, - hasRendered: false, - buildFragment: function buildFragment(dom) { - var el0 = dom.createDocumentFragment(); - var el1 = dom.createElement("h2"); - dom.setAttribute(el1, "id", "title"); - var el2 = dom.createTextNode("Welcome to Ember"); - dom.appendChild(el1, el2); - dom.appendChild(el0, el1); - var el1 = dom.createTextNode("\n\n"); - dom.appendChild(el0, el1); - var el1 = dom.createComment(""); - dom.appendChild(el0, el1); - var el1 = dom.createTextNode("\n"); - dom.appendChild(el0, el1); - return el0; - }, - buildRenderNodes: function buildRenderNodes(dom, fragment, contextualElement) { - var morphs = new Array(1); - morphs[0] = dom.createMorphAt(fragment, 2, 2, contextualElement); - return morphs; - }, - statements: [["content", "outlet", ["loc", [null, [3, 0], [3, 10]]]]], - locals: [], - templates: [] - }; - })()); -}); -/* jshint ignore:start */ - - - -/* jshint ignore:end */ - -/* jshint ignore:start */ - -define('fastboot-test/config/environment', ['ember'], function(Ember) { - return FastBoot.config(); -}); - -/* jshint ignore:end */ - -/* jshint ignore:start */ - - -define('~fastboot/app-factory', ['fastboot-test/app', 'fastboot-test/config/environment'], function(App, config) { - App = App['default']; - config = config['default']; - - return { - 'default': function() { - return App.create(config.APP); - } - }; -}); - - -/* jshint ignore:end */ -//# sourceMappingURL=fastboot-test.map diff --git a/packages/fastboot/test/fixtures/shoebox/fastboot/vendor.js b/packages/fastboot/test/fixtures/shoebox/fastboot/vendor.js deleted file mode 100644 index 4ac8ff58d..000000000 --- a/packages/fastboot/test/fixtures/shoebox/fastboot/vendor.js +++ /dev/null @@ -1,82522 +0,0 @@ -/* jshint ignore:start */ - -window.EmberENV = {"FEATURES":{}}; -var runningTests = false; - - - -/* jshint ignore:end */ - -;var loader, define, requireModule, require, requirejs; - -(function(global) { - 'use strict'; - - // Save off the original values of these globals, so we can restore them if someone asks us to - var oldGlobals = { - loader: loader, - define: define, - requireModule: requireModule, - require: require, - requirejs: requirejs - }; - - loader = { - noConflict: function(aliases) { - var oldName, newName; - - for (oldName in aliases) { - if (aliases.hasOwnProperty(oldName)) { - if (oldGlobals.hasOwnProperty(oldName)) { - newName = aliases[oldName]; - - global[newName] = global[oldName]; - global[oldName] = oldGlobals[oldName]; - } - } - } - } - }; - - var _isArray; - if (!Array.isArray) { - _isArray = function (x) { - return Object.prototype.toString.call(x) === '[object Array]'; - }; - } else { - _isArray = Array.isArray; - } - - var registry = {}; - var seen = {}; - var FAILED = false; - var LOADED = true; - - var uuid = 0; - - function unsupportedModule(length) { - throw new Error('an unsupported module was defined, expected `define(name, deps, module)` instead got: `' + - length + '` arguments to define`'); - } - - var defaultDeps = ['require', 'exports', 'module']; - - function Module(name, deps, callback, alias) { - this.id = uuid++; - this.name = name; - this.deps = !deps.length && callback.length ? defaultDeps : deps; - this.module = { exports: {} }; - this.callback = callback; - this.state = undefined; - this.finalized = false; - this.hasExportsAsDep = false; - this.isAlias = alias; - this.reified = new Array(deps.length); - } - - Module.prototype.makeDefaultExport = function() { - var exports = this.module.exports; - if (exports !== null && - (typeof exports === 'object' || typeof exports === 'function') && - exports['default'] === undefined) { - exports['default'] = exports; - } - }; - - Module.prototype.exports = function() { - if (this.finalized) { - return this.module.exports; - } else { - if (loader.wrapModules) { - this.callback = loader.wrapModules(this.name, this.callback); - } - var result = this.callback.apply(this, this.reified); - if (!(this.hasExportsAsDep && result === undefined)) { - this.module.exports = result; - } - this.makeDefaultExport(); - this.finalized = true; - return this.module.exports; - } - }; - - Module.prototype.unsee = function() { - this.finalized = false; - this.state = undefined; - this.module = { exports: {}}; - }; - - Module.prototype.reify = function() { - var deps = this.deps; - var dep; - var reified = this.reified; - - for (var i = 0; i < deps.length; i++) { - dep = deps[i]; - if (dep === 'exports') { - this.hasExportsAsDep = true; - reified[i] = this.module.exports; - } else if (dep === 'require') { - reified[i] = this.makeRequire(); - } else if (dep === 'module') { - reified[i] = this.module; - } else { - reified[i] = findModule(resolve(dep, this.name), this.name).module.exports; - } - } - }; - - Module.prototype.makeRequire = function() { - var name = this.name; - var r = function(dep) { - return require(resolve(dep, name)); - }; - r['default'] = r; - r.has = function(dep) { - return has(resolve(dep, name)); - } - return r; - }; - - Module.prototype.build = function() { - if (this.state === FAILED || this.state === LOADED) { return; } - this.state = FAILED; - this.reify() - this.exports(); - this.state = LOADED; - }; - - define = function(name, deps, callback) { - if (arguments.length < 2) { - unsupportedModule(arguments.length); - } - - if (!_isArray(deps)) { - callback = deps; - deps = []; - } - - if (callback instanceof Alias) { - registry[name] = new Module(callback.name, deps, callback, true); - } else { - registry[name] = new Module(name, deps, callback, false); - } - }; - - // we don't support all of AMD - // define.amd = {}; - // we will support petals... - define.petal = { }; - - function Alias(path) { - this.name = path; - } - - define.alias = function(path) { - return new Alias(path); - }; - - function missingModule(name, referrer) { - throw new Error('Could not find module `' + name + '` imported from `' + referrer + '`'); - } - - requirejs = require = requireModule = function(name) { - return findModule(name, '(require)').module.exports; - }; - - function findModule(name, referrer) { - var mod = registry[name] || registry[name + '/index']; - - while (mod && mod.isAlias) { - mod = registry[mod.name]; - } - - if (!mod) { missingModule(name, referrer); } - - mod.build(); - return mod; - } - - function resolve(child, name) { - if (child.charAt(0) !== '.') { return child; } - - var parts = child.split('/'); - var nameParts = name.split('/'); - var parentBase = nameParts.slice(0, -1); - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i]; - - if (part === '..') { - if (parentBase.length === 0) { - throw new Error('Cannot access parent module of root'); - } - parentBase.pop(); - } else if (part === '.') { - continue; - } else { parentBase.push(part); } - } - - return parentBase.join('/'); - } - - function has(name) { - return !!(registry[name] || registry[name + '/index']); - } - - requirejs.entries = requirejs._eak_seen = registry; - requirejs.has = has; - requirejs.unsee = function(moduleName) { - findModule(moduleName, '(unsee)').unsee(); - }; - - requirejs.clear = function() { - requirejs.entries = requirejs._eak_seen = registry = {}; - seen = {}; - }; - - // prime - define('foo', function() {}); - define('foo/bar', [], function() {}); - define('foo/asdf', ['module', 'exports', 'require'], function(module, exports, require) { - if (require.has('foo/bar')) { - require('foo/bar'); - } - }); - define('foo/baz', [], define.alias('foo')); - define('foo/quz', define.alias('foo')); - define('foo/bar', ['foo', './quz', './baz', './asdf', './bar', '../foo'], function() {}); - define('foo/main', ['foo/bar'], function() {}); - - require('foo/main'); - require.unsee('foo/bar'); - - requirejs.clear(); - - if (typeof exports === 'object' && typeof module === 'object' && module.exports) { - module.exports = { require: require, define: define }; - } -})(this); - -;/*! - * jQuery JavaScript Library v2.1.4 - * http://jquery.com/ - * - * Includes Sizzle.js - * http://sizzlejs.com/ - * - * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2015-04-28T16:01Z - */ - -(function( global, factory ) { - - if ( typeof module === "object" && typeof module.exports === "object" ) { - // For CommonJS and CommonJS-like environments where a proper `window` - // is present, execute the factory and get jQuery. - // For environments that do not have a `window` with a `document` - // (such as Node.js), expose a factory as module.exports. - // This accentuates the need for the creation of a real `window`. - // e.g. var jQuery = require("jquery")(window); - // See ticket #14549 for more info. - module.exports = global.document ? - factory( global, true ) : - function( w ) { - if ( !w.document ) { - throw new Error( "jQuery requires a window with a document" ); - } - return factory( w ); - }; - } else { - factory( global ); - } - -// Pass this if window is not defined yet -}(typeof window !== "undefined" ? window : this, function( window, noGlobal ) { - -// Support: Firefox 18+ -// Can't be in strict mode, several libs including ASP.NET trace -// the stack via arguments.caller.callee and Firefox dies if -// you try to trace through "use strict" call chains. (#13335) -// - -var arr = []; - -var slice = arr.slice; - -var concat = arr.concat; - -var push = arr.push; - -var indexOf = arr.indexOf; - -var class2type = {}; - -var toString = class2type.toString; - -var hasOwn = class2type.hasOwnProperty; - -var support = {}; - - - -var - // Use the correct document accordingly with window argument (sandbox) - document = window.document, - - version = "2.1.4", - - // Define a local copy of jQuery - jQuery = function( selector, context ) { - // The jQuery object is actually just the init constructor 'enhanced' - // Need init if jQuery is called (just allow error to be thrown if not included) - return new jQuery.fn.init( selector, context ); - }, - - // Support: Android<4.1 - // Make sure we trim BOM and NBSP - rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, - - // Matches dashed string for camelizing - rmsPrefix = /^-ms-/, - rdashAlpha = /-([\da-z])/gi, - - // Used by jQuery.camelCase as callback to replace() - fcamelCase = function( all, letter ) { - return letter.toUpperCase(); - }; - -jQuery.fn = jQuery.prototype = { - // The current version of jQuery being used - jquery: version, - - constructor: jQuery, - - // Start with an empty selector - selector: "", - - // The default length of a jQuery object is 0 - length: 0, - - toArray: function() { - return slice.call( this ); - }, - - // Get the Nth element in the matched element set OR - // Get the whole matched element set as a clean array - get: function( num ) { - return num != null ? - - // Return just the one element from the set - ( num < 0 ? this[ num + this.length ] : this[ num ] ) : - - // Return all the elements in a clean array - slice.call( this ); - }, - - // Take an array of elements and push it onto the stack - // (returning the new matched element set) - pushStack: function( elems ) { - - // Build a new jQuery matched element set - var ret = jQuery.merge( this.constructor(), elems ); - - // Add the old object onto the stack (as a reference) - ret.prevObject = this; - ret.context = this.context; - - // Return the newly-formed element set - return ret; - }, - - // Execute a callback for every element in the matched set. - // (You can seed the arguments with an array of args, but this is - // only used internally.) - each: function( callback, args ) { - return jQuery.each( this, callback, args ); - }, - - map: function( callback ) { - return this.pushStack( jQuery.map(this, function( elem, i ) { - return callback.call( elem, i, elem ); - })); - }, - - slice: function() { - return this.pushStack( slice.apply( this, arguments ) ); - }, - - first: function() { - return this.eq( 0 ); - }, - - last: function() { - return this.eq( -1 ); - }, - - eq: function( i ) { - var len = this.length, - j = +i + ( i < 0 ? len : 0 ); - return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] ); - }, - - end: function() { - return this.prevObject || this.constructor(null); - }, - - // For internal use only. - // Behaves like an Array's method, not like a jQuery method. - push: push, - sort: arr.sort, - splice: arr.splice -}; - -jQuery.extend = jQuery.fn.extend = function() { - var options, name, src, copy, copyIsArray, clone, - target = arguments[0] || {}, - i = 1, - length = arguments.length, - deep = false; - - // Handle a deep copy situation - if ( typeof target === "boolean" ) { - deep = target; - - // Skip the boolean and the target - target = arguments[ i ] || {}; - i++; - } - - // Handle case when target is a string or something (possible in deep copy) - if ( typeof target !== "object" && !jQuery.isFunction(target) ) { - target = {}; - } - - // Extend jQuery itself if only one argument is passed - if ( i === length ) { - target = this; - i--; - } - - for ( ; i < length; i++ ) { - // Only deal with non-null/undefined values - if ( (options = arguments[ i ]) != null ) { - // Extend the base object - for ( name in options ) { - src = target[ name ]; - copy = options[ name ]; - - // Prevent never-ending loop - if ( target === copy ) { - continue; - } - - // Recurse if we're merging plain objects or arrays - if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) { - if ( copyIsArray ) { - copyIsArray = false; - clone = src && jQuery.isArray(src) ? src : []; - - } else { - clone = src && jQuery.isPlainObject(src) ? src : {}; - } - - // Never move original objects, clone them - target[ name ] = jQuery.extend( deep, clone, copy ); - - // Don't bring in undefined values - } else if ( copy !== undefined ) { - target[ name ] = copy; - } - } - } - } - - // Return the modified object - return target; -}; - -jQuery.extend({ - // Unique for each copy of jQuery on the page - expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ), - - // Assume jQuery is ready without the ready module - isReady: true, - - error: function( msg ) { - throw new Error( msg ); - }, - - noop: function() {}, - - isFunction: function( obj ) { - return jQuery.type(obj) === "function"; - }, - - isArray: Array.isArray, - - isWindow: function( obj ) { - return obj != null && obj === obj.window; - }, - - isNumeric: function( obj ) { - // parseFloat NaNs numeric-cast false positives (null|true|false|"") - // ...but misinterprets leading-number strings, particularly hex literals ("0x...") - // subtraction forces infinities to NaN - // adding 1 corrects loss of precision from parseFloat (#15100) - return !jQuery.isArray( obj ) && (obj - parseFloat( obj ) + 1) >= 0; - }, - - isPlainObject: function( obj ) { - // Not plain objects: - // - Any object or value whose internal [[Class]] property is not "[object Object]" - // - DOM nodes - // - window - if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.constructor && - !hasOwn.call( obj.constructor.prototype, "isPrototypeOf" ) ) { - return false; - } - - // If the function hasn't returned already, we're confident that - // |obj| is a plain object, created by {} or constructed with new Object - return true; - }, - - isEmptyObject: function( obj ) { - var name; - for ( name in obj ) { - return false; - } - return true; - }, - - type: function( obj ) { - if ( obj == null ) { - return obj + ""; - } - // Support: Android<4.0, iOS<6 (functionish RegExp) - return typeof obj === "object" || typeof obj === "function" ? - class2type[ toString.call(obj) ] || "object" : - typeof obj; - }, - - // Evaluates a script in a global context - globalEval: function( code ) { - var script, - indirect = eval; - - code = jQuery.trim( code ); - - if ( code ) { - // If the code includes a valid, prologue position - // strict mode pragma, execute code by injecting a - // script tag into the document. - if ( code.indexOf("use strict") === 1 ) { - script = document.createElement("script"); - script.text = code; - document.head.appendChild( script ).parentNode.removeChild( script ); - } else { - // Otherwise, avoid the DOM node creation, insertion - // and removal by using an indirect global eval - indirect( code ); - } - } - }, - - // Convert dashed to camelCase; used by the css and data modules - // Support: IE9-11+ - // Microsoft forgot to hump their vendor prefix (#9572) - camelCase: function( string ) { - return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase ); - }, - - nodeName: function( elem, name ) { - return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); - }, - - // args is for internal usage only - each: function( obj, callback, args ) { - var value, - i = 0, - length = obj.length, - isArray = isArraylike( obj ); - - if ( args ) { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.apply( obj[ i ], args ); - - if ( value === false ) { - break; - } - } - } - - // A special, fast, case for the most common use of each - } else { - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } else { - for ( i in obj ) { - value = callback.call( obj[ i ], i, obj[ i ] ); - - if ( value === false ) { - break; - } - } - } - } - - return obj; - }, - - // Support: Android<4.1 - trim: function( text ) { - return text == null ? - "" : - ( text + "" ).replace( rtrim, "" ); - }, - - // results is for internal usage only - makeArray: function( arr, results ) { - var ret = results || []; - - if ( arr != null ) { - if ( isArraylike( Object(arr) ) ) { - jQuery.merge( ret, - typeof arr === "string" ? - [ arr ] : arr - ); - } else { - push.call( ret, arr ); - } - } - - return ret; - }, - - inArray: function( elem, arr, i ) { - return arr == null ? -1 : indexOf.call( arr, elem, i ); - }, - - merge: function( first, second ) { - var len = +second.length, - j = 0, - i = first.length; - - for ( ; j < len; j++ ) { - first[ i++ ] = second[ j ]; - } - - first.length = i; - - return first; - }, - - grep: function( elems, callback, invert ) { - var callbackInverse, - matches = [], - i = 0, - length = elems.length, - callbackExpect = !invert; - - // Go through the array, only saving the items - // that pass the validator function - for ( ; i < length; i++ ) { - callbackInverse = !callback( elems[ i ], i ); - if ( callbackInverse !== callbackExpect ) { - matches.push( elems[ i ] ); - } - } - - return matches; - }, - - // arg is for internal usage only - map: function( elems, callback, arg ) { - var value, - i = 0, - length = elems.length, - isArray = isArraylike( elems ), - ret = []; - - // Go through the array, translating each of the items to their new values - if ( isArray ) { - for ( ; i < length; i++ ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - - // Go through every key on the object, - } else { - for ( i in elems ) { - value = callback( elems[ i ], i, arg ); - - if ( value != null ) { - ret.push( value ); - } - } - } - - // Flatten any nested arrays - return concat.apply( [], ret ); - }, - - // A global GUID counter for objects - guid: 1, - - // Bind a function to a context, optionally partially applying any - // arguments. - proxy: function( fn, context ) { - var tmp, args, proxy; - - if ( typeof context === "string" ) { - tmp = fn[ context ]; - context = fn; - fn = tmp; - } - - // Quick check to determine if target is callable, in the spec - // this throws a TypeError, but we will just return undefined. - if ( !jQuery.isFunction( fn ) ) { - return undefined; - } - - // Simulated bind - args = slice.call( arguments, 2 ); - proxy = function() { - return fn.apply( context || this, args.concat( slice.call( arguments ) ) ); - }; - - // Set the guid of unique handler to the same of original handler, so it can be removed - proxy.guid = fn.guid = fn.guid || jQuery.guid++; - - return proxy; - }, - - now: Date.now, - - // jQuery.support is not used in Core but other projects attach their - // properties to it so it needs to exist. - support: support -}); - -// Populate the class2type map -jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) { - class2type[ "[object " + name + "]" ] = name.toLowerCase(); -}); - -function isArraylike( obj ) { - - // Support: iOS 8.2 (not reproducible in simulator) - // `in` check used to prevent JIT error (gh-2145) - // hasOwn isn't used here due to false negatives - // regarding Nodelist length in IE - var length = "length" in obj && obj.length, - type = jQuery.type( obj ); - - if ( type === "function" || jQuery.isWindow( obj ) ) { - return false; - } - - if ( obj.nodeType === 1 && length ) { - return true; - } - - return type === "array" || length === 0 || - typeof length === "number" && length > 0 && ( length - 1 ) in obj; -} -var Sizzle = -/*! - * Sizzle CSS Selector Engine v2.2.0-pre - * http://sizzlejs.com/ - * - * Copyright 2008, 2014 jQuery Foundation, Inc. and other contributors - * Released under the MIT license - * http://jquery.org/license - * - * Date: 2014-12-16 - */ -(function( window ) { - -var i, - support, - Expr, - getText, - isXML, - tokenize, - compile, - select, - outermostContext, - sortInput, - hasDuplicate, - - // Local document vars - setDocument, - document, - docElem, - documentIsHTML, - rbuggyQSA, - rbuggyMatches, - matches, - contains, - - // Instance-specific data - expando = "sizzle" + 1 * new Date(), - preferredDoc = window.document, - dirruns = 0, - done = 0, - classCache = createCache(), - tokenCache = createCache(), - compilerCache = createCache(), - sortOrder = function( a, b ) { - if ( a === b ) { - hasDuplicate = true; - } - return 0; - }, - - // General-purpose constants - MAX_NEGATIVE = 1 << 31, - - // Instance methods - hasOwn = ({}).hasOwnProperty, - arr = [], - pop = arr.pop, - push_native = arr.push, - push = arr.push, - slice = arr.slice, - // Use a stripped-down indexOf as it's faster than native - // http://jsperf.com/thor-indexof-vs-for/5 - indexOf = function( list, elem ) { - var i = 0, - len = list.length; - for ( ; i < len; i++ ) { - if ( list[i] === elem ) { - return i; - } - } - return -1; - }, - - booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", - - // Regular expressions - - // Whitespace characters http://www.w3.org/TR/css3-selectors/#whitespace - whitespace = "[\\x20\\t\\r\\n\\f]", - // http://www.w3.org/TR/css3-syntax/#characters - characterEncoding = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+", - - // Loosely modeled on CSS identifier characters - // An unquoted value should be a CSS identifier http://www.w3.org/TR/css3-selectors/#attribute-selectors - // Proper syntax: http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier - identifier = characterEncoding.replace( "w", "w#" ), - - // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors - attributes = "\\[" + whitespace + "*(" + characterEncoding + ")(?:" + whitespace + - // Operator (capture 2) - "*([*^$|!~]?=)" + whitespace + - // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]" - "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace + - "*\\]", - - pseudos = ":(" + characterEncoding + ")(?:\\((" + - // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments: - // 1. quoted (capture 3; capture 4 or capture 5) - "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" + - // 2. simple (capture 6) - "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" + - // 3. anything else (capture 2) - ".*" + - ")\\)|)", - - // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter - rwhitespace = new RegExp( whitespace + "+", "g" ), - rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ), - - rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ), - rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ), - - rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ), - - rpseudo = new RegExp( pseudos ), - ridentifier = new RegExp( "^" + identifier + "$" ), - - matchExpr = { - "ID": new RegExp( "^#(" + characterEncoding + ")" ), - "CLASS": new RegExp( "^\\.(" + characterEncoding + ")" ), - "TAG": new RegExp( "^(" + characterEncoding.replace( "w", "w*" ) + ")" ), - "ATTR": new RegExp( "^" + attributes ), - "PSEUDO": new RegExp( "^" + pseudos ), - "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + - "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + - "*(\\d+)|))" + whitespace + "*\\)|)", "i" ), - "bool": new RegExp( "^(?:" + booleans + ")$", "i" ), - // For use in libraries implementing .is() - // We use this for POS matching in `select` - "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + - whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" ) - }, - - rinputs = /^(?:input|select|textarea|button)$/i, - rheader = /^h\d$/i, - - rnative = /^[^{]+\{\s*\[native \w/, - - // Easily-parseable/retrievable ID or TAG or CLASS selectors - rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, - - rsibling = /[+~]/, - rescape = /'|\\/g, - - // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters - runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ), - funescape = function( _, escaped, escapedWhitespace ) { - var high = "0x" + escaped - 0x10000; - // NaN means non-codepoint - // Support: Firefox<24 - // Workaround erroneous numeric interpretation of +"0x" - return high !== high || escapedWhitespace ? - escaped : - high < 0 ? - // BMP codepoint - String.fromCharCode( high + 0x10000 ) : - // Supplemental Plane codepoint (surrogate pair) - String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 ); - }, - - // Used for iframes - // See setDocument() - // Removing the function wrapper causes a "Permission Denied" - // error in IE - unloadHandler = function() { - setDocument(); - }; - -// Optimize for push.apply( _, NodeList ) -try { - push.apply( - (arr = slice.call( preferredDoc.childNodes )), - preferredDoc.childNodes - ); - // Support: Android<4.0 - // Detect silently failing push.apply - arr[ preferredDoc.childNodes.length ].nodeType; -} catch ( e ) { - push = { apply: arr.length ? - - // Leverage slice if possible - function( target, els ) { - push_native.apply( target, slice.call(els) ); - } : - - // Support: IE<9 - // Otherwise append directly - function( target, els ) { - var j = target.length, - i = 0; - // Can't trust NodeList.length - while ( (target[j++] = els[i++]) ) {} - target.length = j - 1; - } - }; -} - -function Sizzle( selector, context, results, seed ) { - var match, elem, m, nodeType, - // QSA vars - i, groups, old, nid, newContext, newSelector; - - if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) { - setDocument( context ); - } - - context = context || document; - results = results || []; - nodeType = context.nodeType; - - if ( typeof selector !== "string" || !selector || - nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) { - - return results; - } - - if ( !seed && documentIsHTML ) { - - // Try to shortcut find operations when possible (e.g., not under DocumentFragment) - if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) { - // Speed-up: Sizzle("#ID") - if ( (m = match[1]) ) { - if ( nodeType === 9 ) { - elem = context.getElementById( m ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document (jQuery #6963) - if ( elem && elem.parentNode ) { - // Handle the case where IE, Opera, and Webkit return items - // by name instead of ID - if ( elem.id === m ) { - results.push( elem ); - return results; - } - } else { - return results; - } - } else { - // Context is not a document - if ( context.ownerDocument && (elem = context.ownerDocument.getElementById( m )) && - contains( context, elem ) && elem.id === m ) { - results.push( elem ); - return results; - } - } - - // Speed-up: Sizzle("TAG") - } else if ( match[2] ) { - push.apply( results, context.getElementsByTagName( selector ) ); - return results; - - // Speed-up: Sizzle(".CLASS") - } else if ( (m = match[3]) && support.getElementsByClassName ) { - push.apply( results, context.getElementsByClassName( m ) ); - return results; - } - } - - // QSA path - if ( support.qsa && (!rbuggyQSA || !rbuggyQSA.test( selector )) ) { - nid = old = expando; - newContext = context; - newSelector = nodeType !== 1 && selector; - - // qSA works strangely on Element-rooted queries - // We can work around this by specifying an extra ID on the root - // and working up from there (Thanks to Andrew Dupont for the technique) - // IE 8 doesn't work on object elements - if ( nodeType === 1 && context.nodeName.toLowerCase() !== "object" ) { - groups = tokenize( selector ); - - if ( (old = context.getAttribute("id")) ) { - nid = old.replace( rescape, "\\$&" ); - } else { - context.setAttribute( "id", nid ); - } - nid = "[id='" + nid + "'] "; - - i = groups.length; - while ( i-- ) { - groups[i] = nid + toSelector( groups[i] ); - } - newContext = rsibling.test( selector ) && testContext( context.parentNode ) || context; - newSelector = groups.join(","); - } - - if ( newSelector ) { - try { - push.apply( results, - newContext.querySelectorAll( newSelector ) - ); - return results; - } catch(qsaError) { - } finally { - if ( !old ) { - context.removeAttribute("id"); - } - } - } - } - } - - // All others - return select( selector.replace( rtrim, "$1" ), context, results, seed ); -} - -/** - * Create key-value caches of limited size - * @returns {Function(string, Object)} Returns the Object data after storing it on itself with - * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength) - * deleting the oldest entry - */ -function createCache() { - var keys = []; - - function cache( key, value ) { - // Use (key + " ") to avoid collision with native prototype properties (see Issue #157) - if ( keys.push( key + " " ) > Expr.cacheLength ) { - // Only keep the most recent entries - delete cache[ keys.shift() ]; - } - return (cache[ key + " " ] = value); - } - return cache; -} - -/** - * Mark a function for special use by Sizzle - * @param {Function} fn The function to mark - */ -function markFunction( fn ) { - fn[ expando ] = true; - return fn; -} - -/** - * Support testing using an element - * @param {Function} fn Passed the created div and expects a boolean result - */ -function assert( fn ) { - var div = document.createElement("div"); - - try { - return !!fn( div ); - } catch (e) { - return false; - } finally { - // Remove from its parent by default - if ( div.parentNode ) { - div.parentNode.removeChild( div ); - } - // release memory in IE - div = null; - } -} - -/** - * Adds the same handler for all of the specified attrs - * @param {String} attrs Pipe-separated list of attributes - * @param {Function} handler The method that will be applied - */ -function addHandle( attrs, handler ) { - var arr = attrs.split("|"), - i = attrs.length; - - while ( i-- ) { - Expr.attrHandle[ arr[i] ] = handler; - } -} - -/** - * Checks document order of two siblings - * @param {Element} a - * @param {Element} b - * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b - */ -function siblingCheck( a, b ) { - var cur = b && a, - diff = cur && a.nodeType === 1 && b.nodeType === 1 && - ( ~b.sourceIndex || MAX_NEGATIVE ) - - ( ~a.sourceIndex || MAX_NEGATIVE ); - - // Use IE sourceIndex if available on both nodes - if ( diff ) { - return diff; - } - - // Check if b follows a - if ( cur ) { - while ( (cur = cur.nextSibling) ) { - if ( cur === b ) { - return -1; - } - } - } - - return a ? 1 : -1; -} - -/** - * Returns a function to use in pseudos for input types - * @param {String} type - */ -function createInputPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for buttons - * @param {String} type - */ -function createButtonPseudo( type ) { - return function( elem ) { - var name = elem.nodeName.toLowerCase(); - return (name === "input" || name === "button") && elem.type === type; - }; -} - -/** - * Returns a function to use in pseudos for positionals - * @param {Function} fn - */ -function createPositionalPseudo( fn ) { - return markFunction(function( argument ) { - argument = +argument; - return markFunction(function( seed, matches ) { - var j, - matchIndexes = fn( [], seed.length, argument ), - i = matchIndexes.length; - - // Match elements found at the specified indexes - while ( i-- ) { - if ( seed[ (j = matchIndexes[i]) ] ) { - seed[j] = !(matches[j] = seed[j]); - } - } - }); - }); -} - -/** - * Checks a node for validity as a Sizzle context - * @param {Element|Object=} context - * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value - */ -function testContext( context ) { - return context && typeof context.getElementsByTagName !== "undefined" && context; -} - -// Expose support vars for convenience -support = Sizzle.support = {}; - -/** - * Detects XML nodes - * @param {Element|Object} elem An element or a document - * @returns {Boolean} True iff elem is a non-HTML XML node - */ -isXML = Sizzle.isXML = function( elem ) { - // documentElement is verified for cases where it doesn't yet exist - // (such as loading iframes in IE - #4833) - var documentElement = elem && (elem.ownerDocument || elem).documentElement; - return documentElement ? documentElement.nodeName !== "HTML" : false; -}; - -/** - * Sets document-related variables once based on the current document - * @param {Element|Object} [doc] An element or document object to use to set the document - * @returns {Object} Returns the current document - */ -setDocument = Sizzle.setDocument = function( node ) { - var hasCompare, parent, - doc = node ? node.ownerDocument || node : preferredDoc; - - // If no document and documentElement is available, return - if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) { - return document; - } - - // Set our document - document = doc; - docElem = doc.documentElement; - parent = doc.defaultView; - - // Support: IE>8 - // If iframe document is assigned to "document" variable and if iframe has been reloaded, - // IE will throw "permission denied" error when accessing "document" variable, see jQuery #13936 - // IE6-8 do not support the defaultView property so parent will be undefined - if ( parent && parent !== parent.top ) { - // IE11 does not have attachEvent, so all must suffer - if ( parent.addEventListener ) { - parent.addEventListener( "unload", unloadHandler, false ); - } else if ( parent.attachEvent ) { - parent.attachEvent( "onunload", unloadHandler ); - } - } - - /* Support tests - ---------------------------------------------------------------------- */ - documentIsHTML = !isXML( doc ); - - /* Attributes - ---------------------------------------------------------------------- */ - - // Support: IE<8 - // Verify that getAttribute really returns attributes and not properties - // (excepting IE8 booleans) - support.attributes = assert(function( div ) { - div.className = "i"; - return !div.getAttribute("className"); - }); - - /* getElement(s)By* - ---------------------------------------------------------------------- */ - - // Check if getElementsByTagName("*") returns only elements - support.getElementsByTagName = assert(function( div ) { - div.appendChild( doc.createComment("") ); - return !div.getElementsByTagName("*").length; - }); - - // Support: IE<9 - support.getElementsByClassName = rnative.test( doc.getElementsByClassName ); - - // Support: IE<10 - // Check if getElementById returns elements by name - // The broken getElementById methods don't pick up programatically-set names, - // so use a roundabout getElementsByName test - support.getById = assert(function( div ) { - docElem.appendChild( div ).id = expando; - return !doc.getElementsByName || !doc.getElementsByName( expando ).length; - }); - - // ID find and filter - if ( support.getById ) { - Expr.find["ID"] = function( id, context ) { - if ( typeof context.getElementById !== "undefined" && documentIsHTML ) { - var m = context.getElementById( id ); - // Check parentNode to catch when Blackberry 4.6 returns - // nodes that are no longer in the document #6963 - return m && m.parentNode ? [ m ] : []; - } - }; - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - return elem.getAttribute("id") === attrId; - }; - }; - } else { - // Support: IE6/7 - // getElementById is not reliable as a find shortcut - delete Expr.find["ID"]; - - Expr.filter["ID"] = function( id ) { - var attrId = id.replace( runescape, funescape ); - return function( elem ) { - var node = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id"); - return node && node.value === attrId; - }; - }; - } - - // Tag - Expr.find["TAG"] = support.getElementsByTagName ? - function( tag, context ) { - if ( typeof context.getElementsByTagName !== "undefined" ) { - return context.getElementsByTagName( tag ); - - // DocumentFragment nodes don't have gEBTN - } else if ( support.qsa ) { - return context.querySelectorAll( tag ); - } - } : - - function( tag, context ) { - var elem, - tmp = [], - i = 0, - // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too - results = context.getElementsByTagName( tag ); - - // Filter out possible comments - if ( tag === "*" ) { - while ( (elem = results[i++]) ) { - if ( elem.nodeType === 1 ) { - tmp.push( elem ); - } - } - - return tmp; - } - return results; - }; - - // Class - Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) { - if ( documentIsHTML ) { - return context.getElementsByClassName( className ); - } - }; - - /* QSA/matchesSelector - ---------------------------------------------------------------------- */ - - // QSA and matchesSelector support - - // matchesSelector(:active) reports false when true (IE9/Opera 11.5) - rbuggyMatches = []; - - // qSa(:focus) reports false when true (Chrome 21) - // We allow this because of a bug in IE8/9 that throws an error - // whenever `document.activeElement` is accessed on an iframe - // So, we allow :focus to pass through QSA all the time to avoid the IE error - // See http://bugs.jquery.com/ticket/13378 - rbuggyQSA = []; - - if ( (support.qsa = rnative.test( doc.querySelectorAll )) ) { - // Build QSA regex - // Regex strategy adopted from Diego Perini - assert(function( div ) { - // Select is set to empty string on purpose - // This is to test IE's treatment of not explicitly - // setting a boolean content attribute, - // since its presence should be enough - // http://bugs.jquery.com/ticket/12359 - docElem.appendChild( div ).innerHTML = "" + - ""; - - // Support: IE8, Opera 11-12.16 - // Nothing should be selected when empty strings follow ^= or $= or *= - // The test attribute must be unknown in Opera but "safe" for WinRT - // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section - if ( div.querySelectorAll("[msallowcapture^='']").length ) { - rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" ); - } - - // Support: IE8 - // Boolean attributes and "value" are not treated correctly - if ( !div.querySelectorAll("[selected]").length ) { - rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" ); - } - - // Support: Chrome<29, Android<4.2+, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.7+ - if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) { - rbuggyQSA.push("~="); - } - - // Webkit/Opera - :checked should return selected option elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":checked").length ) { - rbuggyQSA.push(":checked"); - } - - // Support: Safari 8+, iOS 8+ - // https://bugs.webkit.org/show_bug.cgi?id=136851 - // In-page `selector#id sibing-combinator selector` fails - if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) { - rbuggyQSA.push(".#.+[+~]"); - } - }); - - assert(function( div ) { - // Support: Windows 8 Native Apps - // The type and name attributes are restricted during .innerHTML assignment - var input = doc.createElement("input"); - input.setAttribute( "type", "hidden" ); - div.appendChild( input ).setAttribute( "name", "D" ); - - // Support: IE8 - // Enforce case-sensitivity of name attribute - if ( div.querySelectorAll("[name=d]").length ) { - rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" ); - } - - // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled) - // IE8 throws error here and will not see later tests - if ( !div.querySelectorAll(":enabled").length ) { - rbuggyQSA.push( ":enabled", ":disabled" ); - } - - // Opera 10-11 does not throw on post-comma invalid pseudos - div.querySelectorAll("*,:x"); - rbuggyQSA.push(",.*:"); - }); - } - - if ( (support.matchesSelector = rnative.test( (matches = docElem.matches || - docElem.webkitMatchesSelector || - docElem.mozMatchesSelector || - docElem.oMatchesSelector || - docElem.msMatchesSelector) )) ) { - - assert(function( div ) { - // Check to see if it's possible to do matchesSelector - // on a disconnected node (IE 9) - support.disconnectedMatch = matches.call( div, "div" ); - - // This should fail with an exception - // Gecko does not error, returns false instead - matches.call( div, "[s!='']:x" ); - rbuggyMatches.push( "!=", pseudos ); - }); - } - - rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") ); - rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") ); - - /* Contains - ---------------------------------------------------------------------- */ - hasCompare = rnative.test( docElem.compareDocumentPosition ); - - // Element contains another - // Purposefully does not implement inclusive descendent - // As in, an element does not contain itself - contains = hasCompare || rnative.test( docElem.contains ) ? - function( a, b ) { - var adown = a.nodeType === 9 ? a.documentElement : a, - bup = b && b.parentNode; - return a === bup || !!( bup && bup.nodeType === 1 && ( - adown.contains ? - adown.contains( bup ) : - a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16 - )); - } : - function( a, b ) { - if ( b ) { - while ( (b = b.parentNode) ) { - if ( b === a ) { - return true; - } - } - } - return false; - }; - - /* Sorting - ---------------------------------------------------------------------- */ - - // Document order sorting - sortOrder = hasCompare ? - function( a, b ) { - - // Flag for duplicate removal - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - // Sort on method existence if only one input has compareDocumentPosition - var compare = !a.compareDocumentPosition - !b.compareDocumentPosition; - if ( compare ) { - return compare; - } - - // Calculate position if both inputs belong to the same document - compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ? - a.compareDocumentPosition( b ) : - - // Otherwise we know they are disconnected - 1; - - // Disconnected nodes - if ( compare & 1 || - (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) { - - // Choose the first element that is related to our preferred document - if ( a === doc || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) { - return -1; - } - if ( b === doc || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) { - return 1; - } - - // Maintain original order - return sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - } - - return compare & 4 ? -1 : 1; - } : - function( a, b ) { - // Exit early if the nodes are identical - if ( a === b ) { - hasDuplicate = true; - return 0; - } - - var cur, - i = 0, - aup = a.parentNode, - bup = b.parentNode, - ap = [ a ], - bp = [ b ]; - - // Parentless nodes are either documents or disconnected - if ( !aup || !bup ) { - return a === doc ? -1 : - b === doc ? 1 : - aup ? -1 : - bup ? 1 : - sortInput ? - ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) : - 0; - - // If the nodes are siblings, we can do a quick check - } else if ( aup === bup ) { - return siblingCheck( a, b ); - } - - // Otherwise we need full lists of their ancestors for comparison - cur = a; - while ( (cur = cur.parentNode) ) { - ap.unshift( cur ); - } - cur = b; - while ( (cur = cur.parentNode) ) { - bp.unshift( cur ); - } - - // Walk down the tree looking for a discrepancy - while ( ap[i] === bp[i] ) { - i++; - } - - return i ? - // Do a sibling check if the nodes have a common ancestor - siblingCheck( ap[i], bp[i] ) : - - // Otherwise nodes in our document sort first - ap[i] === preferredDoc ? -1 : - bp[i] === preferredDoc ? 1 : - 0; - }; - - return doc; -}; - -Sizzle.matches = function( expr, elements ) { - return Sizzle( expr, null, null, elements ); -}; - -Sizzle.matchesSelector = function( elem, expr ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - // Make sure that attribute selectors are quoted - expr = expr.replace( rattributeQuotes, "='$1']" ); - - if ( support.matchesSelector && documentIsHTML && - ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) && - ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) { - - try { - var ret = matches.call( elem, expr ); - - // IE 9's matchesSelector returns false on disconnected nodes - if ( ret || support.disconnectedMatch || - // As well, disconnected nodes are said to be in a document - // fragment in IE 9 - elem.document && elem.document.nodeType !== 11 ) { - return ret; - } - } catch (e) {} - } - - return Sizzle( expr, document, null, [ elem ] ).length > 0; -}; - -Sizzle.contains = function( context, elem ) { - // Set document vars if needed - if ( ( context.ownerDocument || context ) !== document ) { - setDocument( context ); - } - return contains( context, elem ); -}; - -Sizzle.attr = function( elem, name ) { - // Set document vars if needed - if ( ( elem.ownerDocument || elem ) !== document ) { - setDocument( elem ); - } - - var fn = Expr.attrHandle[ name.toLowerCase() ], - // Don't get fooled by Object.prototype properties (jQuery #13807) - val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ? - fn( elem, name, !documentIsHTML ) : - undefined; - - return val !== undefined ? - val : - support.attributes || !documentIsHTML ? - elem.getAttribute( name ) : - (val = elem.getAttributeNode(name)) && val.specified ? - val.value : - null; -}; - -Sizzle.error = function( msg ) { - throw new Error( "Syntax error, unrecognized expression: " + msg ); -}; - -/** - * Document sorting and removing duplicates - * @param {ArrayLike} results - */ -Sizzle.uniqueSort = function( results ) { - var elem, - duplicates = [], - j = 0, - i = 0; - - // Unless we *know* we can detect duplicates, assume their presence - hasDuplicate = !support.detectDuplicates; - sortInput = !support.sortStable && results.slice( 0 ); - results.sort( sortOrder ); - - if ( hasDuplicate ) { - while ( (elem = results[i++]) ) { - if ( elem === results[ i ] ) { - j = duplicates.push( i ); - } - } - while ( j-- ) { - results.splice( duplicates[ j ], 1 ); - } - } - - // Clear input after sorting to release objects - // See https://github.com/jquery/sizzle/pull/225 - sortInput = null; - - return results; -}; - -/** - * Utility function for retrieving the text value of an array of DOM nodes - * @param {Array|Element} elem - */ -getText = Sizzle.getText = function( elem ) { - var node, - ret = "", - i = 0, - nodeType = elem.nodeType; - - if ( !nodeType ) { - // If no nodeType, this is expected to be an array - while ( (node = elem[i++]) ) { - // Do not traverse comment nodes - ret += getText( node ); - } - } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) { - // Use textContent for elements - // innerText usage removed for consistency of new lines (jQuery #11153) - if ( typeof elem.textContent === "string" ) { - return elem.textContent; - } else { - // Traverse its children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - ret += getText( elem ); - } - } - } else if ( nodeType === 3 || nodeType === 4 ) { - return elem.nodeValue; - } - // Do not include comment or processing instruction nodes - - return ret; -}; - -Expr = Sizzle.selectors = { - - // Can be adjusted by the user - cacheLength: 50, - - createPseudo: markFunction, - - match: matchExpr, - - attrHandle: {}, - - find: {}, - - relative: { - ">": { dir: "parentNode", first: true }, - " ": { dir: "parentNode" }, - "+": { dir: "previousSibling", first: true }, - "~": { dir: "previousSibling" } - }, - - preFilter: { - "ATTR": function( match ) { - match[1] = match[1].replace( runescape, funescape ); - - // Move the given value to match[3] whether quoted or unquoted - match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape ); - - if ( match[2] === "~=" ) { - match[3] = " " + match[3] + " "; - } - - return match.slice( 0, 4 ); - }, - - "CHILD": function( match ) { - /* matches from matchExpr["CHILD"] - 1 type (only|nth|...) - 2 what (child|of-type) - 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...) - 4 xn-component of xn+y argument ([+-]?\d*n|) - 5 sign of xn-component - 6 x of xn-component - 7 sign of y-component - 8 y of y-component - */ - match[1] = match[1].toLowerCase(); - - if ( match[1].slice( 0, 3 ) === "nth" ) { - // nth-* requires argument - if ( !match[3] ) { - Sizzle.error( match[0] ); - } - - // numeric x and y parameters for Expr.filter.CHILD - // remember that false/true cast respectively to 0/1 - match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) ); - match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" ); - - // other types prohibit arguments - } else if ( match[3] ) { - Sizzle.error( match[0] ); - } - - return match; - }, - - "PSEUDO": function( match ) { - var excess, - unquoted = !match[6] && match[2]; - - if ( matchExpr["CHILD"].test( match[0] ) ) { - return null; - } - - // Accept quoted arguments as-is - if ( match[3] ) { - match[2] = match[4] || match[5] || ""; - - // Strip excess characters from unquoted arguments - } else if ( unquoted && rpseudo.test( unquoted ) && - // Get excess from tokenize (recursively) - (excess = tokenize( unquoted, true )) && - // advance to the next closing parenthesis - (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) { - - // excess is a negative index - match[0] = match[0].slice( 0, excess ); - match[2] = unquoted.slice( 0, excess ); - } - - // Return only captures needed by the pseudo filter method (type and argument) - return match.slice( 0, 3 ); - } - }, - - filter: { - - "TAG": function( nodeNameSelector ) { - var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase(); - return nodeNameSelector === "*" ? - function() { return true; } : - function( elem ) { - return elem.nodeName && elem.nodeName.toLowerCase() === nodeName; - }; - }, - - "CLASS": function( className ) { - var pattern = classCache[ className + " " ]; - - return pattern || - (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) && - classCache( className, function( elem ) { - return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" ); - }); - }, - - "ATTR": function( name, operator, check ) { - return function( elem ) { - var result = Sizzle.attr( elem, name ); - - if ( result == null ) { - return operator === "!="; - } - if ( !operator ) { - return true; - } - - result += ""; - - return operator === "=" ? result === check : - operator === "!=" ? result !== check : - operator === "^=" ? check && result.indexOf( check ) === 0 : - operator === "*=" ? check && result.indexOf( check ) > -1 : - operator === "$=" ? check && result.slice( -check.length ) === check : - operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 : - operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" : - false; - }; - }, - - "CHILD": function( type, what, argument, first, last ) { - var simple = type.slice( 0, 3 ) !== "nth", - forward = type.slice( -4 ) !== "last", - ofType = what === "of-type"; - - return first === 1 && last === 0 ? - - // Shortcut for :nth-*(n) - function( elem ) { - return !!elem.parentNode; - } : - - function( elem, context, xml ) { - var cache, outerCache, node, diff, nodeIndex, start, - dir = simple !== forward ? "nextSibling" : "previousSibling", - parent = elem.parentNode, - name = ofType && elem.nodeName.toLowerCase(), - useCache = !xml && !ofType; - - if ( parent ) { - - // :(first|last|only)-(child|of-type) - if ( simple ) { - while ( dir ) { - node = elem; - while ( (node = node[ dir ]) ) { - if ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) { - return false; - } - } - // Reverse direction for :only-* (if we haven't yet done so) - start = dir = type === "only" && !start && "nextSibling"; - } - return true; - } - - start = [ forward ? parent.firstChild : parent.lastChild ]; - - // non-xml :nth-child(...) stores cache data on `parent` - if ( forward && useCache ) { - // Seek `elem` from a previously-cached index - outerCache = parent[ expando ] || (parent[ expando ] = {}); - cache = outerCache[ type ] || []; - nodeIndex = cache[0] === dirruns && cache[1]; - diff = cache[0] === dirruns && cache[2]; - node = nodeIndex && parent.childNodes[ nodeIndex ]; - - while ( (node = ++nodeIndex && node && node[ dir ] || - - // Fallback to seeking `elem` from the start - (diff = nodeIndex = 0) || start.pop()) ) { - - // When found, cache indexes on `parent` and break - if ( node.nodeType === 1 && ++diff && node === elem ) { - outerCache[ type ] = [ dirruns, nodeIndex, diff ]; - break; - } - } - - // Use previously-cached element index if available - } else if ( useCache && (cache = (elem[ expando ] || (elem[ expando ] = {}))[ type ]) && cache[0] === dirruns ) { - diff = cache[1]; - - // xml :nth-child(...) or :nth-last-child(...) or :nth(-last)?-of-type(...) - } else { - // Use the same loop as above to seek `elem` from the start - while ( (node = ++nodeIndex && node && node[ dir ] || - (diff = nodeIndex = 0) || start.pop()) ) { - - if ( ( ofType ? node.nodeName.toLowerCase() === name : node.nodeType === 1 ) && ++diff ) { - // Cache the index of each encountered element - if ( useCache ) { - (node[ expando ] || (node[ expando ] = {}))[ type ] = [ dirruns, diff ]; - } - - if ( node === elem ) { - break; - } - } - } - } - - // Incorporate the offset, then check against cycle size - diff -= last; - return diff === first || ( diff % first === 0 && diff / first >= 0 ); - } - }; - }, - - "PSEUDO": function( pseudo, argument ) { - // pseudo-class names are case-insensitive - // http://www.w3.org/TR/selectors/#pseudo-classes - // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters - // Remember that setFilters inherits from pseudos - var args, - fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] || - Sizzle.error( "unsupported pseudo: " + pseudo ); - - // The user may use createPseudo to indicate that - // arguments are needed to create the filter function - // just as Sizzle does - if ( fn[ expando ] ) { - return fn( argument ); - } - - // But maintain support for old signatures - if ( fn.length > 1 ) { - args = [ pseudo, pseudo, "", argument ]; - return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ? - markFunction(function( seed, matches ) { - var idx, - matched = fn( seed, argument ), - i = matched.length; - while ( i-- ) { - idx = indexOf( seed, matched[i] ); - seed[ idx ] = !( matches[ idx ] = matched[i] ); - } - }) : - function( elem ) { - return fn( elem, 0, args ); - }; - } - - return fn; - } - }, - - pseudos: { - // Potentially complex pseudos - "not": markFunction(function( selector ) { - // Trim the selector passed to compile - // to avoid treating leading and trailing - // spaces as combinators - var input = [], - results = [], - matcher = compile( selector.replace( rtrim, "$1" ) ); - - return matcher[ expando ] ? - markFunction(function( seed, matches, context, xml ) { - var elem, - unmatched = matcher( seed, null, xml, [] ), - i = seed.length; - - // Match elements unmatched by `matcher` - while ( i-- ) { - if ( (elem = unmatched[i]) ) { - seed[i] = !(matches[i] = elem); - } - } - }) : - function( elem, context, xml ) { - input[0] = elem; - matcher( input, null, xml, results ); - // Don't keep the element (issue #299) - input[0] = null; - return !results.pop(); - }; - }), - - "has": markFunction(function( selector ) { - return function( elem ) { - return Sizzle( selector, elem ).length > 0; - }; - }), - - "contains": markFunction(function( text ) { - text = text.replace( runescape, funescape ); - return function( elem ) { - return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1; - }; - }), - - // "Whether an element is represented by a :lang() selector - // is based solely on the element's language value - // being equal to the identifier C, - // or beginning with the identifier C immediately followed by "-". - // The matching of C against the element's language value is performed case-insensitively. - // The identifier C does not have to be a valid language name." - // http://www.w3.org/TR/selectors/#lang-pseudo - "lang": markFunction( function( lang ) { - // lang value must be a valid identifier - if ( !ridentifier.test(lang || "") ) { - Sizzle.error( "unsupported lang: " + lang ); - } - lang = lang.replace( runescape, funescape ).toLowerCase(); - return function( elem ) { - var elemLang; - do { - if ( (elemLang = documentIsHTML ? - elem.lang : - elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) { - - elemLang = elemLang.toLowerCase(); - return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0; - } - } while ( (elem = elem.parentNode) && elem.nodeType === 1 ); - return false; - }; - }), - - // Miscellaneous - "target": function( elem ) { - var hash = window.location && window.location.hash; - return hash && hash.slice( 1 ) === elem.id; - }, - - "root": function( elem ) { - return elem === docElem; - }, - - "focus": function( elem ) { - return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex); - }, - - // Boolean properties - "enabled": function( elem ) { - return elem.disabled === false; - }, - - "disabled": function( elem ) { - return elem.disabled === true; - }, - - "checked": function( elem ) { - // In CSS3, :checked should return both checked and selected elements - // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked - var nodeName = elem.nodeName.toLowerCase(); - return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected); - }, - - "selected": function( elem ) { - // Accessing this property makes selected-by-default - // options in Safari work properly - if ( elem.parentNode ) { - elem.parentNode.selectedIndex; - } - - return elem.selected === true; - }, - - // Contents - "empty": function( elem ) { - // http://www.w3.org/TR/selectors/#empty-pseudo - // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5), - // but not by others (comment: 8; processing instruction: 7; etc.) - // nodeType < 6 works because attributes (2) do not appear as children - for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) { - if ( elem.nodeType < 6 ) { - return false; - } - } - return true; - }, - - "parent": function( elem ) { - return !Expr.pseudos["empty"]( elem ); - }, - - // Element/input types - "header": function( elem ) { - return rheader.test( elem.nodeName ); - }, - - "input": function( elem ) { - return rinputs.test( elem.nodeName ); - }, - - "button": function( elem ) { - var name = elem.nodeName.toLowerCase(); - return name === "input" && elem.type === "button" || name === "button"; - }, - - "text": function( elem ) { - var attr; - return elem.nodeName.toLowerCase() === "input" && - elem.type === "text" && - - // Support: IE<8 - // New HTML5 attribute values (e.g., "search") appear with elem.type === "text" - ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" ); - }, - - // Position-in-collection - "first": createPositionalPseudo(function() { - return [ 0 ]; - }), - - "last": createPositionalPseudo(function( matchIndexes, length ) { - return [ length - 1 ]; - }), - - "eq": createPositionalPseudo(function( matchIndexes, length, argument ) { - return [ argument < 0 ? argument + length : argument ]; - }), - - "even": createPositionalPseudo(function( matchIndexes, length ) { - var i = 0; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "odd": createPositionalPseudo(function( matchIndexes, length ) { - var i = 1; - for ( ; i < length; i += 2 ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "lt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; --i >= 0; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }), - - "gt": createPositionalPseudo(function( matchIndexes, length, argument ) { - var i = argument < 0 ? argument + length : argument; - for ( ; ++i < length; ) { - matchIndexes.push( i ); - } - return matchIndexes; - }) - } -}; - -Expr.pseudos["nth"] = Expr.pseudos["eq"]; - -// Add button/input type pseudos -for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) { - Expr.pseudos[ i ] = createInputPseudo( i ); -} -for ( i in { submit: true, reset: true } ) { - Expr.pseudos[ i ] = createButtonPseudo( i ); -} - -// Easy API for creating new setFilters -function setFilters() {} -setFilters.prototype = Expr.filters = Expr.pseudos; -Expr.setFilters = new setFilters(); - -tokenize = Sizzle.tokenize = function( selector, parseOnly ) { - var matched, match, tokens, type, - soFar, groups, preFilters, - cached = tokenCache[ selector + " " ]; - - if ( cached ) { - return parseOnly ? 0 : cached.slice( 0 ); - } - - soFar = selector; - groups = []; - preFilters = Expr.preFilter; - - while ( soFar ) { - - // Comma and first run - if ( !matched || (match = rcomma.exec( soFar )) ) { - if ( match ) { - // Don't consume trailing commas as valid - soFar = soFar.slice( match[0].length ) || soFar; - } - groups.push( (tokens = []) ); - } - - matched = false; - - // Combinators - if ( (match = rcombinators.exec( soFar )) ) { - matched = match.shift(); - tokens.push({ - value: matched, - // Cast descendant combinators to space - type: match[0].replace( rtrim, " " ) - }); - soFar = soFar.slice( matched.length ); - } - - // Filters - for ( type in Expr.filter ) { - if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] || - (match = preFilters[ type ]( match ))) ) { - matched = match.shift(); - tokens.push({ - value: matched, - type: type, - matches: match - }); - soFar = soFar.slice( matched.length ); - } - } - - if ( !matched ) { - break; - } - } - - // Return the length of the invalid excess - // if we're just parsing - // Otherwise, throw an error or return tokens - return parseOnly ? - soFar.length : - soFar ? - Sizzle.error( selector ) : - // Cache the tokens - tokenCache( selector, groups ).slice( 0 ); -}; - -function toSelector( tokens ) { - var i = 0, - len = tokens.length, - selector = ""; - for ( ; i < len; i++ ) { - selector += tokens[i].value; - } - return selector; -} - -function addCombinator( matcher, combinator, base ) { - var dir = combinator.dir, - checkNonElements = base && dir === "parentNode", - doneName = done++; - - return combinator.first ? - // Check against closest ancestor/preceding element - function( elem, context, xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - return matcher( elem, context, xml ); - } - } - } : - - // Check against all ancestor/preceding elements - function( elem, context, xml ) { - var oldCache, outerCache, - newCache = [ dirruns, doneName ]; - - // We can't set arbitrary data on XML nodes, so they don't benefit from dir caching - if ( xml ) { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - if ( matcher( elem, context, xml ) ) { - return true; - } - } - } - } else { - while ( (elem = elem[ dir ]) ) { - if ( elem.nodeType === 1 || checkNonElements ) { - outerCache = elem[ expando ] || (elem[ expando ] = {}); - if ( (oldCache = outerCache[ dir ]) && - oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) { - - // Assign to newCache so results back-propagate to previous elements - return (newCache[ 2 ] = oldCache[ 2 ]); - } else { - // Reuse newcache so results back-propagate to previous elements - outerCache[ dir ] = newCache; - - // A match means we're done; a fail means we have to keep checking - if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) { - return true; - } - } - } - } - } - }; -} - -function elementMatcher( matchers ) { - return matchers.length > 1 ? - function( elem, context, xml ) { - var i = matchers.length; - while ( i-- ) { - if ( !matchers[i]( elem, context, xml ) ) { - return false; - } - } - return true; - } : - matchers[0]; -} - -function multipleContexts( selector, contexts, results ) { - var i = 0, - len = contexts.length; - for ( ; i < len; i++ ) { - Sizzle( selector, contexts[i], results ); - } - return results; -} - -function condense( unmatched, map, filter, context, xml ) { - var elem, - newUnmatched = [], - i = 0, - len = unmatched.length, - mapped = map != null; - - for ( ; i < len; i++ ) { - if ( (elem = unmatched[i]) ) { - if ( !filter || filter( elem, context, xml ) ) { - newUnmatched.push( elem ); - if ( mapped ) { - map.push( i ); - } - } - } - } - - return newUnmatched; -} - -function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) { - if ( postFilter && !postFilter[ expando ] ) { - postFilter = setMatcher( postFilter ); - } - if ( postFinder && !postFinder[ expando ] ) { - postFinder = setMatcher( postFinder, postSelector ); - } - return markFunction(function( seed, results, context, xml ) { - var temp, i, elem, - preMap = [], - postMap = [], - preexisting = results.length, - - // Get initial elements from seed or context - elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ), - - // Prefilter to get matcher input, preserving a map for seed-results synchronization - matcherIn = preFilter && ( seed || !selector ) ? - condense( elems, preMap, preFilter, context, xml ) : - elems, - - matcherOut = matcher ? - // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results, - postFinder || ( seed ? preFilter : preexisting || postFilter ) ? - - // ...intermediate processing is necessary - [] : - - // ...otherwise use results directly - results : - matcherIn; - - // Find primary matches - if ( matcher ) { - matcher( matcherIn, matcherOut, context, xml ); - } - - // Apply postFilter - if ( postFilter ) { - temp = condense( matcherOut, postMap ); - postFilter( temp, [], context, xml ); - - // Un-match failing elements by moving them back to matcherIn - i = temp.length; - while ( i-- ) { - if ( (elem = temp[i]) ) { - matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem); - } - } - } - - if ( seed ) { - if ( postFinder || preFilter ) { - if ( postFinder ) { - // Get the final matcherOut by condensing this intermediate into postFinder contexts - temp = []; - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) ) { - // Restore matcherIn since elem is not yet a final match - temp.push( (matcherIn[i] = elem) ); - } - } - postFinder( null, (matcherOut = []), temp, xml ); - } - - // Move matched elements from seed to results to keep them synchronized - i = matcherOut.length; - while ( i-- ) { - if ( (elem = matcherOut[i]) && - (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) { - - seed[temp] = !(results[temp] = elem); - } - } - } - - // Add elements to results, through postFinder if defined - } else { - matcherOut = condense( - matcherOut === results ? - matcherOut.splice( preexisting, matcherOut.length ) : - matcherOut - ); - if ( postFinder ) { - postFinder( null, results, matcherOut, xml ); - } else { - push.apply( results, matcherOut ); - } - } - }); -} - -function matcherFromTokens( tokens ) { - var checkContext, matcher, j, - len = tokens.length, - leadingRelative = Expr.relative[ tokens[0].type ], - implicitRelative = leadingRelative || Expr.relative[" "], - i = leadingRelative ? 1 : 0, - - // The foundational matcher ensures that elements are reachable from top-level context(s) - matchContext = addCombinator( function( elem ) { - return elem === checkContext; - }, implicitRelative, true ), - matchAnyContext = addCombinator( function( elem ) { - return indexOf( checkContext, elem ) > -1; - }, implicitRelative, true ), - matchers = [ function( elem, context, xml ) { - var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || ( - (checkContext = context).nodeType ? - matchContext( elem, context, xml ) : - matchAnyContext( elem, context, xml ) ); - // Avoid hanging onto element (issue #299) - checkContext = null; - return ret; - } ]; - - for ( ; i < len; i++ ) { - if ( (matcher = Expr.relative[ tokens[i].type ]) ) { - matchers = [ addCombinator(elementMatcher( matchers ), matcher) ]; - } else { - matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches ); - - // Return special upon seeing a positional matcher - if ( matcher[ expando ] ) { - // Find the next relative operator (if any) for proper handling - j = ++i; - for ( ; j < len; j++ ) { - if ( Expr.relative[ tokens[j].type ] ) { - break; - } - } - return setMatcher( - i > 1 && elementMatcher( matchers ), - i > 1 && toSelector( - // If the preceding token was a descendant combinator, insert an implicit any-element `*` - tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" }) - ).replace( rtrim, "$1" ), - matcher, - i < j && matcherFromTokens( tokens.slice( i, j ) ), - j < len && matcherFromTokens( (tokens = tokens.slice( j )) ), - j < len && toSelector( tokens ) - ); - } - matchers.push( matcher ); - } - } - - return elementMatcher( matchers ); -} - -function matcherFromGroupMatchers( elementMatchers, setMatchers ) { - var bySet = setMatchers.length > 0, - byElement = elementMatchers.length > 0, - superMatcher = function( seed, context, xml, results, outermost ) { - var elem, j, matcher, - matchedCount = 0, - i = "0", - unmatched = seed && [], - setMatched = [], - contextBackup = outermostContext, - // We must always have either seed elements or outermost context - elems = seed || byElement && Expr.find["TAG"]( "*", outermost ), - // Use integer dirruns iff this is the outermost matcher - dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1), - len = elems.length; - - if ( outermost ) { - outermostContext = context !== document && context; - } - - // Add elements passing elementMatchers directly to results - // Keep `i` a string if there are no elements so `matchedCount` will be "00" below - // Support: IE<9, Safari - // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id - for ( ; i !== len && (elem = elems[i]) != null; i++ ) { - if ( byElement && elem ) { - j = 0; - while ( (matcher = elementMatchers[j++]) ) { - if ( matcher( elem, context, xml ) ) { - results.push( elem ); - break; - } - } - if ( outermost ) { - dirruns = dirrunsUnique; - } - } - - // Track unmatched elements for set filters - if ( bySet ) { - // They will have gone through all possible matchers - if ( (elem = !matcher && elem) ) { - matchedCount--; - } - - // Lengthen the array for every element, matched or not - if ( seed ) { - unmatched.push( elem ); - } - } - } - - // Apply set filters to unmatched elements - matchedCount += i; - if ( bySet && i !== matchedCount ) { - j = 0; - while ( (matcher = setMatchers[j++]) ) { - matcher( unmatched, setMatched, context, xml ); - } - - if ( seed ) { - // Reintegrate element matches to eliminate the need for sorting - if ( matchedCount > 0 ) { - while ( i-- ) { - if ( !(unmatched[i] || setMatched[i]) ) { - setMatched[i] = pop.call( results ); - } - } - } - - // Discard index placeholder values to get only actual matches - setMatched = condense( setMatched ); - } - - // Add matches to results - push.apply( results, setMatched ); - - // Seedless set matches succeeding multiple successful matchers stipulate sorting - if ( outermost && !seed && setMatched.length > 0 && - ( matchedCount + setMatchers.length ) > 1 ) { - - Sizzle.uniqueSort( results ); - } - } - - // Override manipulation of globals by nested matchers - if ( outermost ) { - dirruns = dirrunsUnique; - outermostContext = contextBackup; - } - - return unmatched; - }; - - return bySet ? - markFunction( superMatcher ) : - superMatcher; -} - -compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) { - var i, - setMatchers = [], - elementMatchers = [], - cached = compilerCache[ selector + " " ]; - - if ( !cached ) { - // Generate a function of recursive functions that can be used to check each element - if ( !match ) { - match = tokenize( selector ); - } - i = match.length; - while ( i-- ) { - cached = matcherFromTokens( match[i] ); - if ( cached[ expando ] ) { - setMatchers.push( cached ); - } else { - elementMatchers.push( cached ); - } - } - - // Cache the compiled function - cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) ); - - // Save selector and tokenization - cached.selector = selector; - } - return cached; -}; - -/** - * A low-level selection function that works with Sizzle's compiled - * selector functions - * @param {String|Function} selector A selector or a pre-compiled - * selector function built with Sizzle.compile - * @param {Element} context - * @param {Array} [results] - * @param {Array} [seed] A set of elements to match against - */ -select = Sizzle.select = function( selector, context, results, seed ) { - var i, tokens, token, type, find, - compiled = typeof selector === "function" && selector, - match = !seed && tokenize( (selector = compiled.selector || selector) ); - - results = results || []; - - // Try to minimize operations if there is no seed and only one group - if ( match.length === 1 ) { - - // Take a shortcut and set the context if the root selector is an ID - tokens = match[0] = match[0].slice( 0 ); - if ( tokens.length > 2 && (token = tokens[0]).type === "ID" && - support.getById && context.nodeType === 9 && documentIsHTML && - Expr.relative[ tokens[1].type ] ) { - - context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0]; - if ( !context ) { - return results; - - // Precompiled matchers will still verify ancestry, so step up a level - } else if ( compiled ) { - context = context.parentNode; - } - - selector = selector.slice( tokens.shift().value.length ); - } - - // Fetch a seed set for right-to-left matching - i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length; - while ( i-- ) { - token = tokens[i]; - - // Abort if we hit a combinator - if ( Expr.relative[ (type = token.type) ] ) { - break; - } - if ( (find = Expr.find[ type ]) ) { - // Search, expanding context for leading sibling combinators - if ( (seed = find( - token.matches[0].replace( runescape, funescape ), - rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context - )) ) { - - // If seed is empty or no tokens remain, we can return early - tokens.splice( i, 1 ); - selector = seed.length && toSelector( tokens ); - if ( !selector ) { - push.apply( results, seed ); - return results; - } - - break; - } - } - } - } - - // Compile and execute a filtering function if one is not provided - // Provide `match` to avoid retokenization if we modified the selector above - ( compiled || compile( selector, match ) )( - seed, - context, - !documentIsHTML, - results, - rsibling.test( selector ) && testContext( context.parentNode ) || context - ); - return results; -}; - -// One-time assignments - -// Sort stability -support.sortStable = expando.split("").sort( sortOrder ).join("") === expando; - -// Support: Chrome 14-35+ -// Always assume duplicates if they aren't passed to the comparison function -support.detectDuplicates = !!hasDuplicate; - -// Initialize against the default document -setDocument(); - -// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27) -// Detached nodes confoundingly follow *each other* -support.sortDetached = assert(function( div1 ) { - // Should return 1, but returns 4 (following) - return div1.compareDocumentPosition( document.createElement("div") ) & 1; -}); - -// Support: IE<8 -// Prevent attribute/property "interpolation" -// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx -if ( !assert(function( div ) { - div.innerHTML = ""; - return div.firstChild.getAttribute("href") === "#" ; -}) ) { - addHandle( "type|href|height|width", function( elem, name, isXML ) { - if ( !isXML ) { - return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 ); - } - }); -} - -// Support: IE<9 -// Use defaultValue in place of getAttribute("value") -if ( !support.attributes || !assert(function( div ) { - div.innerHTML = ""; - div.firstChild.setAttribute( "value", "" ); - return div.firstChild.getAttribute( "value" ) === ""; -}) ) { - addHandle( "value", function( elem, name, isXML ) { - if ( !isXML && elem.nodeName.toLowerCase() === "input" ) { - return elem.defaultValue; - } - }); -} - -// Support: IE<9 -// Use getAttributeNode to fetch booleans when getAttribute lies -if ( !assert(function( div ) { - return div.getAttribute("disabled") == null; -}) ) { - addHandle( booleans, function( elem, name, isXML ) { - var val; - if ( !isXML ) { - return elem[ name ] === true ? name.toLowerCase() : - (val = elem.getAttributeNode( name )) && val.specified ? - val.value : - null; - } - }); -} - -return Sizzle; - -})( window ); - - - -jQuery.find = Sizzle; -jQuery.expr = Sizzle.selectors; -jQuery.expr[":"] = jQuery.expr.pseudos; -jQuery.unique = Sizzle.uniqueSort; -jQuery.text = Sizzle.getText; -jQuery.isXMLDoc = Sizzle.isXML; -jQuery.contains = Sizzle.contains; - - - -var rneedsContext = jQuery.expr.match.needsContext; - -var rsingleTag = (/^<(\w+)\s*\/?>(?:<\/\1>|)$/); - - - -var risSimple = /^.[^:#\[\.,]*$/; - -// Implement the identical functionality for filter and not -function winnow( elements, qualifier, not ) { - if ( jQuery.isFunction( qualifier ) ) { - return jQuery.grep( elements, function( elem, i ) { - /* jshint -W018 */ - return !!qualifier.call( elem, i, elem ) !== not; - }); - - } - - if ( qualifier.nodeType ) { - return jQuery.grep( elements, function( elem ) { - return ( elem === qualifier ) !== not; - }); - - } - - if ( typeof qualifier === "string" ) { - if ( risSimple.test( qualifier ) ) { - return jQuery.filter( qualifier, elements, not ); - } - - qualifier = jQuery.filter( qualifier, elements ); - } - - return jQuery.grep( elements, function( elem ) { - return ( indexOf.call( qualifier, elem ) >= 0 ) !== not; - }); -} - -jQuery.filter = function( expr, elems, not ) { - var elem = elems[ 0 ]; - - if ( not ) { - expr = ":not(" + expr + ")"; - } - - return elems.length === 1 && elem.nodeType === 1 ? - jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] : - jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) { - return elem.nodeType === 1; - })); -}; - -jQuery.fn.extend({ - find: function( selector ) { - var i, - len = this.length, - ret = [], - self = this; - - if ( typeof selector !== "string" ) { - return this.pushStack( jQuery( selector ).filter(function() { - for ( i = 0; i < len; i++ ) { - if ( jQuery.contains( self[ i ], this ) ) { - return true; - } - } - }) ); - } - - for ( i = 0; i < len; i++ ) { - jQuery.find( selector, self[ i ], ret ); - } - - // Needed because $( selector, context ) becomes $( context ).find( selector ) - ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret ); - ret.selector = this.selector ? this.selector + " " + selector : selector; - return ret; - }, - filter: function( selector ) { - return this.pushStack( winnow(this, selector || [], false) ); - }, - not: function( selector ) { - return this.pushStack( winnow(this, selector || [], true) ); - }, - is: function( selector ) { - return !!winnow( - this, - - // If this is a positional/relative selector, check membership in the returned set - // so $("p:first").is("p:last") won't return true for a doc with two "p". - typeof selector === "string" && rneedsContext.test( selector ) ? - jQuery( selector ) : - selector || [], - false - ).length; - } -}); - - -// Initialize a jQuery object - - -// A central reference to the root jQuery(document) -var rootjQuery, - - // A simple way to check for HTML strings - // Prioritize #id over to avoid XSS via location.hash (#9521) - // Strict HTML recognition (#11290: must start with <) - rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/, - - init = jQuery.fn.init = function( selector, context ) { - var match, elem; - - // HANDLE: $(""), $(null), $(undefined), $(false) - if ( !selector ) { - return this; - } - - // Handle HTML strings - if ( typeof selector === "string" ) { - if ( selector[0] === "<" && selector[ selector.length - 1 ] === ">" && selector.length >= 3 ) { - // Assume that strings that start and end with <> are HTML and skip the regex check - match = [ null, selector, null ]; - - } else { - match = rquickExpr.exec( selector ); - } - - // Match html or make sure no context is specified for #id - if ( match && (match[1] || !context) ) { - - // HANDLE: $(html) -> $(array) - if ( match[1] ) { - context = context instanceof jQuery ? context[0] : context; - - // Option to run scripts is true for back-compat - // Intentionally let the error be thrown if parseHTML is not present - jQuery.merge( this, jQuery.parseHTML( - match[1], - context && context.nodeType ? context.ownerDocument || context : document, - true - ) ); - - // HANDLE: $(html, props) - if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) { - for ( match in context ) { - // Properties of context are called as methods if possible - if ( jQuery.isFunction( this[ match ] ) ) { - this[ match ]( context[ match ] ); - - // ...and otherwise set as attributes - } else { - this.attr( match, context[ match ] ); - } - } - } - - return this; - - // HANDLE: $(#id) - } else { - elem = document.getElementById( match[2] ); - - // Support: Blackberry 4.6 - // gEBID returns nodes no longer in the document (#6963) - if ( elem && elem.parentNode ) { - // Inject the element directly into the jQuery object - this.length = 1; - this[0] = elem; - } - - this.context = document; - this.selector = selector; - return this; - } - - // HANDLE: $(expr, $(...)) - } else if ( !context || context.jquery ) { - return ( context || rootjQuery ).find( selector ); - - // HANDLE: $(expr, context) - // (which is just equivalent to: $(context).find(expr) - } else { - return this.constructor( context ).find( selector ); - } - - // HANDLE: $(DOMElement) - } else if ( selector.nodeType ) { - this.context = this[0] = selector; - this.length = 1; - return this; - - // HANDLE: $(function) - // Shortcut for document ready - } else if ( jQuery.isFunction( selector ) ) { - return typeof rootjQuery.ready !== "undefined" ? - rootjQuery.ready( selector ) : - // Execute immediately if ready is not present - selector( jQuery ); - } - - if ( selector.selector !== undefined ) { - this.selector = selector.selector; - this.context = selector.context; - } - - return jQuery.makeArray( selector, this ); - }; - -// Give the init function the jQuery prototype for later instantiation -init.prototype = jQuery.fn; - -// Initialize central reference -rootjQuery = jQuery( document ); - - -var rparentsprev = /^(?:parents|prev(?:Until|All))/, - // Methods guaranteed to produce a unique set when starting from a unique set - guaranteedUnique = { - children: true, - contents: true, - next: true, - prev: true - }; - -jQuery.extend({ - dir: function( elem, dir, until ) { - var matched = [], - truncate = until !== undefined; - - while ( (elem = elem[ dir ]) && elem.nodeType !== 9 ) { - if ( elem.nodeType === 1 ) { - if ( truncate && jQuery( elem ).is( until ) ) { - break; - } - matched.push( elem ); - } - } - return matched; - }, - - sibling: function( n, elem ) { - var matched = []; - - for ( ; n; n = n.nextSibling ) { - if ( n.nodeType === 1 && n !== elem ) { - matched.push( n ); - } - } - - return matched; - } -}); - -jQuery.fn.extend({ - has: function( target ) { - var targets = jQuery( target, this ), - l = targets.length; - - return this.filter(function() { - var i = 0; - for ( ; i < l; i++ ) { - if ( jQuery.contains( this, targets[i] ) ) { - return true; - } - } - }); - }, - - closest: function( selectors, context ) { - var cur, - i = 0, - l = this.length, - matched = [], - pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ? - jQuery( selectors, context || this.context ) : - 0; - - for ( ; i < l; i++ ) { - for ( cur = this[i]; cur && cur !== context; cur = cur.parentNode ) { - // Always skip document fragments - if ( cur.nodeType < 11 && (pos ? - pos.index(cur) > -1 : - - // Don't pass non-elements to Sizzle - cur.nodeType === 1 && - jQuery.find.matchesSelector(cur, selectors)) ) { - - matched.push( cur ); - break; - } - } - } - - return this.pushStack( matched.length > 1 ? jQuery.unique( matched ) : matched ); - }, - - // Determine the position of an element within the set - index: function( elem ) { - - // No argument, return index in parent - if ( !elem ) { - return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1; - } - - // Index in selector - if ( typeof elem === "string" ) { - return indexOf.call( jQuery( elem ), this[ 0 ] ); - } - - // Locate the position of the desired element - return indexOf.call( this, - - // If it receives a jQuery object, the first element is used - elem.jquery ? elem[ 0 ] : elem - ); - }, - - add: function( selector, context ) { - return this.pushStack( - jQuery.unique( - jQuery.merge( this.get(), jQuery( selector, context ) ) - ) - ); - }, - - addBack: function( selector ) { - return this.add( selector == null ? - this.prevObject : this.prevObject.filter(selector) - ); - } -}); - -function sibling( cur, dir ) { - while ( (cur = cur[dir]) && cur.nodeType !== 1 ) {} - return cur; -} - -jQuery.each({ - parent: function( elem ) { - var parent = elem.parentNode; - return parent && parent.nodeType !== 11 ? parent : null; - }, - parents: function( elem ) { - return jQuery.dir( elem, "parentNode" ); - }, - parentsUntil: function( elem, i, until ) { - return jQuery.dir( elem, "parentNode", until ); - }, - next: function( elem ) { - return sibling( elem, "nextSibling" ); - }, - prev: function( elem ) { - return sibling( elem, "previousSibling" ); - }, - nextAll: function( elem ) { - return jQuery.dir( elem, "nextSibling" ); - }, - prevAll: function( elem ) { - return jQuery.dir( elem, "previousSibling" ); - }, - nextUntil: function( elem, i, until ) { - return jQuery.dir( elem, "nextSibling", until ); - }, - prevUntil: function( elem, i, until ) { - return jQuery.dir( elem, "previousSibling", until ); - }, - siblings: function( elem ) { - return jQuery.sibling( ( elem.parentNode || {} ).firstChild, elem ); - }, - children: function( elem ) { - return jQuery.sibling( elem.firstChild ); - }, - contents: function( elem ) { - return elem.contentDocument || jQuery.merge( [], elem.childNodes ); - } -}, function( name, fn ) { - jQuery.fn[ name ] = function( until, selector ) { - var matched = jQuery.map( this, fn, until ); - - if ( name.slice( -5 ) !== "Until" ) { - selector = until; - } - - if ( selector && typeof selector === "string" ) { - matched = jQuery.filter( selector, matched ); - } - - if ( this.length > 1 ) { - // Remove duplicates - if ( !guaranteedUnique[ name ] ) { - jQuery.unique( matched ); - } - - // Reverse order for parents* and prev-derivatives - if ( rparentsprev.test( name ) ) { - matched.reverse(); - } - } - - return this.pushStack( matched ); - }; -}); -var rnotwhite = (/\S+/g); - - - -// String to Object options format cache -var optionsCache = {}; - -// Convert String-formatted options into Object-formatted ones and store in cache -function createOptions( options ) { - var object = optionsCache[ options ] = {}; - jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) { - object[ flag ] = true; - }); - return object; -} - -/* - * Create a callback list using the following parameters: - * - * options: an optional list of space-separated options that will change how - * the callback list behaves or a more traditional option object - * - * By default a callback list will act like an event callback list and can be - * "fired" multiple times. - * - * Possible options: - * - * once: will ensure the callback list can only be fired once (like a Deferred) - * - * memory: will keep track of previous values and will call any callback added - * after the list has been fired right away with the latest "memorized" - * values (like a Deferred) - * - * unique: will ensure a callback can only be added once (no duplicate in the list) - * - * stopOnFalse: interrupt callings when a callback returns false - * - */ -jQuery.Callbacks = function( options ) { - - // Convert options from String-formatted to Object-formatted if needed - // (we check in cache first) - options = typeof options === "string" ? - ( optionsCache[ options ] || createOptions( options ) ) : - jQuery.extend( {}, options ); - - var // Last fire value (for non-forgettable lists) - memory, - // Flag to know if list was already fired - fired, - // Flag to know if list is currently firing - firing, - // First callback to fire (used internally by add and fireWith) - firingStart, - // End of the loop when firing - firingLength, - // Index of currently firing callback (modified by remove if needed) - firingIndex, - // Actual callback list - list = [], - // Stack of fire calls for repeatable lists - stack = !options.once && [], - // Fire callbacks - fire = function( data ) { - memory = options.memory && data; - fired = true; - firingIndex = firingStart || 0; - firingStart = 0; - firingLength = list.length; - firing = true; - for ( ; list && firingIndex < firingLength; firingIndex++ ) { - if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) { - memory = false; // To prevent further calls using add - break; - } - } - firing = false; - if ( list ) { - if ( stack ) { - if ( stack.length ) { - fire( stack.shift() ); - } - } else if ( memory ) { - list = []; - } else { - self.disable(); - } - } - }, - // Actual Callbacks object - self = { - // Add a callback or a collection of callbacks to the list - add: function() { - if ( list ) { - // First, we save the current length - var start = list.length; - (function add( args ) { - jQuery.each( args, function( _, arg ) { - var type = jQuery.type( arg ); - if ( type === "function" ) { - if ( !options.unique || !self.has( arg ) ) { - list.push( arg ); - } - } else if ( arg && arg.length && type !== "string" ) { - // Inspect recursively - add( arg ); - } - }); - })( arguments ); - // Do we need to add the callbacks to the - // current firing batch? - if ( firing ) { - firingLength = list.length; - // With memory, if we're not firing then - // we should call right away - } else if ( memory ) { - firingStart = start; - fire( memory ); - } - } - return this; - }, - // Remove a callback from the list - remove: function() { - if ( list ) { - jQuery.each( arguments, function( _, arg ) { - var index; - while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) { - list.splice( index, 1 ); - // Handle firing indexes - if ( firing ) { - if ( index <= firingLength ) { - firingLength--; - } - if ( index <= firingIndex ) { - firingIndex--; - } - } - } - }); - } - return this; - }, - // Check if a given callback is in the list. - // If no argument is given, return whether or not list has callbacks attached. - has: function( fn ) { - return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length ); - }, - // Remove all callbacks from the list - empty: function() { - list = []; - firingLength = 0; - return this; - }, - // Have the list do nothing anymore - disable: function() { - list = stack = memory = undefined; - return this; - }, - // Is it disabled? - disabled: function() { - return !list; - }, - // Lock the list in its current state - lock: function() { - stack = undefined; - if ( !memory ) { - self.disable(); - } - return this; - }, - // Is it locked? - locked: function() { - return !stack; - }, - // Call all callbacks with the given context and arguments - fireWith: function( context, args ) { - if ( list && ( !fired || stack ) ) { - args = args || []; - args = [ context, args.slice ? args.slice() : args ]; - if ( firing ) { - stack.push( args ); - } else { - fire( args ); - } - } - return this; - }, - // Call all the callbacks with the given arguments - fire: function() { - self.fireWith( this, arguments ); - return this; - }, - // To know if the callbacks have already been called at least once - fired: function() { - return !!fired; - } - }; - - return self; -}; - - -jQuery.extend({ - - Deferred: function( func ) { - var tuples = [ - // action, add listener, listener list, final state - [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ], - [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ], - [ "notify", "progress", jQuery.Callbacks("memory") ] - ], - state = "pending", - promise = { - state: function() { - return state; - }, - always: function() { - deferred.done( arguments ).fail( arguments ); - return this; - }, - then: function( /* fnDone, fnFail, fnProgress */ ) { - var fns = arguments; - return jQuery.Deferred(function( newDefer ) { - jQuery.each( tuples, function( i, tuple ) { - var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ]; - // deferred[ done | fail | progress ] for forwarding actions to newDefer - deferred[ tuple[1] ](function() { - var returned = fn && fn.apply( this, arguments ); - if ( returned && jQuery.isFunction( returned.promise ) ) { - returned.promise() - .done( newDefer.resolve ) - .fail( newDefer.reject ) - .progress( newDefer.notify ); - } else { - newDefer[ tuple[ 0 ] + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments ); - } - }); - }); - fns = null; - }).promise(); - }, - // Get a promise for this deferred - // If obj is provided, the promise aspect is added to the object - promise: function( obj ) { - return obj != null ? jQuery.extend( obj, promise ) : promise; - } - }, - deferred = {}; - - // Keep pipe for back-compat - promise.pipe = promise.then; - - // Add list-specific methods - jQuery.each( tuples, function( i, tuple ) { - var list = tuple[ 2 ], - stateString = tuple[ 3 ]; - - // promise[ done | fail | progress ] = list.add - promise[ tuple[1] ] = list.add; - - // Handle state - if ( stateString ) { - list.add(function() { - // state = [ resolved | rejected ] - state = stateString; - - // [ reject_list | resolve_list ].disable; progress_list.lock - }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock ); - } - - // deferred[ resolve | reject | notify ] - deferred[ tuple[0] ] = function() { - deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments ); - return this; - }; - deferred[ tuple[0] + "With" ] = list.fireWith; - }); - - // Make the deferred a promise - promise.promise( deferred ); - - // Call given func if any - if ( func ) { - func.call( deferred, deferred ); - } - - // All done! - return deferred; - }, - - // Deferred helper - when: function( subordinate /* , ..., subordinateN */ ) { - var i = 0, - resolveValues = slice.call( arguments ), - length = resolveValues.length, - - // the count of uncompleted subordinates - remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0, - - // the master Deferred. If resolveValues consist of only a single Deferred, just use that. - deferred = remaining === 1 ? subordinate : jQuery.Deferred(), - - // Update function for both resolve and progress values - updateFunc = function( i, contexts, values ) { - return function( value ) { - contexts[ i ] = this; - values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value; - if ( values === progressValues ) { - deferred.notifyWith( contexts, values ); - } else if ( !( --remaining ) ) { - deferred.resolveWith( contexts, values ); - } - }; - }, - - progressValues, progressContexts, resolveContexts; - - // Add listeners to Deferred subordinates; treat others as resolved - if ( length > 1 ) { - progressValues = new Array( length ); - progressContexts = new Array( length ); - resolveContexts = new Array( length ); - for ( ; i < length; i++ ) { - if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) { - resolveValues[ i ].promise() - .done( updateFunc( i, resolveContexts, resolveValues ) ) - .fail( deferred.reject ) - .progress( updateFunc( i, progressContexts, progressValues ) ); - } else { - --remaining; - } - } - } - - // If we're not waiting on anything, resolve the master - if ( !remaining ) { - deferred.resolveWith( resolveContexts, resolveValues ); - } - - return deferred.promise(); - } -}); - - -// The deferred used on DOM ready -var readyList; - -jQuery.fn.ready = function( fn ) { - // Add the callback - jQuery.ready.promise().done( fn ); - - return this; -}; - -jQuery.extend({ - // Is the DOM ready to be used? Set to true once it occurs. - isReady: false, - - // A counter to track how many items to wait for before - // the ready event fires. See #6781 - readyWait: 1, - - // Hold (or release) the ready event - holdReady: function( hold ) { - if ( hold ) { - jQuery.readyWait++; - } else { - jQuery.ready( true ); - } - }, - - // Handle when the DOM is ready - ready: function( wait ) { - - // Abort if there are pending holds or we're already ready - if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) { - return; - } - - // Remember that the DOM is ready - jQuery.isReady = true; - - // If a normal DOM Ready event fired, decrement, and wait if need be - if ( wait !== true && --jQuery.readyWait > 0 ) { - return; - } - - // If there are functions bound, to execute - readyList.resolveWith( document, [ jQuery ] ); - - // Trigger any bound ready events - if ( jQuery.fn.triggerHandler ) { - jQuery( document ).triggerHandler( "ready" ); - jQuery( document ).off( "ready" ); - } - } -}); - -/** - * The ready event handler and self cleanup method - */ -function completed() { - document.removeEventListener( "DOMContentLoaded", completed, false ); - window.removeEventListener( "load", completed, false ); - jQuery.ready(); -} - -jQuery.ready.promise = function( obj ) { - if ( !readyList ) { - - readyList = jQuery.Deferred(); - - // Catch cases where $(document).ready() is called after the browser event has already occurred. - // We once tried to use readyState "interactive" here, but it caused issues like the one - // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15 - if ( document.readyState === "complete" ) { - // Handle it asynchronously to allow scripts the opportunity to delay ready - setTimeout( jQuery.ready ); - - } else { - - // Use the handy event callback - document.addEventListener( "DOMContentLoaded", completed, false ); - - // A fallback to window.onload, that will always work - window.addEventListener( "load", completed, false ); - } - } - return readyList.promise( obj ); -}; - -// Kick off the DOM ready check even if the user does not -jQuery.ready.promise(); - - - - -// Multifunctional method to get and set values of a collection -// The value/s can optionally be executed if it's a function -var access = jQuery.access = function( elems, fn, key, value, chainable, emptyGet, raw ) { - var i = 0, - len = elems.length, - bulk = key == null; - - // Sets many values - if ( jQuery.type( key ) === "object" ) { - chainable = true; - for ( i in key ) { - jQuery.access( elems, fn, i, key[i], true, emptyGet, raw ); - } - - // Sets one value - } else if ( value !== undefined ) { - chainable = true; - - if ( !jQuery.isFunction( value ) ) { - raw = true; - } - - if ( bulk ) { - // Bulk operations run against the entire set - if ( raw ) { - fn.call( elems, value ); - fn = null; - - // ...except when executing function values - } else { - bulk = fn; - fn = function( elem, key, value ) { - return bulk.call( jQuery( elem ), value ); - }; - } - } - - if ( fn ) { - for ( ; i < len; i++ ) { - fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) ); - } - } - } - - return chainable ? - elems : - - // Gets - bulk ? - fn.call( elems ) : - len ? fn( elems[0], key ) : emptyGet; -}; - - -/** - * Determines whether an object can have data - */ -jQuery.acceptData = function( owner ) { - // Accepts only: - // - Node - // - Node.ELEMENT_NODE - // - Node.DOCUMENT_NODE - // - Object - // - Any - /* jshint -W018 */ - return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); -}; - - -function Data() { - // Support: Android<4, - // Old WebKit does not have Object.preventExtensions/freeze method, - // return new empty object instead with no [[set]] accessor - Object.defineProperty( this.cache = {}, 0, { - get: function() { - return {}; - } - }); - - this.expando = jQuery.expando + Data.uid++; -} - -Data.uid = 1; -Data.accepts = jQuery.acceptData; - -Data.prototype = { - key: function( owner ) { - // We can accept data for non-element nodes in modern browsers, - // but we should not, see #8335. - // Always return the key for a frozen object. - if ( !Data.accepts( owner ) ) { - return 0; - } - - var descriptor = {}, - // Check if the owner object already has a cache key - unlock = owner[ this.expando ]; - - // If not, create one - if ( !unlock ) { - unlock = Data.uid++; - - // Secure it in a non-enumerable, non-writable property - try { - descriptor[ this.expando ] = { value: unlock }; - Object.defineProperties( owner, descriptor ); - - // Support: Android<4 - // Fallback to a less secure definition - } catch ( e ) { - descriptor[ this.expando ] = unlock; - jQuery.extend( owner, descriptor ); - } - } - - // Ensure the cache object - if ( !this.cache[ unlock ] ) { - this.cache[ unlock ] = {}; - } - - return unlock; - }, - set: function( owner, data, value ) { - var prop, - // There may be an unlock assigned to this node, - // if there is no entry for this "owner", create one inline - // and set the unlock as though an owner entry had always existed - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - // Handle: [ owner, key, value ] args - if ( typeof data === "string" ) { - cache[ data ] = value; - - // Handle: [ owner, { properties } ] args - } else { - // Fresh assignments by object are shallow copied - if ( jQuery.isEmptyObject( cache ) ) { - jQuery.extend( this.cache[ unlock ], data ); - // Otherwise, copy the properties one-by-one to the cache object - } else { - for ( prop in data ) { - cache[ prop ] = data[ prop ]; - } - } - } - return cache; - }, - get: function( owner, key ) { - // Either a valid cache is found, or will be created. - // New caches will be created and the unlock returned, - // allowing direct access to the newly created - // empty data object. A valid owner object must be provided. - var cache = this.cache[ this.key( owner ) ]; - - return key === undefined ? - cache : cache[ key ]; - }, - access: function( owner, key, value ) { - var stored; - // In cases where either: - // - // 1. No key was specified - // 2. A string key was specified, but no value provided - // - // Take the "read" path and allow the get method to determine - // which value to return, respectively either: - // - // 1. The entire cache object - // 2. The data stored at the key - // - if ( key === undefined || - ((key && typeof key === "string") && value === undefined) ) { - - stored = this.get( owner, key ); - - return stored !== undefined ? - stored : this.get( owner, jQuery.camelCase(key) ); - } - - // [*]When the key is not a string, or both a key and value - // are specified, set or extend (existing objects) with either: - // - // 1. An object of properties - // 2. A key and value - // - this.set( owner, key, value ); - - // Since the "set" path can have two possible entry points - // return the expected data based on which path was taken[*] - return value !== undefined ? value : key; - }, - remove: function( owner, key ) { - var i, name, camel, - unlock = this.key( owner ), - cache = this.cache[ unlock ]; - - if ( key === undefined ) { - this.cache[ unlock ] = {}; - - } else { - // Support array or space separated string of keys - if ( jQuery.isArray( key ) ) { - // If "name" is an array of keys... - // When data is initially created, via ("key", "val") signature, - // keys will be converted to camelCase. - // Since there is no way to tell _how_ a key was added, remove - // both plain key and camelCase key. #12786 - // This will only penalize the array argument path. - name = key.concat( key.map( jQuery.camelCase ) ); - } else { - camel = jQuery.camelCase( key ); - // Try the string as a key before any manipulation - if ( key in cache ) { - name = [ key, camel ]; - } else { - // If a key with the spaces exists, use it. - // Otherwise, create an array by matching non-whitespace - name = camel; - name = name in cache ? - [ name ] : ( name.match( rnotwhite ) || [] ); - } - } - - i = name.length; - while ( i-- ) { - delete cache[ name[ i ] ]; - } - } - }, - hasData: function( owner ) { - return !jQuery.isEmptyObject( - this.cache[ owner[ this.expando ] ] || {} - ); - }, - discard: function( owner ) { - if ( owner[ this.expando ] ) { - delete this.cache[ owner[ this.expando ] ]; - } - } -}; -var data_priv = new Data(); - -var data_user = new Data(); - - - -// Implementation Summary -// -// 1. Enforce API surface and semantic compatibility with 1.9.x branch -// 2. Improve the module's maintainability by reducing the storage -// paths to a single mechanism. -// 3. Use the same single mechanism to support "private" and "user" data. -// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData) -// 5. Avoid exposing implementation details on user objects (eg. expando properties) -// 6. Provide a clear path for implementation upgrade to WeakMap in 2014 - -var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, - rmultiDash = /([A-Z])/g; - -function dataAttr( elem, key, data ) { - var name; - - // If nothing was found internally, try to fetch any - // data from the HTML5 data-* attribute - if ( data === undefined && elem.nodeType === 1 ) { - name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase(); - data = elem.getAttribute( name ); - - if ( typeof data === "string" ) { - try { - data = data === "true" ? true : - data === "false" ? false : - data === "null" ? null : - // Only convert to a number if it doesn't change the string - +data + "" === data ? +data : - rbrace.test( data ) ? jQuery.parseJSON( data ) : - data; - } catch( e ) {} - - // Make sure we set the data so it isn't changed later - data_user.set( elem, key, data ); - } else { - data = undefined; - } - } - return data; -} - -jQuery.extend({ - hasData: function( elem ) { - return data_user.hasData( elem ) || data_priv.hasData( elem ); - }, - - data: function( elem, name, data ) { - return data_user.access( elem, name, data ); - }, - - removeData: function( elem, name ) { - data_user.remove( elem, name ); - }, - - // TODO: Now that all calls to _data and _removeData have been replaced - // with direct calls to data_priv methods, these can be deprecated. - _data: function( elem, name, data ) { - return data_priv.access( elem, name, data ); - }, - - _removeData: function( elem, name ) { - data_priv.remove( elem, name ); - } -}); - -jQuery.fn.extend({ - data: function( key, value ) { - var i, name, data, - elem = this[ 0 ], - attrs = elem && elem.attributes; - - // Gets all values - if ( key === undefined ) { - if ( this.length ) { - data = data_user.get( elem ); - - if ( elem.nodeType === 1 && !data_priv.get( elem, "hasDataAttrs" ) ) { - i = attrs.length; - while ( i-- ) { - - // Support: IE11+ - // The attrs elements can be null (#14894) - if ( attrs[ i ] ) { - name = attrs[ i ].name; - if ( name.indexOf( "data-" ) === 0 ) { - name = jQuery.camelCase( name.slice(5) ); - dataAttr( elem, name, data[ name ] ); - } - } - } - data_priv.set( elem, "hasDataAttrs", true ); - } - } - - return data; - } - - // Sets multiple values - if ( typeof key === "object" ) { - return this.each(function() { - data_user.set( this, key ); - }); - } - - return access( this, function( value ) { - var data, - camelKey = jQuery.camelCase( key ); - - // The calling jQuery object (element matches) is not empty - // (and therefore has an element appears at this[ 0 ]) and the - // `value` parameter was not undefined. An empty jQuery object - // will result in `undefined` for elem = this[ 0 ] which will - // throw an exception if an attempt to read a data cache is made. - if ( elem && value === undefined ) { - // Attempt to get data from the cache - // with the key as-is - data = data_user.get( elem, key ); - if ( data !== undefined ) { - return data; - } - - // Attempt to get data from the cache - // with the key camelized - data = data_user.get( elem, camelKey ); - if ( data !== undefined ) { - return data; - } - - // Attempt to "discover" the data in - // HTML5 custom data-* attrs - data = dataAttr( elem, camelKey, undefined ); - if ( data !== undefined ) { - return data; - } - - // We tried really hard, but the data doesn't exist. - return; - } - - // Set the data... - this.each(function() { - // First, attempt to store a copy or reference of any - // data that might've been store with a camelCased key. - var data = data_user.get( this, camelKey ); - - // For HTML5 data-* attribute interop, we have to - // store property names with dashes in a camelCase form. - // This might not apply to all properties...* - data_user.set( this, camelKey, value ); - - // *... In the case of properties that might _actually_ - // have dashes, we need to also store a copy of that - // unchanged property. - if ( key.indexOf("-") !== -1 && data !== undefined ) { - data_user.set( this, key, value ); - } - }); - }, null, value, arguments.length > 1, null, true ); - }, - - removeData: function( key ) { - return this.each(function() { - data_user.remove( this, key ); - }); - } -}); - - -jQuery.extend({ - queue: function( elem, type, data ) { - var queue; - - if ( elem ) { - type = ( type || "fx" ) + "queue"; - queue = data_priv.get( elem, type ); - - // Speed up dequeue by getting out quickly if this is just a lookup - if ( data ) { - if ( !queue || jQuery.isArray( data ) ) { - queue = data_priv.access( elem, type, jQuery.makeArray(data) ); - } else { - queue.push( data ); - } - } - return queue || []; - } - }, - - dequeue: function( elem, type ) { - type = type || "fx"; - - var queue = jQuery.queue( elem, type ), - startLength = queue.length, - fn = queue.shift(), - hooks = jQuery._queueHooks( elem, type ), - next = function() { - jQuery.dequeue( elem, type ); - }; - - // If the fx queue is dequeued, always remove the progress sentinel - if ( fn === "inprogress" ) { - fn = queue.shift(); - startLength--; - } - - if ( fn ) { - - // Add a progress sentinel to prevent the fx queue from being - // automatically dequeued - if ( type === "fx" ) { - queue.unshift( "inprogress" ); - } - - // Clear up the last queue stop function - delete hooks.stop; - fn.call( elem, next, hooks ); - } - - if ( !startLength && hooks ) { - hooks.empty.fire(); - } - }, - - // Not public - generate a queueHooks object, or return the current one - _queueHooks: function( elem, type ) { - var key = type + "queueHooks"; - return data_priv.get( elem, key ) || data_priv.access( elem, key, { - empty: jQuery.Callbacks("once memory").add(function() { - data_priv.remove( elem, [ type + "queue", key ] ); - }) - }); - } -}); - -jQuery.fn.extend({ - queue: function( type, data ) { - var setter = 2; - - if ( typeof type !== "string" ) { - data = type; - type = "fx"; - setter--; - } - - if ( arguments.length < setter ) { - return jQuery.queue( this[0], type ); - } - - return data === undefined ? - this : - this.each(function() { - var queue = jQuery.queue( this, type, data ); - - // Ensure a hooks for this queue - jQuery._queueHooks( this, type ); - - if ( type === "fx" && queue[0] !== "inprogress" ) { - jQuery.dequeue( this, type ); - } - }); - }, - dequeue: function( type ) { - return this.each(function() { - jQuery.dequeue( this, type ); - }); - }, - clearQueue: function( type ) { - return this.queue( type || "fx", [] ); - }, - // Get a promise resolved when queues of a certain type - // are emptied (fx is the type by default) - promise: function( type, obj ) { - var tmp, - count = 1, - defer = jQuery.Deferred(), - elements = this, - i = this.length, - resolve = function() { - if ( !( --count ) ) { - defer.resolveWith( elements, [ elements ] ); - } - }; - - if ( typeof type !== "string" ) { - obj = type; - type = undefined; - } - type = type || "fx"; - - while ( i-- ) { - tmp = data_priv.get( elements[ i ], type + "queueHooks" ); - if ( tmp && tmp.empty ) { - count++; - tmp.empty.add( resolve ); - } - } - resolve(); - return defer.promise( obj ); - } -}); -var pnum = (/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/).source; - -var cssExpand = [ "Top", "Right", "Bottom", "Left" ]; - -var isHidden = function( elem, el ) { - // isHidden might be called from jQuery#filter function; - // in that case, element will be second argument - elem = el || elem; - return jQuery.css( elem, "display" ) === "none" || !jQuery.contains( elem.ownerDocument, elem ); - }; - -var rcheckableType = (/^(?:checkbox|radio)$/i); - - - -(function() { - var fragment = document.createDocumentFragment(), - div = fragment.appendChild( document.createElement( "div" ) ), - input = document.createElement( "input" ); - - // Support: Safari<=5.1 - // Check state lost if the name is set (#11217) - // Support: Windows Web Apps (WWA) - // `name` and `type` must use .setAttribute for WWA (#14901) - input.setAttribute( "type", "radio" ); - input.setAttribute( "checked", "checked" ); - input.setAttribute( "name", "t" ); - - div.appendChild( input ); - - // Support: Safari<=5.1, Android<4.2 - // Older WebKit doesn't clone checked state correctly in fragments - support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; - - // Support: IE<=11+ - // Make sure textarea (and checkbox) defaultValue is properly cloned - div.innerHTML = ""; - support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; -})(); -var strundefined = typeof undefined; - - - -support.focusinBubbles = "onfocusin" in window; - - -var - rkeyEvent = /^key/, - rmouseEvent = /^(?:mouse|pointer|contextmenu)|click/, - rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, - rtypenamespace = /^([^.]*)(?:\.(.+)|)$/; - -function returnTrue() { - return true; -} - -function returnFalse() { - return false; -} - -function safeActiveElement() { - try { - return document.activeElement; - } catch ( err ) { } -} - -/* - * Helper functions for managing events -- not part of the public interface. - * Props to Dean Edwards' addEvent library for many of the ideas. - */ -jQuery.event = { - - global: {}, - - add: function( elem, types, handler, data, selector ) { - - var handleObjIn, eventHandle, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.get( elem ); - - // Don't attach events to noData or text/comment nodes (but allow plain objects) - if ( !elemData ) { - return; - } - - // Caller can pass in an object of custom data in lieu of the handler - if ( handler.handler ) { - handleObjIn = handler; - handler = handleObjIn.handler; - selector = handleObjIn.selector; - } - - // Make sure that the handler has a unique ID, used to find/remove it later - if ( !handler.guid ) { - handler.guid = jQuery.guid++; - } - - // Init the element's event structure and main handler, if this is the first - if ( !(events = elemData.events) ) { - events = elemData.events = {}; - } - if ( !(eventHandle = elemData.handle) ) { - eventHandle = elemData.handle = function( e ) { - // Discard the second event of a jQuery.event.trigger() and - // when an event is called after a page has unloaded - return typeof jQuery !== strundefined && jQuery.event.triggered !== e.type ? - jQuery.event.dispatch.apply( elem, arguments ) : undefined; - }; - } - - // Handle multiple events separated by a space - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // There *must* be a type, no attaching namespace-only handlers - if ( !type ) { - continue; - } - - // If event changes its type, use the special event handlers for the changed type - special = jQuery.event.special[ type ] || {}; - - // If selector defined, determine special event api type, otherwise given type - type = ( selector ? special.delegateType : special.bindType ) || type; - - // Update special based on newly reset type - special = jQuery.event.special[ type ] || {}; - - // handleObj is passed to all event handlers - handleObj = jQuery.extend({ - type: type, - origType: origType, - data: data, - handler: handler, - guid: handler.guid, - selector: selector, - needsContext: selector && jQuery.expr.match.needsContext.test( selector ), - namespace: namespaces.join(".") - }, handleObjIn ); - - // Init the event handler queue if we're the first - if ( !(handlers = events[ type ]) ) { - handlers = events[ type ] = []; - handlers.delegateCount = 0; - - // Only use addEventListener if the special events handler returns false - if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) { - if ( elem.addEventListener ) { - elem.addEventListener( type, eventHandle, false ); - } - } - } - - if ( special.add ) { - special.add.call( elem, handleObj ); - - if ( !handleObj.handler.guid ) { - handleObj.handler.guid = handler.guid; - } - } - - // Add to the element's handler list, delegates in front - if ( selector ) { - handlers.splice( handlers.delegateCount++, 0, handleObj ); - } else { - handlers.push( handleObj ); - } - - // Keep track of which events have ever been used, for event optimization - jQuery.event.global[ type ] = true; - } - - }, - - // Detach an event or set of events from an element - remove: function( elem, types, handler, selector, mappedTypes ) { - - var j, origCount, tmp, - events, t, handleObj, - special, handlers, type, namespaces, origType, - elemData = data_priv.hasData( elem ) && data_priv.get( elem ); - - if ( !elemData || !(events = elemData.events) ) { - return; - } - - // Once for each type.namespace in types; type may be omitted - types = ( types || "" ).match( rnotwhite ) || [ "" ]; - t = types.length; - while ( t-- ) { - tmp = rtypenamespace.exec( types[t] ) || []; - type = origType = tmp[1]; - namespaces = ( tmp[2] || "" ).split( "." ).sort(); - - // Unbind all events (on this namespace, if provided) for the element - if ( !type ) { - for ( type in events ) { - jQuery.event.remove( elem, type + types[ t ], handler, selector, true ); - } - continue; - } - - special = jQuery.event.special[ type ] || {}; - type = ( selector ? special.delegateType : special.bindType ) || type; - handlers = events[ type ] || []; - tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ); - - // Remove matching events - origCount = j = handlers.length; - while ( j-- ) { - handleObj = handlers[ j ]; - - if ( ( mappedTypes || origType === handleObj.origType ) && - ( !handler || handler.guid === handleObj.guid ) && - ( !tmp || tmp.test( handleObj.namespace ) ) && - ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) { - handlers.splice( j, 1 ); - - if ( handleObj.selector ) { - handlers.delegateCount--; - } - if ( special.remove ) { - special.remove.call( elem, handleObj ); - } - } - } - - // Remove generic event handler if we removed something and no more handlers exist - // (avoids potential for endless recursion during removal of special event handlers) - if ( origCount && !handlers.length ) { - if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) { - jQuery.removeEvent( elem, type, elemData.handle ); - } - - delete events[ type ]; - } - } - - // Remove the expando if it's no longer used - if ( jQuery.isEmptyObject( events ) ) { - delete elemData.handle; - data_priv.remove( elem, "events" ); - } - }, - - trigger: function( event, data, elem, onlyHandlers ) { - - var i, cur, tmp, bubbleType, ontype, handle, special, - eventPath = [ elem || document ], - type = hasOwn.call( event, "type" ) ? event.type : event, - namespaces = hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : []; - - cur = tmp = elem = elem || document; - - // Don't do events on text and comment nodes - if ( elem.nodeType === 3 || elem.nodeType === 8 ) { - return; - } - - // focus/blur morphs to focusin/out; ensure we're not firing them right now - if ( rfocusMorph.test( type + jQuery.event.triggered ) ) { - return; - } - - if ( type.indexOf(".") >= 0 ) { - // Namespaced trigger; create a regexp to match event type in handle() - namespaces = type.split("."); - type = namespaces.shift(); - namespaces.sort(); - } - ontype = type.indexOf(":") < 0 && "on" + type; - - // Caller can pass in a jQuery.Event object, Object, or just an event type string - event = event[ jQuery.expando ] ? - event : - new jQuery.Event( type, typeof event === "object" && event ); - - // Trigger bitmask: & 1 for native handlers; & 2 for jQuery (always true) - event.isTrigger = onlyHandlers ? 2 : 3; - event.namespace = namespaces.join("."); - event.namespace_re = event.namespace ? - new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) : - null; - - // Clean up the event in case it is being reused - event.result = undefined; - if ( !event.target ) { - event.target = elem; - } - - // Clone any incoming data and prepend the event, creating the handler arg list - data = data == null ? - [ event ] : - jQuery.makeArray( data, [ event ] ); - - // Allow special events to draw outside the lines - special = jQuery.event.special[ type ] || {}; - if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) { - return; - } - - // Determine event propagation path in advance, per W3C events spec (#9951) - // Bubble up to document, then to window; watch for a global ownerDocument var (#9724) - if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) { - - bubbleType = special.delegateType || type; - if ( !rfocusMorph.test( bubbleType + type ) ) { - cur = cur.parentNode; - } - for ( ; cur; cur = cur.parentNode ) { - eventPath.push( cur ); - tmp = cur; - } - - // Only add window if we got to document (e.g., not plain obj or detached DOM) - if ( tmp === (elem.ownerDocument || document) ) { - eventPath.push( tmp.defaultView || tmp.parentWindow || window ); - } - } - - // Fire handlers on the event path - i = 0; - while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) { - - event.type = i > 1 ? - bubbleType : - special.bindType || type; - - // jQuery handler - handle = ( data_priv.get( cur, "events" ) || {} )[ event.type ] && data_priv.get( cur, "handle" ); - if ( handle ) { - handle.apply( cur, data ); - } - - // Native handler - handle = ontype && cur[ ontype ]; - if ( handle && handle.apply && jQuery.acceptData( cur ) ) { - event.result = handle.apply( cur, data ); - if ( event.result === false ) { - event.preventDefault(); - } - } - } - event.type = type; - - // If nobody prevented the default action, do it now - if ( !onlyHandlers && !event.isDefaultPrevented() ) { - - if ( (!special._default || special._default.apply( eventPath.pop(), data ) === false) && - jQuery.acceptData( elem ) ) { - - // Call a native DOM method on the target with the same name name as the event. - // Don't do default actions on window, that's where global variables be (#6170) - if ( ontype && jQuery.isFunction( elem[ type ] ) && !jQuery.isWindow( elem ) ) { - - // Don't re-trigger an onFOO event when we call its FOO() method - tmp = elem[ ontype ]; - - if ( tmp ) { - elem[ ontype ] = null; - } - - // Prevent re-triggering of the same event, since we already bubbled it above - jQuery.event.triggered = type; - elem[ type ](); - jQuery.event.triggered = undefined; - - if ( tmp ) { - elem[ ontype ] = tmp; - } - } - } - } - - return event.result; - }, - - dispatch: function( event ) { - - // Make a writable jQuery.Event from the native event object - event = jQuery.event.fix( event ); - - var i, j, ret, matched, handleObj, - handlerQueue = [], - args = slice.call( arguments ), - handlers = ( data_priv.get( this, "events" ) || {} )[ event.type ] || [], - special = jQuery.event.special[ event.type ] || {}; - - // Use the fix-ed jQuery.Event rather than the (read-only) native event - args[0] = event; - event.delegateTarget = this; - - // Call the preDispatch hook for the mapped type, and let it bail if desired - if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) { - return; - } - - // Determine handlers - handlerQueue = jQuery.event.handlers.call( this, event, handlers ); - - // Run delegates first; they may want to stop propagation beneath us - i = 0; - while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) { - event.currentTarget = matched.elem; - - j = 0; - while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) { - - // Triggered event must either 1) have no namespace, or 2) have namespace(s) - // a subset or equal to those in the bound event (both can have no namespace). - if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) { - - event.handleObj = handleObj; - event.data = handleObj.data; - - ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler ) - .apply( matched.elem, args ); - - if ( ret !== undefined ) { - if ( (event.result = ret) === false ) { - event.preventDefault(); - event.stopPropagation(); - } - } - } - } - } - - // Call the postDispatch hook for the mapped type - if ( special.postDispatch ) { - special.postDispatch.call( this, event ); - } - - return event.result; - }, - - handlers: function( event, handlers ) { - var i, matches, sel, handleObj, - handlerQueue = [], - delegateCount = handlers.delegateCount, - cur = event.target; - - // Find delegate handlers - // Black-hole SVG instance trees (#13180) - // Avoid non-left-click bubbling in Firefox (#3861) - if ( delegateCount && cur.nodeType && (!event.button || event.type !== "click") ) { - - for ( ; cur !== this; cur = cur.parentNode || this ) { - - // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764) - if ( cur.disabled !== true || event.type !== "click" ) { - matches = []; - for ( i = 0; i < delegateCount; i++ ) { - handleObj = handlers[ i ]; - - // Don't conflict with Object.prototype properties (#13203) - sel = handleObj.selector + " "; - - if ( matches[ sel ] === undefined ) { - matches[ sel ] = handleObj.needsContext ? - jQuery( sel, this ).index( cur ) >= 0 : - jQuery.find( sel, this, null, [ cur ] ).length; - } - if ( matches[ sel ] ) { - matches.push( handleObj ); - } - } - if ( matches.length ) { - handlerQueue.push({ elem: cur, handlers: matches }); - } - } - } - } - - // Add the remaining (directly-bound) handlers - if ( delegateCount < handlers.length ) { - handlerQueue.push({ elem: this, handlers: handlers.slice( delegateCount ) }); - } - - return handlerQueue; - }, - - // Includes some event props shared by KeyEvent and MouseEvent - 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( event, original ) { - - // Add which for key events - if ( event.which == null ) { - event.which = original.charCode != null ? original.charCode : original.keyCode; - } - - return event; - } - }, - - mouseHooks: { - props: "button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "), - filter: function( event, original ) { - var eventDoc, doc, body, - button = original.button; - - // Calculate pageX/Y if missing and clientX/Y available - if ( event.pageX == null && original.clientX != null ) { - eventDoc = event.target.ownerDocument || document; - doc = eventDoc.documentElement; - body = eventDoc.body; - - event.pageX = original.clientX + ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) - ( doc && doc.clientLeft || body && body.clientLeft || 0 ); - event.pageY = original.clientY + ( doc && doc.scrollTop || body && body.scrollTop || 0 ) - ( doc && doc.clientTop || body && body.clientTop || 0 ); - } - - // Add which for click: 1 === left; 2 === middle; 3 === right - // Note: button is not normalized, so don't use it - if ( !event.which && button !== undefined ) { - event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) ); - } - - return event; - } - }, - - fix: function( event ) { - if ( event[ jQuery.expando ] ) { - return event; - } - - // Create a writable copy of the event object and normalize some properties - var i, prop, copy, - type = event.type, - originalEvent = event, - fixHook = this.fixHooks[ type ]; - - if ( !fixHook ) { - this.fixHooks[ type ] = fixHook = - rmouseEvent.test( type ) ? this.mouseHooks : - rkeyEvent.test( type ) ? this.keyHooks : - {}; - } - copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props; - - event = new jQuery.Event( originalEvent ); - - i = copy.length; - while ( i-- ) { - prop = copy[ i ]; - event[ prop ] = originalEvent[ prop ]; - } - - // Support: Cordova 2.5 (WebKit) (#13255) - // All events should have a target; Cordova deviceready doesn't - if ( !event.target ) { - event.target = document; - } - - // Support: Safari 6.0+, Chrome<28 - // Target should not be a text node (#504, #13143) - if ( event.target.nodeType === 3 ) { - event.target = event.target.parentNode; - } - - return fixHook.filter ? fixHook.filter( event, originalEvent ) : event; - }, - - special: { - load: { - // Prevent triggered image.load events from bubbling to window.load - noBubble: true - }, - focus: { - // Fire native event if possible so blur/focus sequence is correct - trigger: function() { - if ( this !== safeActiveElement() && this.focus ) { - this.focus(); - return false; - } - }, - delegateType: "focusin" - }, - blur: { - trigger: function() { - if ( this === safeActiveElement() && this.blur ) { - this.blur(); - return false; - } - }, - delegateType: "focusout" - }, - click: { - // For checkbox, fire native event so checked state will be right - trigger: function() { - if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) { - this.click(); - return false; - } - }, - - // For cross-browser consistency, don't fire native .click() on links - _default: function( event ) { - return jQuery.nodeName( event.target, "a" ); - } - }, - - beforeunload: { - postDispatch: function( event ) { - - // Support: Firefox 20+ - // Firefox doesn't alert if the returnValue field is not set. - if ( event.result !== undefined && event.originalEvent ) { - event.originalEvent.returnValue = event.result; - } - } - } - }, - - simulate: function( type, elem, event, bubble ) { - // Piggyback on a donor event to simulate a different one. - // Fake originalEvent to avoid donor's stopPropagation, but if the - // simulated event prevents default then we do the same on the donor. - var e = jQuery.extend( - new jQuery.Event(), - event, - { - type: type, - isSimulated: true, - originalEvent: {} - } - ); - if ( bubble ) { - jQuery.event.trigger( e, null, elem ); - } else { - jQuery.event.dispatch.call( elem, e ); - } - if ( e.isDefaultPrevented() ) { - event.preventDefault(); - } - } -}; - -jQuery.removeEvent = function( elem, type, handle ) { - if ( elem.removeEventListener ) { - elem.removeEventListener( type, handle, false ); - } -}; - -jQuery.Event = function( src, props ) { - // Allow instantiation without the 'new' keyword - if ( !(this instanceof jQuery.Event) ) { - return new jQuery.Event( src, props ); - } - - // Event object - if ( src && src.type ) { - this.originalEvent = src; - this.type = src.type; - - // Events bubbling up the document may have been marked as prevented - // by a handler lower down the tree; reflect the correct value. - this.isDefaultPrevented = src.defaultPrevented || - src.defaultPrevented === undefined && - // Support: Android<4.0 - src.returnValue === false ? - returnTrue : - returnFalse; - - // Event type - } else { - this.type = src; - } - - // Put explicitly provided properties onto the event object - if ( props ) { - jQuery.extend( this, props ); - } - - // Create a timestamp if incoming event doesn't have one - this.timeStamp = src && src.timeStamp || jQuery.now(); - - // Mark it as fixed - this[ jQuery.expando ] = true; -}; - -// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding -// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html -jQuery.Event.prototype = { - isDefaultPrevented: returnFalse, - isPropagationStopped: returnFalse, - isImmediatePropagationStopped: returnFalse, - - preventDefault: function() { - var e = this.originalEvent; - - this.isDefaultPrevented = returnTrue; - - if ( e && e.preventDefault ) { - e.preventDefault(); - } - }, - stopPropagation: function() { - var e = this.originalEvent; - - this.isPropagationStopped = returnTrue; - - if ( e && e.stopPropagation ) { - e.stopPropagation(); - } - }, - stopImmediatePropagation: function() { - var e = this.originalEvent; - - this.isImmediatePropagationStopped = returnTrue; - - if ( e && e.stopImmediatePropagation ) { - e.stopImmediatePropagation(); - } - - this.stopPropagation(); - } -}; - -// Create mouseenter/leave events using mouseover/out and event-time checks -// Support: Chrome 15+ -jQuery.each({ - mouseenter: "mouseover", - mouseleave: "mouseout", - pointerenter: "pointerover", - pointerleave: "pointerout" -}, function( orig, fix ) { - jQuery.event.special[ orig ] = { - delegateType: fix, - bindType: fix, - - handle: function( event ) { - var ret, - target = this, - related = event.relatedTarget, - handleObj = event.handleObj; - - // For mousenter/leave call the handler if related is outside the target. - // NB: No relatedTarget if the mouse left/entered the browser window - if ( !related || (related !== target && !jQuery.contains( target, related )) ) { - event.type = handleObj.origType; - ret = handleObj.handler.apply( this, arguments ); - event.type = fix; - } - return ret; - } - }; -}); - -// Support: Firefox, Chrome, Safari -// Create "bubbling" focus and blur events -if ( !support.focusinBubbles ) { - jQuery.each({ focus: "focusin", blur: "focusout" }, function( orig, fix ) { - - // Attach a single capturing handler on the document while someone wants focusin/focusout - var handler = function( event ) { - jQuery.event.simulate( fix, event.target, jQuery.event.fix( event ), true ); - }; - - jQuery.event.special[ fix ] = { - setup: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ); - - if ( !attaches ) { - doc.addEventListener( orig, handler, true ); - } - data_priv.access( doc, fix, ( attaches || 0 ) + 1 ); - }, - teardown: function() { - var doc = this.ownerDocument || this, - attaches = data_priv.access( doc, fix ) - 1; - - if ( !attaches ) { - doc.removeEventListener( orig, handler, true ); - data_priv.remove( doc, fix ); - - } else { - data_priv.access( doc, fix, attaches ); - } - } - }; - }); -} - -jQuery.fn.extend({ - - on: function( types, selector, data, fn, /*INTERNAL*/ one ) { - var origFn, type; - - // Types can be a map of types/handlers - if ( typeof types === "object" ) { - // ( types-Object, selector, data ) - if ( typeof selector !== "string" ) { - // ( types-Object, data ) - data = data || selector; - selector = undefined; - } - for ( type in types ) { - this.on( type, selector, data, types[ type ], one ); - } - return this; - } - - if ( data == null && fn == null ) { - // ( types, fn ) - fn = selector; - data = selector = undefined; - } else if ( fn == null ) { - if ( typeof selector === "string" ) { - // ( types, selector, fn ) - fn = data; - data = undefined; - } else { - // ( types, data, fn ) - fn = data; - data = selector; - selector = undefined; - } - } - if ( fn === false ) { - fn = returnFalse; - } else if ( !fn ) { - return this; - } - - if ( one === 1 ) { - origFn = fn; - fn = function( event ) { - // Can use an empty set, since event contains the info - jQuery().off( event ); - return origFn.apply( this, arguments ); - }; - // Use same guid so caller can remove using origFn - fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ ); - } - return this.each( function() { - jQuery.event.add( this, types, fn, data, selector ); - }); - }, - one: function( types, selector, data, fn ) { - return this.on( types, selector, data, fn, 1 ); - }, - off: function( types, selector, fn ) { - var handleObj, type; - if ( types && types.preventDefault && types.handleObj ) { - // ( event ) dispatched jQuery.Event - handleObj = types.handleObj; - jQuery( types.delegateTarget ).off( - handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType, - handleObj.selector, - handleObj.handler - ); - return this; - } - if ( typeof types === "object" ) { - // ( types-object [, selector] ) - for ( type in types ) { - this.off( type, selector, types[ type ] ); - } - return this; - } - if ( selector === false || typeof selector === "function" ) { - // ( types [, fn] ) - fn = selector; - selector = undefined; - } - if ( fn === false ) { - fn = returnFalse; - } - return this.each(function() { - jQuery.event.remove( this, types, fn, selector ); - }); - }, - - trigger: function( type, data ) { - return this.each(function() { - jQuery.event.trigger( type, data, this ); - }); - }, - triggerHandler: function( type, data ) { - var elem = this[0]; - if ( elem ) { - return jQuery.event.trigger( type, data, elem, true ); - } - } -}); - - -var - rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi, - rtagName = /<([\w:]+)/, - rhtml = /<|&#?\w+;/, - rnoInnerhtml = /<(?:script|style|link)/i, - // checked="checked" or checked - rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, - rscriptType = /^$|\/(?:java|ecma)script/i, - rscriptTypeMasked = /^true\/(.*)/, - rcleanScript = /^\s*\s*$/g, - - // We have to close these tags to support XHTML (#13200) - wrapMap = { - - // Support: IE9 - option: [ 1, "" ], - - thead: [ 1, "", "
        " ], - col: [ 2, "", "
        " ], - tr: [ 2, "", "
        " ], - td: [ 3, "", "
        " ], - - _default: [ 0, "", "" ] - }; - -// Support: IE9 -wrapMap.optgroup = wrapMap.option; - -wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; -wrapMap.th = wrapMap.td; - -// Support: 1.x compatibility -// Manipulating tables requires a tbody -function manipulationTarget( elem, content ) { - return jQuery.nodeName( elem, "table" ) && - jQuery.nodeName( content.nodeType !== 11 ? content : content.firstChild, "tr" ) ? - - elem.getElementsByTagName("tbody")[0] || - elem.appendChild( elem.ownerDocument.createElement("tbody") ) : - elem; -} - -// Replace/restore the type attribute of script elements for safe DOM manipulation -function disableScript( elem ) { - elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type; - return elem; -} -function restoreScript( elem ) { - var match = rscriptTypeMasked.exec( elem.type ); - - if ( match ) { - elem.type = match[ 1 ]; - } else { - elem.removeAttribute("type"); - } - - return elem; -} - -// Mark scripts as having already been evaluated -function setGlobalEval( elems, refElements ) { - var i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - data_priv.set( - elems[ i ], "globalEval", !refElements || data_priv.get( refElements[ i ], "globalEval" ) - ); - } -} - -function cloneCopyEvent( src, dest ) { - var i, l, type, pdataOld, pdataCur, udataOld, udataCur, events; - - if ( dest.nodeType !== 1 ) { - return; - } - - // 1. Copy private data: events, handlers, etc. - if ( data_priv.hasData( src ) ) { - pdataOld = data_priv.access( src ); - pdataCur = data_priv.set( dest, pdataOld ); - events = pdataOld.events; - - if ( events ) { - delete pdataCur.handle; - pdataCur.events = {}; - - for ( type in events ) { - for ( i = 0, l = events[ type ].length; i < l; i++ ) { - jQuery.event.add( dest, type, events[ type ][ i ] ); - } - } - } - } - - // 2. Copy user data - if ( data_user.hasData( src ) ) { - udataOld = data_user.access( src ); - udataCur = jQuery.extend( {}, udataOld ); - - data_user.set( dest, udataCur ); - } -} - -function getAll( context, tag ) { - var ret = context.getElementsByTagName ? context.getElementsByTagName( tag || "*" ) : - context.querySelectorAll ? context.querySelectorAll( tag || "*" ) : - []; - - return tag === undefined || tag && jQuery.nodeName( context, tag ) ? - jQuery.merge( [ context ], ret ) : - ret; -} - -// Fix IE bugs, see support tests -function fixInput( src, dest ) { - var nodeName = dest.nodeName.toLowerCase(); - - // Fails to persist the checked state of a cloned checkbox or radio button. - if ( nodeName === "input" && rcheckableType.test( src.type ) ) { - dest.checked = src.checked; - - // Fails to return the selected option to the default selected state when cloning options - } else if ( nodeName === "input" || nodeName === "textarea" ) { - dest.defaultValue = src.defaultValue; - } -} - -jQuery.extend({ - clone: function( elem, dataAndEvents, deepDataAndEvents ) { - var i, l, srcElements, destElements, - clone = elem.cloneNode( true ), - inPage = jQuery.contains( elem.ownerDocument, elem ); - - // Fix IE cloning issues - if ( !support.noCloneChecked && ( elem.nodeType === 1 || elem.nodeType === 11 ) && - !jQuery.isXMLDoc( elem ) ) { - - // We eschew Sizzle here for performance reasons: http://jsperf.com/getall-vs-sizzle/2 - destElements = getAll( clone ); - srcElements = getAll( elem ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - fixInput( srcElements[ i ], destElements[ i ] ); - } - } - - // Copy the events from the original to the clone - if ( dataAndEvents ) { - if ( deepDataAndEvents ) { - srcElements = srcElements || getAll( elem ); - destElements = destElements || getAll( clone ); - - for ( i = 0, l = srcElements.length; i < l; i++ ) { - cloneCopyEvent( srcElements[ i ], destElements[ i ] ); - } - } else { - cloneCopyEvent( elem, clone ); - } - } - - // Preserve script evaluation history - destElements = getAll( clone, "script" ); - if ( destElements.length > 0 ) { - setGlobalEval( destElements, !inPage && getAll( elem, "script" ) ); - } - - // Return the cloned set - return clone; - }, - - buildFragment: function( elems, context, scripts, selection ) { - var elem, tmp, tag, wrap, contains, j, - fragment = context.createDocumentFragment(), - nodes = [], - i = 0, - l = elems.length; - - for ( ; i < l; i++ ) { - elem = elems[ i ]; - - if ( elem || elem === 0 ) { - - // Add nodes directly - if ( jQuery.type( elem ) === "object" ) { - // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem ); - - // Convert non-html into a text node - } else if ( !rhtml.test( elem ) ) { - nodes.push( context.createTextNode( elem ) ); - - // Convert html into DOM nodes - } else { - tmp = tmp || fragment.appendChild( context.createElement("div") ); - - // Deserialize a standard representation - tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase(); - wrap = wrapMap[ tag ] || wrapMap._default; - tmp.innerHTML = wrap[ 1 ] + elem.replace( rxhtmlTag, "<$1>" ) + wrap[ 2 ]; - - // Descend through wrappers to the right content - j = wrap[ 0 ]; - while ( j-- ) { - tmp = tmp.lastChild; - } - - // Support: QtWebKit, PhantomJS - // push.apply(_, arraylike) throws on ancient WebKit - jQuery.merge( nodes, tmp.childNodes ); - - // Remember the top-level container - tmp = fragment.firstChild; - - // Ensure the created nodes are orphaned (#12392) - tmp.textContent = ""; - } - } - } - - // Remove wrapper from fragment - fragment.textContent = ""; - - i = 0; - while ( (elem = nodes[ i++ ]) ) { - - // #4087 - If origin and destination elements are the same, and this is - // that element, do not do anything - if ( selection && jQuery.inArray( elem, selection ) !== -1 ) { - continue; - } - - contains = jQuery.contains( elem.ownerDocument, elem ); - - // Append to fragment - tmp = getAll( fragment.appendChild( elem ), "script" ); - - // Preserve script evaluation history - if ( contains ) { - setGlobalEval( tmp ); - } - - // Capture executables - if ( scripts ) { - j = 0; - while ( (elem = tmp[ j++ ]) ) { - if ( rscriptType.test( elem.type || "" ) ) { - scripts.push( elem ); - } - } - } - } - - return fragment; - }, - - cleanData: function( elems ) { - var data, elem, type, key, - special = jQuery.event.special, - i = 0; - - for ( ; (elem = elems[ i ]) !== undefined; i++ ) { - if ( jQuery.acceptData( elem ) ) { - key = elem[ data_priv.expando ]; - - if ( key && (data = data_priv.cache[ key ]) ) { - if ( data.events ) { - for ( type in data.events ) { - if ( special[ type ] ) { - jQuery.event.remove( elem, type ); - - // This is a shortcut to avoid jQuery.event.remove's overhead - } else { - jQuery.removeEvent( elem, type, data.handle ); - } - } - } - if ( data_priv.cache[ key ] ) { - // Discard any remaining `private` data - delete data_priv.cache[ key ]; - } - } - } - // Discard any remaining `user` data - delete data_user.cache[ elem[ data_user.expando ] ]; - } - } -}); - -jQuery.fn.extend({ - text: function( value ) { - return access( this, function( value ) { - return value === undefined ? - jQuery.text( this ) : - this.empty().each(function() { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - this.textContent = value; - } - }); - }, null, value, arguments.length ); - }, - - append: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.appendChild( elem ); - } - }); - }, - - prepend: function() { - return this.domManip( arguments, function( elem ) { - if ( this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9 ) { - var target = manipulationTarget( this, elem ); - target.insertBefore( elem, target.firstChild ); - } - }); - }, - - before: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this ); - } - }); - }, - - after: function() { - return this.domManip( arguments, function( elem ) { - if ( this.parentNode ) { - this.parentNode.insertBefore( elem, this.nextSibling ); - } - }); - }, - - remove: function( selector, keepData /* Internal Use Only */ ) { - var elem, - elems = selector ? jQuery.filter( selector, this ) : this, - i = 0; - - for ( ; (elem = elems[i]) != null; i++ ) { - if ( !keepData && elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem ) ); - } - - if ( elem.parentNode ) { - if ( keepData && jQuery.contains( elem.ownerDocument, elem ) ) { - setGlobalEval( getAll( elem, "script" ) ); - } - elem.parentNode.removeChild( elem ); - } - } - - return this; - }, - - empty: function() { - var elem, - i = 0; - - for ( ; (elem = this[i]) != null; i++ ) { - if ( elem.nodeType === 1 ) { - - // Prevent memory leaks - jQuery.cleanData( getAll( elem, false ) ); - - // Remove any remaining nodes - elem.textContent = ""; - } - } - - return this; - }, - - clone: function( dataAndEvents, deepDataAndEvents ) { - dataAndEvents = dataAndEvents == null ? false : dataAndEvents; - deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents; - - return this.map(function() { - return jQuery.clone( this, dataAndEvents, deepDataAndEvents ); - }); - }, - - html: function( value ) { - return access( this, function( value ) { - var elem = this[ 0 ] || {}, - i = 0, - l = this.length; - - if ( value === undefined && elem.nodeType === 1 ) { - return elem.innerHTML; - } - - // See if we can take a shortcut and just use innerHTML - if ( typeof value === "string" && !rnoInnerhtml.test( value ) && - !wrapMap[ ( rtagName.exec( value ) || [ "", "" ] )[ 1 ].toLowerCase() ] ) { - - value = value.replace( rxhtmlTag, "<$1>" ); - - try { - for ( ; i < l; i++ ) { - elem = this[ i ] || {}; - - // Remove element nodes and prevent memory leaks - if ( elem.nodeType === 1 ) { - jQuery.cleanData( getAll( elem, false ) ); - elem.innerHTML = value; - } - } - - elem = 0; - - // If using innerHTML throws an exception, use the fallback method - } catch( e ) {} - } - - if ( elem ) { - this.empty().append( value ); - } - }, null, value, arguments.length ); - }, - - replaceWith: function() { - var arg = arguments[ 0 ]; - - // Make the changes, replacing each context element with the new content - this.domManip( arguments, function( elem ) { - arg = this.parentNode; - - jQuery.cleanData( getAll( this ) ); - - if ( arg ) { - arg.replaceChild( elem, this ); - } - }); - - // Force removal if there was no new content (e.g., from empty arguments) - return arg && (arg.length || arg.nodeType) ? this : this.remove(); - }, - - detach: function( selector ) { - return this.remove( selector, true ); - }, - - domManip: function( args, callback ) { - - // Flatten any nested arrays - args = concat.apply( [], args ); - - var fragment, first, scripts, hasScripts, node, doc, - i = 0, - l = this.length, - set = this, - iNoClone = l - 1, - value = args[ 0 ], - isFunction = jQuery.isFunction( value ); - - // We can't cloneNode fragments that contain checked, in WebKit - if ( isFunction || - ( l > 1 && typeof value === "string" && - !support.checkClone && rchecked.test( value ) ) ) { - return this.each(function( index ) { - var self = set.eq( index ); - if ( isFunction ) { - args[ 0 ] = value.call( this, index, self.html() ); - } - self.domManip( args, callback ); - }); - } - - if ( l ) { - fragment = jQuery.buildFragment( args, this[ 0 ].ownerDocument, false, this ); - first = fragment.firstChild; - - if ( fragment.childNodes.length === 1 ) { - fragment = first; - } - - if ( first ) { - scripts = jQuery.map( getAll( fragment, "script" ), disableScript ); - hasScripts = scripts.length; - - // Use the original fragment for the last item instead of the first because it can end up - // being emptied incorrectly in certain situations (#8070). - for ( ; i < l; i++ ) { - node = fragment; - - if ( i !== iNoClone ) { - node = jQuery.clone( node, true, true ); - - // Keep references to cloned scripts for later restoration - if ( hasScripts ) { - // Support: QtWebKit - // jQuery.merge because push.apply(_, arraylike) throws - jQuery.merge( scripts, getAll( node, "script" ) ); - } - } - - callback.call( this[ i ], node, i ); - } - - if ( hasScripts ) { - doc = scripts[ scripts.length - 1 ].ownerDocument; - - // Reenable scripts - jQuery.map( scripts, restoreScript ); - - // Evaluate executable scripts on first document insertion - for ( i = 0; i < hasScripts; i++ ) { - node = scripts[ i ]; - if ( rscriptType.test( node.type || "" ) && - !data_priv.access( node, "globalEval" ) && jQuery.contains( doc, node ) ) { - - if ( node.src ) { - // Optional AJAX dependency, but won't run scripts if not present - if ( jQuery._evalUrl ) { - jQuery._evalUrl( node.src ); - } - } else { - jQuery.globalEval( node.textContent.replace( rcleanScript, "" ) ); - } - } - } - } - } - } - - return this; - } -}); - -jQuery.each({ - appendTo: "append", - prependTo: "prepend", - insertBefore: "before", - insertAfter: "after", - replaceAll: "replaceWith" -}, function( name, original ) { - jQuery.fn[ name ] = function( selector ) { - var elems, - ret = [], - insert = jQuery( selector ), - last = insert.length - 1, - i = 0; - - for ( ; i <= last; i++ ) { - elems = i === last ? this : this.clone( true ); - jQuery( insert[ i ] )[ original ]( elems ); - - // Support: QtWebKit - // .get() because push.apply(_, arraylike) throws - push.apply( ret, elems.get() ); - } - - return this.pushStack( ret ); - }; -}); - - -var iframe, - elemdisplay = {}; - -/** - * Retrieve the actual display of a element - * @param {String} name nodeName of the element - * @param {Object} doc Document object - */ -// Called only from within defaultDisplay -function actualDisplay( name, doc ) { - var style, - elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), - - // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? - - // Use of this method is a temporary fix (more like optimization) until something better comes along, - // since it was removed from specification and supported only in FF - style.display : jQuery.css( elem[ 0 ], "display" ); - - // We don't have any data stored on the element, - // so use "detach" method as fast way to get rid of the element - elem.detach(); - - return display; -} - -/** - * Try to determine the default display value of an element - * @param {String} nodeName - */ -function defaultDisplay( nodeName ) { - var doc = document, - display = elemdisplay[ nodeName ]; - - if ( !display ) { - display = actualDisplay( nodeName, doc ); - - // If the simple way fails, read from inside an iframe - if ( display === "none" || !display ) { - - // Use the already-created iframe if possible - iframe = (iframe || jQuery( "